Skip to content

Commit ecf7e0a

Browse files
committed
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@arndb.de>
1 parent 6691f16 commit ecf7e0a

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

arch/alpha/include/asm/unistd.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,4 @@
1919
#define __ARCH_WANT_SYS_VFORK
2020
#define __ARCH_WANT_SYS_CLONE
2121

22-
/*
23-
* Ignore legacy syscalls that we don't use.
24-
*/
25-
#define __IGNORE_getegid
26-
#define __IGNORE_geteuid
27-
#define __IGNORE_getgid
28-
#define __IGNORE_getpid
29-
#define __IGNORE_getppid
30-
#define __IGNORE_getuid
31-
32-
3322
#endif /* _ALPHA_UNISTD_H */

arch/alpha/include/uapi/asm/unistd.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
#define __NR_umount __NR_umount2
88
#define __NR_osf_shmat __NR_shmat
99

10+
/* These return an extra value but can be used as aliases */
11+
#define __NR_getpid __NR_getxpid
12+
#define __NR_getuid __NR_getxuid
13+
#define __NR_getgid __NR_getxgid
14+
1015
#include <asm/unistd_32.h>
1116

1217
#endif /* _UAPI_ALPHA_UNISTD_H */

arch/alpha/kernel/syscalls/syscall.tbl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,3 +458,6 @@
458458
527 common rseq sys_rseq
459459
528 common statfs64 sys_statfs64
460460
529 common fstatfs64 sys_fstatfs64
461+
530 common getegid sys_getegid
462+
531 common geteuid sys_geteuid
463+
532 common getppid sys_getppid

0 commit comments

Comments
 (0)