diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-01-16 14:15:21 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2019-01-18 09:33:18 +0100 |
commit | fef747bab3c09b30b82f76a391ee0ed83d2d6965 (patch) | |
tree | 3a32716e2fd14f6c045240a9a82bdf28bb7b37f5 /arch/s390/kernel/compat_wrapper.c | |
parent | 58fa4a410fc31afe08d0d0c6b6d8860c22ec17c2 (diff) | |
download | linux-fef747bab3c09b30b82f76a391ee0ed83d2d6965.tar.gz |
s390: use generic UID16 implementation
s390 has an almost identical copy of the code in kernel/uid16.c.
The problem here is that it requires calling the regular system calls,
which the generic implementation handles correctly, but the internal
interfaces are not declared in a global header for this.
The best way forward here seems to be to just use the generic code and
delete the s390 specific implementation.
I keep the changes to uapi/asm/posix_types.h inside of an #ifdef check
so user space does not observe any changes. As some of the system calls
pass pointers, we also need wrappers in compat_wrapper.c, which I add
for all calls with at least one argument. All those wrappers can be
removed in a later step.
Link: https://lore.kernel.org/lkml/20190116131527.2071570-4-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/compat_wrapper.c')
-rw-r--r-- | arch/s390/kernel/compat_wrapper.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/s390/kernel/compat_wrapper.c b/arch/s390/kernel/compat_wrapper.c index 48c4ce668244..f54b7b73f316 100644 --- a/arch/s390/kernel/compat_wrapper.c +++ b/arch/s390/kernel/compat_wrapper.c @@ -184,3 +184,18 @@ COMPAT_SYSCALL_WRAP5(statx, int, dfd, const char __user *, path, unsigned, flags COMPAT_SYSCALL_WRAP4(s390_sthyi, unsigned long, code, void __user *, info, u64 __user *, rc, unsigned long, flags); COMPAT_SYSCALL_WRAP5(kexec_file_load, int, kernel_fd, int, initrd_fd, unsigned long, cmdline_len, const char __user *, cmdline_ptr, unsigned long, flags) COMPAT_SYSCALL_WRAP4(rseq, struct rseq __user *, rseq, u32, rseq_len, int, flags, u32, sig) +COMPAT_SYSCALL_WRAP3(chown16, const char __user *, filename, u16, user, u16, group); +COMPAT_SYSCALL_WRAP3(lchown16, const char __user *, filename, u16, user, u16, group); +COMPAT_SYSCALL_WRAP3(fchown16, unsigned int, fd, u16, user, u16, group); +COMPAT_SYSCALL_WRAP2(setregid16, u16, rgid, u16, egid); +COMPAT_SYSCALL_WRAP1(setgid16, u16, gid); +COMPAT_SYSCALL_WRAP2(setreuid16, u16, ruid, u16, euid); +COMPAT_SYSCALL_WRAP1(setuid16, u16, uid); +COMPAT_SYSCALL_WRAP3(setresuid16, u16, ruid, u16, euid, u16, suid); +COMPAT_SYSCALL_WRAP3(getresuid16, u16 __user *, ruidp, u16 __user *, euidp, u16 __user *, suidp); +COMPAT_SYSCALL_WRAP3(setresgid16, u16, rgid, u16, egid, u16, sgid); +COMPAT_SYSCALL_WRAP3(getresgid16, u16 __user *, rgidp, u16 __user *, egidp, u16 __user *, sgidp); +COMPAT_SYSCALL_WRAP1(setfsuid16, u16, uid); +COMPAT_SYSCALL_WRAP1(setfsgid16, u16, gid); +COMPAT_SYSCALL_WRAP2(getgroups16, int, gidsetsize, u16 __user *, grouplist); +COMPAT_SYSCALL_WRAP2(setgroups16, int, gidsetsize, u16 __user *, grouplist); |