arm64: switch to generic compat rt_sigaction()
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 25 Dec 2012 23:56:13 +0000 (18:56 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 14 Feb 2013 14:17:53 +0000 (09:17 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/arm64/Kconfig
arch/arm64/kernel/signal32.c

index 8ae01ea98c16b762aac92500fc5ae21274be80cc..24dce472a77ed0cafcbe36106e219c26ea931038 100644 (file)
@@ -6,6 +6,7 @@ config ARM64
        select CLONE_BACKWARDS
        select COMMON_CLK
        select GENERIC_CLOCKEVENTS
+       select GENERIC_COMPAT_RT_SIGACTION
        select GENERIC_COMPAT_RT_SIGPENDING
        select GENERIC_COMPAT_RT_SIGPROCMASK
        select GENERIC_COMPAT_RT_SIGQUEUEINFO
index a1bd4395a62c2ab0a9cd114b9e077e51c23459ea..892b9dfb5517484fea77f20224d38b0d70660a64 100644 (file)
 #include <asm/uaccess.h>
 #include <asm/unistd32.h>
 
-struct compat_sigaction {
-       compat_uptr_t                   sa_handler;
-       compat_ulong_t                  sa_flags;
-       compat_uptr_t                   sa_restorer;
-       compat_sigset_t                 sa_mask;
-};
-
 struct compat_old_sigaction {
        compat_uptr_t                   sa_handler;
        compat_old_sigset_t             sa_mask;
@@ -371,40 +364,6 @@ asmlinkage int compat_sys_sigaction(int sig,
        return ret;
 }
 
-asmlinkage int compat_sys_rt_sigaction(int sig,
-                                      const struct compat_sigaction __user *act,
-                                      struct compat_sigaction __user *oact,
-                                      compat_size_t sigsetsize)
-{
-       struct k_sigaction new_ka, old_ka;
-       int ret;
-
-       /* XXX: Don't preclude handling different sized sigset_t's.  */
-       if (sigsetsize != sizeof(compat_sigset_t))
-               return -EINVAL;
-
-       if (act) {
-               compat_uptr_t handler, restorer;
-
-               ret = get_user(handler, &act->sa_handler);
-               new_ka.sa.sa_handler = compat_ptr(handler);
-               ret |= get_user(restorer, &act->sa_restorer);
-               new_ka.sa.sa_restorer = compat_ptr(restorer);
-               ret |= get_sigset_t(&new_ka.sa.sa_mask, &act->sa_mask);
-               ret |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
-               if (ret)
-                       return -EFAULT;
-       }
-
-       ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
-       if (!ret && oact) {
-               ret = put_user(ptr_to_compat(old_ka.sa.sa_handler), &oact->sa_handler);
-               ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask);
-               ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
-       }
-       return ret;
-}
-
 static int compat_restore_sigframe(struct pt_regs *regs,
                                   struct compat_sigframe __user *sf)
 {