x86: switch to generic compat rt_sigpending()
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 25 Dec 2012 19:46:17 +0000 (14:46 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 3 Feb 2013 23:16:25 +0000 (18:16 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/x86/Kconfig
arch/x86/ia32/sys_ia32.c
arch/x86/include/asm/sys_ia32.h
arch/x86/syscalls/syscall_32.tbl
arch/x86/syscalls/syscall_64.tbl

index 79795af598105e9998f0de234b279fb6c61ca42f..38018ecc74f690026aeff4cc2dde974fb6212ae3 100644 (file)
@@ -114,6 +114,7 @@ config X86
        select MODULES_USE_ELF_RELA if X86_64
        select CLONE_BACKWARDS if X86_32
        select GENERIC_SIGALTSTACK
+       select GENERIC_COMPAT_RT_SIGPENDING
 
 config INSTRUCTION_DECODER
        def_bool y
index d0b689ba7be2255cd62d365292a0172354982b32..b417fc1c7690f1132999aa7109502d804d9f47f0 100644 (file)
@@ -310,30 +310,6 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
        return ret;
 }
 
-asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set,
-                                   compat_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 __user *)&s, sigsetsize);
-       set_fs(old_fs);
-       if (!ret) {
-               switch (_NSIG_WORDS) {
-               case 4: s32.sig[7] = (s.sig[3] >> 32); s32.sig[6] = s.sig[3];
-               case 3: s32.sig[5] = (s.sig[2] >> 32); s32.sig[4] = s.sig[2];
-               case 2: s32.sig[3] = (s.sig[1] >> 32); s32.sig[2] = s.sig[1];
-               case 1: 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)
 {
index 93e142a719bcc7424dddd7a1d655844ee9fffbdc..ff429b02c25644c928c910c7299608ad352d06cb 100644 (file)
@@ -45,7 +45,6 @@ asmlinkage long sys32_sysfs(int, u32, u32);
 
 asmlinkage long sys32_sched_rr_get_interval(compat_pid_t,
                                            struct compat_timespec __user *);
-asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *, compat_size_t);
 asmlinkage long sys32_rt_sigqueueinfo(int, int, compat_siginfo_t __user *);
 
 asmlinkage long sys32_pread(unsigned int, char __user *, u32, u32, u32);
index 250e2d99059826027e26932a64c74be1187d24ae..5a55e84f4d04b7c9820327fed24fb4779c582fcb 100644 (file)
 173    i386    rt_sigreturn            sys_rt_sigreturn                stub32_rt_sigreturn
 174    i386    rt_sigaction            sys_rt_sigaction                sys32_rt_sigaction
 175    i386    rt_sigprocmask          sys_rt_sigprocmask
-176    i386    rt_sigpending           sys_rt_sigpending               sys32_rt_sigpending
+176    i386    rt_sigpending           sys_rt_sigpending               compat_sys_rt_sigpending
 177    i386    rt_sigtimedwait         sys_rt_sigtimedwait             compat_sys_rt_sigtimedwait
 178    i386    rt_sigqueueinfo         sys_rt_sigqueueinfo             sys32_rt_sigqueueinfo
 179    i386    rt_sigsuspend           sys_rt_sigsuspend
index dc97328bd90ad189f10d3f8c44684e66ac937782..dbde26d7d528cfc1d5894e98b5c9c1cf1b96cf7b 100644 (file)
 519    x32     recvmsg                 compat_sys_recvmsg
 520    x32     execve                  stub_x32_execve
 521    x32     ptrace                  compat_sys_ptrace
-522    x32     rt_sigpending           sys32_rt_sigpending
+522    x32     rt_sigpending           compat_sys_rt_sigpending
 523    x32     rt_sigtimedwait         compat_sys_rt_sigtimedwait
 524    x32     rt_sigqueueinfo         sys32_rt_sigqueueinfo
 525    x32     sigaltstack             compat_sys_sigaltstack