s390: switch to generic compat rt_sigaction
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 25 Dec 2012 23:49:25 +0000 (18:49 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 3 Feb 2013 23:16:13 +0000 (18:16 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/s390/Kconfig
arch/s390/kernel/compat_linux.h
arch/s390/kernel/compat_signal.c
arch/s390/kernel/compat_wrapper.S

index 17ba4f3be7ec67fe1309d565c6d65d6bf42fb2f1..e3ab2d6fdca60d468885e9ad652334ae09c0a377 100644 (file)
@@ -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
index aee753dea1d46a80dc94a6cda2d5ea13b9afd589..47e9f07e367595c132383406df3bd606f127223a 100644 (file)
@@ -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 */
index eacb0d6058a3fed286d3ec63478ba9bf06dbe3e9..141bfe190d52abc75c3674ec20500a4754b37f45 100644 (file)
@@ -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;
index 0dd80b9ff74c44ec2de14fd841c50918c10f96a3..1f8af0017c65270c21a688f2b148d38b61a375d2 100644 (file)
@@ -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