[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190118161835.2259170-17-arnd@arndb.de>
Date: Fri, 18 Jan 2019 17:18:22 +0100
From: Arnd Bergmann <arnd@...db.de>
To: y2038@...ts.linaro.org, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Cc: Arnd Bergmann <arnd@...db.de>, mattst88@...il.com,
linux@...linux.org.uk, catalin.marinas@....com,
will.deacon@....com, tony.luck@...el.com, fenghua.yu@...el.com,
geert@...ux-m68k.org, monstr@...str.eu, paul.burton@...s.com,
deller@....de, benh@...nel.crashing.org, mpe@...erman.id.au,
schwidefsky@...ibm.com, heiko.carstens@...ibm.com, dalias@...c.org,
davem@...emloft.net, luto@...nel.org, tglx@...utronix.de,
mingo@...hat.com, hpa@...or.com, x86@...nel.org,
jcmvbkbc@...il.com, akpm@...ux-foundation.org,
deepa.kernel@...il.com, ebiederm@...ssion.com,
firoz.khan@...aro.org, linux-alpha@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-ia64@...r.kernel.org,
linux-m68k@...ts.linux-m68k.org, linux-mips@...r.kernel.org,
linux-parisc@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
sparclinux@...r.kernel.org, netdev@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Subject: [PATCH v2 16/29] alpha: add generic get{eg,eu,g,p,u,pp}id() syscalls
Alpha has traditionally followed the OSF1 calling conventions
here, with its getxpid, getxuid, getxgid system calls returning
two different values in separate registers.
Following what glibc has done here, we can define getpid,
getuid and getgid to be aliases for getxpid, getxuid and getxgid
respectively, and add new system call numbers for getppid, geteuid
and getegid.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
arch/alpha/include/asm/unistd.h | 11 -----------
arch/alpha/include/uapi/asm/unistd.h | 5 +++++
arch/alpha/kernel/syscalls/syscall.tbl | 3 +++
3 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h
index 31ad350b58a0..986f5da9b7d8 100644
--- a/arch/alpha/include/asm/unistd.h
+++ b/arch/alpha/include/asm/unistd.h
@@ -19,15 +19,4 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE
-/*
- * Ignore legacy syscalls that we don't use.
- */
-#define __IGNORE_getegid
-#define __IGNORE_geteuid
-#define __IGNORE_getgid
-#define __IGNORE_getpid
-#define __IGNORE_getppid
-#define __IGNORE_getuid
-
-
#endif /* _ALPHA_UNISTD_H */
diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h
index 4507071f995f..71fd5db06866 100644
--- a/arch/alpha/include/uapi/asm/unistd.h
+++ b/arch/alpha/include/uapi/asm/unistd.h
@@ -7,6 +7,11 @@
#define __NR_umount __NR_umount2
#define __NR_osf_shmat __NR_shmat
+/* These return an extra value but can be used as aliases */
+#define __NR_getpid __NR_getxpid
+#define __NR_getuid __NR_getxuid
+#define __NR_getgid __NR_getxgid
+
#include <asm/unistd_32.h>
#endif /* _UAPI_ALPHA_UNISTD_H */
diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl
index 0ebd59fdcb8b..337b8108771a 100644
--- a/arch/alpha/kernel/syscalls/syscall.tbl
+++ b/arch/alpha/kernel/syscalls/syscall.tbl
@@ -458,3 +458,6 @@
527 common rseq sys_rseq
528 common statfs64 sys_statfs64
529 common fstatfs64 sys_fstatfs64
+530 common getegid sys_getegid
+531 common geteuid sys_geteuid
+532 common getppid sys_getppid
--
2.20.0
Powered by blists - more mailing lists