diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-25 13:51:31 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:06 -0500 |
commit | e6a7ad517ae202ab8b813b179ba5ebed1ed93b04 (patch) | |
tree | 7ec10881bbd45e8dc95aa5b90315456cf1566405 /arch/parisc | |
parent | 6e26aab98ce8a818fb1ec47f8f727a8480a9011b (diff) |
parisc: switch to generic compat rt_sigprocmask()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/Kconfig | 1 | ||||
-rw-r--r-- | arch/parisc/kernel/signal32.c | 35 | ||||
-rw-r--r-- | arch/parisc/kernel/syscall_table.S | 2 |
3 files changed, 2 insertions, 36 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 9804a9e34979..0a8badaff8e3 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -24,6 +24,7 @@ config PARISC | |||
24 | select MODULES_USE_ELF_RELA | 24 | select MODULES_USE_ELF_RELA |
25 | select CLONE_BACKWARDS | 25 | select CLONE_BACKWARDS |
26 | select GENERIC_SIGALTSTACK | 26 | select GENERIC_SIGALTSTACK |
27 | select GENERIC_COMPAT_RT_SIGPROCMASK | ||
27 | 28 | ||
28 | help | 29 | help |
29 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 30 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c index df79070c3715..49cb23462371 100644 --- a/arch/parisc/kernel/signal32.c +++ b/arch/parisc/kernel/signal32.c | |||
@@ -72,41 +72,6 @@ put_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz) | |||
72 | return copy_to_user(up, &s, sizeof s); | 72 | return copy_to_user(up, &s, sizeof s); |
73 | } | 73 | } |
74 | 74 | ||
75 | static int | ||
76 | get_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz) | ||
77 | { | ||
78 | compat_sigset_t s; | ||
79 | int r; | ||
80 | |||
81 | if (sz != sizeof *set) | ||
82 | return -EINVAL; | ||
83 | |||
84 | if ((r = copy_from_user(&s, up, sz)) == 0) { | ||
85 | sigset_32to64(set, &s); | ||
86 | } | ||
87 | |||
88 | return r; | ||
89 | } | ||
90 | |||
91 | int sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, compat_sigset_t __user *oset, | ||
92 | unsigned int sigsetsize) | ||
93 | { | ||
94 | sigset_t old_set, new_set; | ||
95 | int ret; | ||
96 | |||
97 | if (set && get_sigset32(set, &new_set, sigsetsize)) | ||
98 | return -EFAULT; | ||
99 | |||
100 | KERNEL_SYSCALL(ret, sys_rt_sigprocmask, how, set ? (sigset_t __user *)&new_set : NULL, | ||
101 | oset ? (sigset_t __user *)&old_set : NULL, sigsetsize); | ||
102 | |||
103 | if (!ret && oset && put_sigset32(oset, &old_set, sigsetsize)) | ||
104 | return -EFAULT; | ||
105 | |||
106 | return ret; | ||
107 | } | ||
108 | |||
109 | |||
110 | int sys32_rt_sigpending(compat_sigset_t __user *uset, unsigned int sigsetsize) | 75 | int sys32_rt_sigpending(compat_sigset_t __user *uset, unsigned int sigsetsize) |
111 | { | 76 | { |
112 | int ret; | 77 | int ret; |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 46dd6efacaaa..3ea2fe29f7d5 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -266,7 +266,7 @@ | |||
266 | /* signals need a careful review */ | 266 | /* signals need a careful review */ |
267 | ENTRY_SAME(rt_sigreturn_wrapper) | 267 | ENTRY_SAME(rt_sigreturn_wrapper) |
268 | ENTRY_DIFF(rt_sigaction) | 268 | ENTRY_DIFF(rt_sigaction) |
269 | ENTRY_DIFF(rt_sigprocmask) /* 175 */ | 269 | ENTRY_COMP(rt_sigprocmask) /* 175 */ |
270 | ENTRY_DIFF(rt_sigpending) | 270 | ENTRY_DIFF(rt_sigpending) |
271 | ENTRY_COMP(rt_sigtimedwait) | 271 | ENTRY_COMP(rt_sigtimedwait) |
272 | /* even though the struct siginfo_t is different, it appears like | 272 | /* even though the struct siginfo_t is different, it appears like |