summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-25 18:49:25 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 18:16:13 -0500
commitf036b943441ac8e79b779e3500ae4820c243b4f2 (patch)
tree9dfb816a36645124f1ca06a2bff681ee4acff493 /arch/s390
parentd7b5427cec79d993459c162db67eac9e22135e8b (diff)
downloadop-kernel-dev-f036b943441ac8e79b779e3500ae4820c243b4f2.zip
op-kernel-dev-f036b943441ac8e79b779e3500ae4820c243b4f2.tar.gz
s390: switch to generic compat rt_sigaction
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/s390/kernel/compat_linux.h8
-rw-r--r--arch/s390/kernel/compat_signal.c40
-rw-r--r--arch/s390/kernel/compat_wrapper.S2
4 files changed, 2 insertions, 49 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 17ba4f3..e3ab2d6 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 aee753d..47e9f07e 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 eacb0d6..141bfe1 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 0dd80b9..1f8af00 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
OpenPOWER on IntegriCloud