From: Al Viro Date: Tue, 25 Dec 2012 18:46:20 +0000 (-0500) Subject: s390: switch to generic compat rt_sigprocmask(2) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=742602243177f3d1d87dede110d278a0f656cf4d;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git s390: switch to generic compat rt_sigprocmask(2) Signed-off-by: Al Viro --- diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 117f3151cc1..26e584eda6d 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -141,6 +141,7 @@ config S390 select MODULES_USE_ELF_RELA select CLONE_BACKWARDS2 select GENERIC_SIGALTSTACK + select GENERIC_COMPAT_RT_SIGPROCMASK config SCHED_OMIT_FRAME_POINTER def_bool y diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 65cca95843e..cfaba34bef3 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c @@ -368,35 +368,6 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, return ret; } -asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, - compat_sigset_t __user *oset, size_t sigsetsize) -{ - sigset_t s; - compat_sigset_t s32; - int ret; - mm_segment_t old_fs = get_fs(); - - if (set) { - if (copy_from_user (&s32, set, sizeof(compat_sigset_t))) - return -EFAULT; - s.sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32); - } - set_fs (KERNEL_DS); - ret = sys_rt_sigprocmask(how, - set ? (sigset_t __force __user *) &s : NULL, - oset ? (sigset_t __force __user *) &s : NULL, - sigsetsize); - set_fs (old_fs); - if (ret) return ret; - if (oset) { - s32.sig[1] = (s.sig[0] >> 32); - s32.sig[0] = s.sig[0]; - if (copy_to_user (oset, &s32, sizeof(compat_sigset_t))) - return -EFAULT; - } - return 0; -} - asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set, size_t sigsetsize) { diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index e2b2a51cf49..1b5c451381e 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h @@ -115,8 +115,6 @@ long sys32_truncate64(const char __user * path, unsigned long high, long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low); long sys32_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval); -long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, - compat_sigset_t __user *oset, size_t sigsetsize); long sys32_rt_sigpending(compat_sigset_t __user *set, size_t sigsetsize); long sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo); long sys32_init_module(void __user *umod, unsigned long len, diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 3c3b9c8b90c..9bea6f20050 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S @@ -698,7 +698,7 @@ ENTRY(sys32_rt_sigprocmask_wrapper) llgtr %r3,%r3 # old_sigset_emu31 * llgtr %r4,%r4 # old_sigset_emu31 * llgfr %r5,%r5 # size_t - jg sys32_rt_sigprocmask # branch to system call + jg compat_sys_rt_sigprocmask # branch to system call ENTRY(sys32_rt_sigpending_wrapper) llgtr %r2,%r2 # sigset_emu31 *