diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-02-19 12:48:01 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-02-20 15:48:49 -0500 |
commit | 2c73ce734653f96542a070f3c3b3e3d1cd0fba02 (patch) | |
tree | ba16b98dae0ae8b1972e4843ba780af43bfc9674 /arch/x86 | |
parent | bb2127240c5595ae4ef7115494f51e973692f64e (diff) |
x86-64, ia32: Drop sys32_rt_sigprocmask
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/ia32/sys_ia32.c | 40 | ||||
-rw-r--r-- | arch/x86/include/asm/sys_ia32.h | 2 | ||||
-rw-r--r-- | arch/x86/syscalls/syscall_32.tbl | 2 |
3 files changed, 1 insertions, 43 deletions
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c index f6f5c53dc903..aec2202a596c 100644 --- a/arch/x86/ia32/sys_ia32.c +++ b/arch/x86/ia32/sys_ia32.c | |||
@@ -287,46 +287,6 @@ asmlinkage long sys32_sigaction(int sig, struct old_sigaction32 __user *act, | |||
287 | return ret; | 287 | return ret; |
288 | } | 288 | } |
289 | 289 | ||
290 | asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, | ||
291 | compat_sigset_t __user *oset, | ||
292 | unsigned int sigsetsize) | ||
293 | { | ||
294 | sigset_t s; | ||
295 | compat_sigset_t s32; | ||
296 | int ret; | ||
297 | mm_segment_t old_fs = get_fs(); | ||
298 | |||
299 | if (set) { | ||
300 | if (copy_from_user(&s32, set, sizeof(compat_sigset_t))) | ||
301 | return -EFAULT; | ||
302 | switch (_NSIG_WORDS) { | ||
303 | case 4: s.sig[3] = s32.sig[6] | (((long)s32.sig[7]) << 32); | ||
304 | case 3: s.sig[2] = s32.sig[4] | (((long)s32.sig[5]) << 32); | ||
305 | case 2: s.sig[1] = s32.sig[2] | (((long)s32.sig[3]) << 32); | ||
306 | case 1: s.sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32); | ||
307 | } | ||
308 | } | ||
309 | set_fs(KERNEL_DS); | ||
310 | ret = sys_rt_sigprocmask(how, | ||
311 | set ? (sigset_t __user *)&s : NULL, | ||
312 | oset ? (sigset_t __user *)&s : NULL, | ||
313 | sigsetsize); | ||
314 | set_fs(old_fs); | ||
315 | if (ret) | ||
316 | return ret; | ||
317 | if (oset) { | ||
318 | switch (_NSIG_WORDS) { | ||
319 | case 4: s32.sig[7] = (s.sig[3] >> 32); s32.sig[6] = s.sig[3]; | ||
320 | case 3: s32.sig[5] = (s.sig[2] >> 32); s32.sig[4] = s.sig[2]; | ||
321 | case 2: s32.sig[3] = (s.sig[1] >> 32); s32.sig[2] = s.sig[1]; | ||
322 | case 1: s32.sig[1] = (s.sig[0] >> 32); s32.sig[0] = s.sig[0]; | ||
323 | } | ||
324 | if (copy_to_user(oset, &s32, sizeof(compat_sigset_t))) | ||
325 | return -EFAULT; | ||
326 | } | ||
327 | return 0; | ||
328 | } | ||
329 | |||
330 | asmlinkage long sys32_alarm(unsigned int seconds) | 290 | asmlinkage long sys32_alarm(unsigned int seconds) |
331 | { | 291 | { |
332 | return alarm_setitimer(seconds); | 292 | return alarm_setitimer(seconds); |
diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h index cb238526a9f1..68da87bfb5a3 100644 --- a/arch/x86/include/asm/sys_ia32.h +++ b/arch/x86/include/asm/sys_ia32.h | |||
@@ -36,8 +36,6 @@ asmlinkage long sys32_rt_sigaction(int, struct sigaction32 __user *, | |||
36 | struct sigaction32 __user *, unsigned int); | 36 | struct sigaction32 __user *, unsigned int); |
37 | asmlinkage long sys32_sigaction(int, struct old_sigaction32 __user *, | 37 | asmlinkage long sys32_sigaction(int, struct old_sigaction32 __user *, |
38 | struct old_sigaction32 __user *); | 38 | struct old_sigaction32 __user *); |
39 | asmlinkage long sys32_rt_sigprocmask(int, compat_sigset_t __user *, | ||
40 | compat_sigset_t __user *, unsigned int); | ||
41 | asmlinkage long sys32_alarm(unsigned int); | 39 | asmlinkage long sys32_alarm(unsigned int); |
42 | 40 | ||
43 | asmlinkage long sys32_waitpid(compat_pid_t, unsigned int *, int); | 41 | asmlinkage long sys32_waitpid(compat_pid_t, unsigned int *, int); |
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index ce98e287c066..031cef84fe43 100644 --- a/arch/x86/syscalls/syscall_32.tbl +++ b/arch/x86/syscalls/syscall_32.tbl | |||
@@ -181,7 +181,7 @@ | |||
181 | 172 i386 prctl sys_prctl | 181 | 172 i386 prctl sys_prctl |
182 | 173 i386 rt_sigreturn ptregs_rt_sigreturn stub32_rt_sigreturn | 182 | 173 i386 rt_sigreturn ptregs_rt_sigreturn stub32_rt_sigreturn |
183 | 174 i386 rt_sigaction sys_rt_sigaction sys32_rt_sigaction | 183 | 174 i386 rt_sigaction sys_rt_sigaction sys32_rt_sigaction |
184 | 175 i386 rt_sigprocmask sys_rt_sigprocmask sys32_rt_sigprocmask | 184 | 175 i386 rt_sigprocmask sys_rt_sigprocmask |
185 | 176 i386 rt_sigpending sys_rt_sigpending sys32_rt_sigpending | 185 | 176 i386 rt_sigpending sys_rt_sigpending sys32_rt_sigpending |
186 | 177 i386 rt_sigtimedwait sys_rt_sigtimedwait compat_sys_rt_sigtimedwait | 186 | 177 i386 rt_sigtimedwait sys_rt_sigtimedwait compat_sys_rt_sigtimedwait |
187 | 178 i386 rt_sigqueueinfo sys_rt_sigqueueinfo sys32_rt_sigqueueinfo | 187 | 178 i386 rt_sigqueueinfo sys_rt_sigqueueinfo sys32_rt_sigqueueinfo |