x86-64, ia32: Drop sys32_rt_sigprocmask
authorH. Peter Anvin <hpa@zytor.com>
Sun, 19 Feb 2012 17:48:01 +0000 (09:48 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 20 Feb 2012 20:48:49 +0000 (12:48 -0800)
On x86, the only difference between sys_rt_sigprocmask and
sys32_rt_sigprocmask is the alignment of the data structures.
However, x86 allows data accesses with arbitrary alignment, and
therefore there is no reason for this code to be different.

Reported-by: Gregory M. Lueck <gregory.m.lueck@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/ia32/sys_ia32.c
arch/x86/include/asm/sys_ia32.h
arch/x86/syscalls/syscall_32.tbl

index f6f5c53dc90343e73847a3ae257279a757e016ca..aec2202a596cb0348aa6e5c1b397cff09d3a3386 100644 (file)
@@ -287,46 +287,6 @@ asmlinkage long sys32_sigaction(int sig, struct old_sigaction32 __user *act,
        return ret;
 }
 
-asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
-                                    compat_sigset_t __user *oset,
-                                    unsigned int sigsetsize)
-{
-       sigset_t s;
-       compat_sigset_t s32;
-       int ret;
-       mm_segment_t old_fs = get_fs();
-
-       if (set) {
-               if (copy_from_user(&s32, set, sizeof(compat_sigset_t)))
-                       return -EFAULT;
-               switch (_NSIG_WORDS) {
-               case 4: s.sig[3] = s32.sig[6] | (((long)s32.sig[7]) << 32);
-               case 3: s.sig[2] = s32.sig[4] | (((long)s32.sig[5]) << 32);
-               case 2: s.sig[1] = s32.sig[2] | (((long)s32.sig[3]) << 32);
-               case 1: s.sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32);
-               }
-       }
-       set_fs(KERNEL_DS);
-       ret = sys_rt_sigprocmask(how,
-                                set ? (sigset_t __user *)&s : NULL,
-                                oset ? (sigset_t __user *)&s : NULL,
-                                sigsetsize);
-       set_fs(old_fs);
-       if (ret)
-               return ret;
-       if (oset) {
-               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(oset, &s32, sizeof(compat_sigset_t)))
-                       return -EFAULT;
-       }
-       return 0;
-}
-
 asmlinkage long sys32_alarm(unsigned int seconds)
 {
        return alarm_setitimer(seconds);
index cb238526a9f12959ebed76a6d76d0d9e750a17bd..68da87bfb5a3d3eddea2962e6e3ac7ed14fc4f46 100644 (file)
@@ -36,8 +36,6 @@ asmlinkage long sys32_rt_sigaction(int, struct sigaction32 __user *,
                                   struct sigaction32 __user *, unsigned int);
 asmlinkage long sys32_sigaction(int, struct old_sigaction32 __user *,
                                struct old_sigaction32 __user *);
-asmlinkage long sys32_rt_sigprocmask(int, compat_sigset_t __user *,
-                                    compat_sigset_t __user *, unsigned int);
 asmlinkage long sys32_alarm(unsigned int);
 
 asmlinkage long sys32_waitpid(compat_pid_t, unsigned int *, int);
index ce98e287c06612ff0b6caff87e922e569ef5d0fe..031cef84fe43c8596ca7ce029c5373b0a863ae08 100644 (file)
 172    i386    prctl                   sys_prctl
 173    i386    rt_sigreturn            ptregs_rt_sigreturn             stub32_rt_sigreturn
 174    i386    rt_sigaction            sys_rt_sigaction                sys32_rt_sigaction
-175    i386    rt_sigprocmask          sys_rt_sigprocmask              sys32_rt_sigprocmask
+175    i386    rt_sigprocmask          sys_rt_sigprocmask
 176    i386    rt_sigpending           sys_rt_sigpending               sys32_rt_sigpending
 177    i386    rt_sigtimedwait         sys_rt_sigtimedwait             compat_sys_rt_sigtimedwait
 178    i386    rt_sigqueueinfo         sys_rt_sigqueueinfo             sys32_rt_sigqueueinfo