From e214125aa8c0546b24dabf6f47b28c5e20133d1d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 23 Dec 2012 03:36:41 -0500 Subject: s390: switch to generic sigaltstack Signed-off-by: Al Viro --- arch/s390/kernel/compat_linux.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'arch/s390/kernel/compat_linux.h') diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index d4d0239970a..e2b2a51cf49 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h @@ -75,17 +75,11 @@ struct sigaction32 { compat_sigset_t sa_mask; /* mask last for extensibility */ }; -typedef struct { - __u32 ss_sp; /* pointer */ - int ss_flags; - compat_size_t ss_size; -} stack_t32; - /* asm/ucontext.h */ struct ucontext32 { __u32 uc_flags; __u32 uc_link; /* pointer */ - stack_t32 uc_stack; + compat_stack_t uc_stack; _sigregs32 uc_mcontext; compat_sigset_t uc_sigmask; /* mask last for extensibility */ }; @@ -153,5 +147,4 @@ long sys32_sigaction(int sig, const struct old_sigaction32 __user *act, struct old_sigaction32 __user *oact); long sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, struct sigaction32 __user *oact, size_t sigsetsize); -long sys32_sigaltstack(const stack_t32 __user *uss, stack_t32 __user *uoss); #endif /* _ASM_S390X_S390_H */ -- cgit v1.2.3-70-g09d2 From 742602243177f3d1d87dede110d278a0f656cf4d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 25 Dec 2012 13:46:20 -0500 Subject: s390: switch to generic compat rt_sigprocmask(2) Signed-off-by: Al Viro --- arch/s390/Kconfig | 1 + arch/s390/kernel/compat_linux.c | 29 ----------------------------- arch/s390/kernel/compat_linux.h | 2 -- arch/s390/kernel/compat_wrapper.S | 2 +- 4 files changed, 2 insertions(+), 32 deletions(-) (limited to 'arch/s390/kernel/compat_linux.h') 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 * -- cgit v1.2.3-70-g09d2 From bdcf03183cbf208923752bd26f6b9488c60ec1ca Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 25 Dec 2012 14:53:15 -0500 Subject: s390: switch to generic compat rt_sigpending() Signed-off-by: Al Viro --- arch/s390/Kconfig | 1 + arch/s390/kernel/compat_linux.c | 20 -------------------- arch/s390/kernel/compat_linux.h | 1 - arch/s390/kernel/compat_wrapper.S | 2 +- 4 files changed, 2 insertions(+), 22 deletions(-) (limited to 'arch/s390/kernel/compat_linux.h') diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 26e584eda6d..f68a030411b 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -142,6 +142,7 @@ config S390 select CLONE_BACKWARDS2 select GENERIC_SIGALTSTACK select GENERIC_COMPAT_RT_SIGPROCMASK + select GENERIC_COMPAT_RT_SIGPENDING 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 cfaba34bef3..877b18be0f4 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c @@ -368,26 +368,6 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, return ret; } -asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set, - size_t sigsetsize) -{ - sigset_t s; - compat_sigset_t s32; - int ret; - mm_segment_t old_fs = get_fs(); - - set_fs (KERNEL_DS); - ret = sys_rt_sigpending((sigset_t __force __user *) &s, sigsetsize); - set_fs (old_fs); - if (!ret) { - s32.sig[1] = (s.sig[0] >> 32); - s32.sig[0] = s.sig[0]; - if (copy_to_user (set, &s32, sizeof(compat_sigset_t))) - return -EFAULT; - } - return ret; -} - asmlinkage long sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo) { diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index 1b5c451381e..385567661ce 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h @@ -115,7 +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_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, const char __user *uargs); diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 9bea6f20050..2b813b3edbd 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S @@ -703,7 +703,7 @@ ENTRY(sys32_rt_sigprocmask_wrapper) ENTRY(sys32_rt_sigpending_wrapper) llgtr %r2,%r2 # sigset_emu31 * llgfr %r3,%r3 # size_t - jg sys32_rt_sigpending # branch to system call + jg compat_sys_rt_sigpending # branch to system call ENTRY(compat_sys_rt_sigtimedwait_wrapper) llgtr %r2,%r2 # const sigset_emu31_t * -- cgit v1.2.3-70-g09d2 From 07562be77d5b36aa961f722292a708bb663f8a73 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 25 Dec 2012 15:45:24 -0500 Subject: s390: switch to generic compat rt_sigqueueinfo() Signed-off-by: Al Viro --- arch/s390/Kconfig | 1 + arch/s390/kernel/compat_linux.c | 15 --------------- arch/s390/kernel/compat_linux.h | 1 - arch/s390/kernel/compat_wrapper.S | 2 +- 4 files changed, 2 insertions(+), 17 deletions(-) (limited to 'arch/s390/kernel/compat_linux.h') diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index f68a030411b..019364785d3 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_SIGQUEUEINFO select GENERIC_COMPAT_RT_SIGPROCMASK select GENERIC_COMPAT_RT_SIGPENDING diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 877b18be0f4..4b95fc652f7 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c @@ -368,21 +368,6 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, return ret; } -asmlinkage long -sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo) -{ - siginfo_t info; - int ret; - mm_segment_t old_fs = get_fs(); - - if (copy_siginfo_from_user32(&info, uinfo)) - return -EFAULT; - set_fs (KERNEL_DS); - ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __force __user *) &info); - set_fs (old_fs); - return ret; -} - asmlinkage long sys32_pread64(unsigned int fd, char __user *ubuf, size_t count, u32 poshi, u32 poslo) { diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index 385567661ce..f0280a19838 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h @@ -115,7 +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_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo); long sys32_init_module(void __user *umod, unsigned long len, const char __user *uargs); long sys32_delete_module(const char __user *name_user, unsigned int flags); diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 2b813b3edbd..ee6c36b41ef 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S @@ -716,7 +716,7 @@ ENTRY(sys32_rt_sigqueueinfo_wrapper) lgfr %r2,%r2 # int lgfr %r3,%r3 # int llgtr %r4,%r4 # siginfo_emu31_t * - jg sys32_rt_sigqueueinfo # branch to system call + jg compat_sys_rt_sigqueueinfo # branch to system call ENTRY(compat_sys_rt_sigsuspend_wrapper) llgtr %r2,%r2 # compat_sigset_t * -- cgit v1.2.3-70-g09d2 From d7b5427cec79d993459c162db67eac9e22135e8b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 25 Dec 2012 17:26:57 -0500 Subject: s390: switch to generic compat sched_rr_get_interval() Signed-off-by: Al Viro --- arch/s390/kernel/compat_linux.c | 16 ---------------- arch/s390/kernel/compat_linux.h | 2 -- arch/s390/kernel/compat_wrapper.S | 2 +- 3 files changed, 1 insertion(+), 19 deletions(-) (limited to 'arch/s390/kernel/compat_linux.h') diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 4b95fc652f7..19f26de27fa 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c @@ -352,22 +352,6 @@ asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned return sys_ftruncate(fd, (high << 32) | low); } -asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, - struct compat_timespec __user *interval) -{ - struct timespec t; - int ret; - mm_segment_t old_fs = get_fs (); - - set_fs (KERNEL_DS); - ret = sys_sched_rr_get_interval(pid, - (struct timespec __force __user *) &t); - set_fs (old_fs); - if (put_compat_timespec(&t, interval)) - return -EFAULT; - return ret; -} - asmlinkage long sys32_pread64(unsigned int fd, char __user *ubuf, size_t count, u32 poshi, u32 poslo) { diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index f0280a19838..aee753dea1d 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h @@ -113,8 +113,6 @@ long sys32_ipc(u32 call, int first, int second, int third, u32 ptr); long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low); 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_init_module(void __user *umod, unsigned long len, const char __user *uargs); long sys32_delete_module(const char __user *name_user, unsigned int flags); diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index ee6c36b41ef..0dd80b9ff74 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S @@ -631,7 +631,7 @@ ENTRY(sys32_sched_get_priority_min_wrapper) ENTRY(sys32_sched_rr_get_interval_wrapper) lgfr %r2,%r2 # pid_t llgtr %r3,%r3 # struct compat_timespec * - jg sys32_sched_rr_get_interval # branch to system call + jg compat_sys_sched_rr_get_interval # branch to system call ENTRY(compat_sys_nanosleep_wrapper) llgtr %r2,%r2 # struct compat_timespec * -- cgit v1.2.3-70-g09d2 From f036b943441ac8e79b779e3500ae4820c243b4f2 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 25 Dec 2012 18:49:25 -0500 Subject: s390: switch to generic compat rt_sigaction Signed-off-by: Al Viro --- arch/s390/Kconfig | 1 + arch/s390/kernel/compat_linux.h | 8 -------- arch/s390/kernel/compat_signal.c | 40 --------------------------------------- arch/s390/kernel/compat_wrapper.S | 2 +- 4 files changed, 2 insertions(+), 49 deletions(-) (limited to 'arch/s390/kernel/compat_linux.h') diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 17ba4f3be7e..e3ab2d6fdca 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_SIGACTION select GENERIC_COMPAT_RT_SIGQUEUEINFO select GENERIC_COMPAT_RT_SIGPROCMASK select GENERIC_COMPAT_RT_SIGPENDING diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index aee753dea1d..47e9f07e367 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h @@ -68,12 +68,6 @@ struct sigcontext32 }; /* asm/signal.h */ -struct sigaction32 { - __u32 sa_handler; /* pointer */ - __u32 sa_flags; - __u32 sa_restorer; /* pointer */ - compat_sigset_t sa_mask; /* mask last for extensibility */ -}; /* asm/ucontext.h */ struct ucontext32 { @@ -139,6 +133,4 @@ long sys32_fadvise64(int fd, loff_t offset, size_t len, int advise); long sys32_fadvise64_64(struct fadvise64_64_args __user *args); long sys32_sigaction(int sig, const struct old_sigaction32 __user *act, struct old_sigaction32 __user *oact); -long sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, - struct sigaction32 __user *oact, size_t sigsetsize); #endif /* _ASM_S390X_S390_H */ diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index eacb0d6058a..141bfe190d5 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c @@ -194,46 +194,6 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, return ret; } -asmlinkage long -sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, - struct sigaction32 __user *oact, size_t sigsetsize) -{ - struct k_sigaction new_ka, old_ka; - unsigned long sa_handler; - int ret; - compat_sigset_t set32; - - /* XXX: Don't preclude handling different sized sigset_t's. */ - if (sigsetsize != sizeof(compat_sigset_t)) - return -EINVAL; - - if (act) { - ret = get_user(sa_handler, &act->sa_handler); - ret |= __copy_from_user(&set32, &act->sa_mask, - sizeof(compat_sigset_t)); - new_ka.sa.sa_mask.sig[0] = - set32.sig[0] | (((long)set32.sig[1]) << 32); - ret |= __get_user(new_ka.sa.sa_flags, &act->sa_flags); - - if (ret) - return -EFAULT; - new_ka.sa.sa_handler = (__sighandler_t) sa_handler; - } - - ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); - - if (!ret && oact) { - set32.sig[1] = (old_ka.sa.sa_mask.sig[0] >> 32); - set32.sig[0] = old_ka.sa.sa_mask.sig[0]; - ret = put_user((unsigned long)old_ka.sa.sa_handler, &oact->sa_handler); - ret |= __copy_to_user(&oact->sa_mask, &set32, - sizeof(compat_sigset_t)); - ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); - } - - return ret; -} - static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs) { _s390_regs_common32 regs32; diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 0dd80b9ff74..1f8af0017c6 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S @@ -691,7 +691,7 @@ ENTRY(sys32_rt_sigaction_wrapper) llgtr %r3,%r3 # const struct sigaction_emu31 * llgtr %r4,%r4 # const struct sigaction_emu31 * llgfr %r5,%r5 # size_t - jg sys32_rt_sigaction # branch to system call + jg compat_sys_rt_sigaction # branch to system call ENTRY(sys32_rt_sigprocmask_wrapper) lgfr %r2,%r2 # int -- cgit v1.2.3-70-g09d2 From 7eddd99c289a443d76391d740c7c62d542174f27 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 25 Dec 2012 19:26:12 -0500 Subject: s390: switch to generic old sigaction() Signed-off-by: Al Viro --- arch/s390/Kconfig | 2 ++ arch/s390/include/asm/signal.h | 7 ------- arch/s390/kernel/compat_linux.h | 11 ----------- arch/s390/kernel/compat_signal.c | 37 ------------------------------------- arch/s390/kernel/compat_wrapper.S | 2 +- arch/s390/kernel/entry.h | 2 -- arch/s390/kernel/signal.c | 31 ------------------------------- 7 files changed, 3 insertions(+), 89 deletions(-) (limited to 'arch/s390/kernel/compat_linux.h') diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index e3ab2d6fdca..bcdcf31fa67 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -146,6 +146,7 @@ config S390 select GENERIC_COMPAT_RT_SIGPROCMASK select GENERIC_COMPAT_RT_SIGPENDING select OLD_SIGSUSPEND3 + select OLD_SIGACTION config SCHED_OMIT_FRAME_POINTER def_bool y @@ -255,6 +256,7 @@ config COMPAT depends on 64BIT select COMPAT_BINFMT_ELF if BINFMT_ELF select ARCH_WANT_OLD_COMPAT_IPC + select COMPAT_OLD_SIGACTION help Select this option if you want to enable your system kernel to handle system-calls from ELF binaries for 31 bit ESA. This option diff --git a/arch/s390/include/asm/signal.h b/arch/s390/include/asm/signal.h index d26e30e3165..abf9e573594 100644 --- a/arch/s390/include/asm/signal.h +++ b/arch/s390/include/asm/signal.h @@ -21,12 +21,5 @@ typedef struct { unsigned long sig[_NSIG_WORDS]; } sigset_t; -struct old_sigaction { - __sighandler_t sa_handler; - old_sigset_t sa_mask; - unsigned long sa_flags; - void (*sa_restorer)(void); -}; - #define __ARCH_HAS_SA_RESTORER #endif diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index 47e9f07e367..00d92a5a6f6 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h @@ -17,13 +17,6 @@ struct ipc_kludge_32 { __s32 msgtyp; }; -struct old_sigaction32 { - __u32 sa_handler; /* Really a pointer, but need to deal with 32 bits */ - compat_old_sigset_t sa_mask; /* A 32 bit mask */ - __u32 sa_flags; - __u32 sa_restorer; /* Another 32 bit pointer */ -}; - /* asm/sigcontext.h */ typedef union { @@ -81,8 +74,6 @@ struct ucontext32 { struct stat64_emu31; struct mmap_arg_struct_emu31; struct fadvise64_64_args; -struct old_sigaction32; -struct old_sigaction32; long sys32_chown16(const char __user * filename, u16 user, u16 group); long sys32_lchown16(const char __user * filename, u16 user, u16 group); @@ -131,6 +122,4 @@ long sys32_read(unsigned int fd, char __user * buf, size_t count); long sys32_write(unsigned int fd, const char __user * buf, size_t count); long sys32_fadvise64(int fd, loff_t offset, size_t len, int advise); long sys32_fadvise64_64(struct fadvise64_64_args __user *args); -long sys32_sigaction(int sig, const struct old_sigaction32 __user *act, - struct old_sigaction32 __user *oact); #endif /* _ASM_S390X_S390_H */ diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 141bfe190d5..3e71194c190 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c @@ -157,43 +157,6 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) return err; } -asmlinkage long -sys32_sigaction(int sig, const struct old_sigaction32 __user *act, - struct old_sigaction32 __user *oact) -{ - struct k_sigaction new_ka, old_ka; - unsigned long sa_handler, sa_restorer; - int ret; - - if (act) { - compat_old_sigset_t mask; - if (!access_ok(VERIFY_READ, act, sizeof(*act)) || - __get_user(sa_handler, &act->sa_handler) || - __get_user(sa_restorer, &act->sa_restorer) || - __get_user(new_ka.sa.sa_flags, &act->sa_flags) || - __get_user(mask, &act->sa_mask)) - return -EFAULT; - new_ka.sa.sa_handler = (__sighandler_t) sa_handler; - new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer; - siginitset(&new_ka.sa.sa_mask, mask); - } - - ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); - - if (!ret && oact) { - sa_handler = (unsigned long) old_ka.sa.sa_handler; - sa_restorer = (unsigned long) old_ka.sa.sa_restorer; - if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || - __put_user(sa_handler, &oact->sa_handler) || - __put_user(sa_restorer, &oact->sa_restorer) || - __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || - __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) - return -EFAULT; - } - - return ret; -} - static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs) { _s390_regs_common32 regs32; diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 1f8af0017c6..559e04fe407 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S @@ -230,7 +230,7 @@ ENTRY(sys32_sigaction_wrapper) lgfr %r2,%r2 # int llgtr %r3,%r3 # const struct old_sigaction * llgtr %r4,%r4 # struct old_sigaction32 * - jg sys32_sigaction # branch to system call + jg compat_sys_sigaction # branch to system call ENTRY(sys32_setreuid16_wrapper) llgfr %r2,%r2 # __kernel_old_uid_emu31_t diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h index ee1a8b3d0db..c3a736a3ed4 100644 --- a/arch/s390/kernel/entry.h +++ b/arch/s390/kernel/entry.h @@ -73,8 +73,6 @@ long sys_s390_fadvise64(int fd, u32 offset_high, u32 offset_low, long sys_s390_fadvise64_64(struct fadvise64_64_args __user *args); long sys_s390_fallocate(int fd, int mode, loff_t offset, u32 len_high, u32 len_low); -long sys_sigaction(int sig, const struct old_sigaction __user *act, - struct old_sigaction __user *oact); long sys_sigreturn(void); long sys_rt_sigreturn(void); long sys32_sigreturn(void); diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 0bc5c9d1ab9..9c6e747a5e1 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c @@ -48,37 +48,6 @@ typedef struct struct ucontext uc; } rt_sigframe; -SYSCALL_DEFINE3(sigaction, int, sig, const struct old_sigaction __user *, act, - struct old_sigaction __user *, oact) -{ - struct k_sigaction new_ka, old_ka; - int ret; - - if (act) { - old_sigset_t mask; - if (!access_ok(VERIFY_READ, act, sizeof(*act)) || - __get_user(new_ka.sa.sa_handler, &act->sa_handler) || - __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) || - __get_user(new_ka.sa.sa_flags, &act->sa_flags) || - __get_user(mask, &act->sa_mask)) - return -EFAULT; - siginitset(&new_ka.sa.sa_mask, mask); - } - - ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); - - if (!ret && oact) { - if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || - __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || - __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) || - __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || - __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) - return -EFAULT; - } - - return ret; -} - /* Returns non-zero on fault. */ static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs) { -- cgit v1.2.3-70-g09d2