diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-25 13:46:20 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:12 -0500 |
commit | 742602243177f3d1d87dede110d278a0f656cf4d (patch) | |
tree | df7f0635224693c6472bee57343a29cdf538ebd7 /arch | |
parent | e214125aa8c0546b24dabf6f47b28c5e20133d1d (diff) |
s390: switch to generic compat rt_sigprocmask(2)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/Kconfig | 1 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 29 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.h | 2 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 2 |
4 files changed, 2 insertions, 32 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 117f3151cc13..26e584eda6d6 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -141,6 +141,7 @@ config S390 | |||
141 | select MODULES_USE_ELF_RELA | 141 | select MODULES_USE_ELF_RELA |
142 | select CLONE_BACKWARDS2 | 142 | select CLONE_BACKWARDS2 |
143 | select GENERIC_SIGALTSTACK | 143 | select GENERIC_SIGALTSTACK |
144 | select GENERIC_COMPAT_RT_SIGPROCMASK | ||
144 | 145 | ||
145 | config SCHED_OMIT_FRAME_POINTER | 146 | config SCHED_OMIT_FRAME_POINTER |
146 | def_bool y | 147 | def_bool y |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 65cca95843e1..cfaba34bef3a 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, | |||
368 | return ret; | 368 | return ret; |
369 | } | 369 | } |
370 | 370 | ||
371 | asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, | ||
372 | compat_sigset_t __user *oset, size_t sigsetsize) | ||
373 | { | ||
374 | sigset_t s; | ||
375 | compat_sigset_t s32; | ||
376 | int ret; | ||
377 | mm_segment_t old_fs = get_fs(); | ||
378 | |||
379 | if (set) { | ||
380 | if (copy_from_user (&s32, set, sizeof(compat_sigset_t))) | ||
381 | return -EFAULT; | ||
382 | s.sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32); | ||
383 | } | ||
384 | set_fs (KERNEL_DS); | ||
385 | ret = sys_rt_sigprocmask(how, | ||
386 | set ? (sigset_t __force __user *) &s : NULL, | ||
387 | oset ? (sigset_t __force __user *) &s : NULL, | ||
388 | sigsetsize); | ||
389 | set_fs (old_fs); | ||
390 | if (ret) return ret; | ||
391 | if (oset) { | ||
392 | s32.sig[1] = (s.sig[0] >> 32); | ||
393 | s32.sig[0] = s.sig[0]; | ||
394 | if (copy_to_user (oset, &s32, sizeof(compat_sigset_t))) | ||
395 | return -EFAULT; | ||
396 | } | ||
397 | return 0; | ||
398 | } | ||
399 | |||
400 | asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set, | 371 | asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set, |
401 | size_t sigsetsize) | 372 | size_t sigsetsize) |
402 | { | 373 | { |
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index e2b2a51cf49b..1b5c451381e0 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, | |||
115 | long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low); | 115 | long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low); |
116 | long sys32_sched_rr_get_interval(compat_pid_t pid, | 116 | long sys32_sched_rr_get_interval(compat_pid_t pid, |
117 | struct compat_timespec __user *interval); | 117 | struct compat_timespec __user *interval); |
118 | long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, | ||
119 | compat_sigset_t __user *oset, size_t sigsetsize); | ||
120 | long sys32_rt_sigpending(compat_sigset_t __user *set, size_t sigsetsize); | 118 | long sys32_rt_sigpending(compat_sigset_t __user *set, size_t sigsetsize); |
121 | long sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo); | 119 | long sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo); |
122 | long sys32_init_module(void __user *umod, unsigned long len, | 120 | 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 3c3b9c8b90c1..9bea6f200500 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -698,7 +698,7 @@ ENTRY(sys32_rt_sigprocmask_wrapper) | |||
698 | llgtr %r3,%r3 # old_sigset_emu31 * | 698 | llgtr %r3,%r3 # old_sigset_emu31 * |
699 | llgtr %r4,%r4 # old_sigset_emu31 * | 699 | llgtr %r4,%r4 # old_sigset_emu31 * |
700 | llgfr %r5,%r5 # size_t | 700 | llgfr %r5,%r5 # size_t |
701 | jg sys32_rt_sigprocmask # branch to system call | 701 | jg compat_sys_rt_sigprocmask # branch to system call |
702 | 702 | ||
703 | ENTRY(sys32_rt_sigpending_wrapper) | 703 | ENTRY(sys32_rt_sigpending_wrapper) |
704 | llgtr %r2,%r2 # sigset_emu31 * | 704 | llgtr %r2,%r2 # sigset_emu31 * |