aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-25 18:53:43 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 18:16:07 -0500
commitb0f95824f2e91fb0df59fd63ddd6b36a94c05699 (patch)
treec8470a84f91a533ce220a239f0566c8a519c31e6 /arch/parisc
parentd914b8dcbbde8e47b6762d66600ea66ccd18ef45 (diff)
parisc: switch to generic compat rt_sigaction()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/Kconfig1
-rw-r--r--arch/parisc/kernel/signal32.c28
-rw-r--r--arch/parisc/kernel/signal32.h15
-rw-r--r--arch/parisc/kernel/sys32.h12
-rw-r--r--arch/parisc/kernel/syscall_table.S2
5 files changed, 2 insertions, 56 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 798038c8aaf9..2bd407ffaebf 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_SIGACTION
27 select GENERIC_COMPAT_RT_SIGQUEUEINFO 28 select GENERIC_COMPAT_RT_SIGQUEUEINFO
28 select GENERIC_COMPAT_RT_SIGPROCMASK 29 select GENERIC_COMPAT_RT_SIGPROCMASK
29 select GENERIC_COMPAT_RT_SIGPENDING 30 select GENERIC_COMPAT_RT_SIGPENDING
diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c
index 7769f9333e0c..33eca1b04926 100644
--- a/arch/parisc/kernel/signal32.c
+++ b/arch/parisc/kernel/signal32.c
@@ -61,34 +61,6 @@ sigset_64to32(compat_sigset_t *s32, sigset_t *s64)
61} 61}
62 62
63long 63long
64sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, struct sigaction32 __user *oact,
65 size_t sigsetsize)
66{
67 struct k_sigaction32 new_sa32, old_sa32;
68 struct k_sigaction new_sa, old_sa;
69 int ret = -EINVAL;
70
71 if (act) {
72 if (copy_from_user(&new_sa32.sa, act, sizeof new_sa32.sa))
73 return -EFAULT;
74 new_sa.sa.sa_handler = (__sighandler_t)(unsigned long)new_sa32.sa.sa_handler;
75 new_sa.sa.sa_flags = new_sa32.sa.sa_flags;
76 sigset_32to64(&new_sa.sa.sa_mask, &new_sa32.sa.sa_mask);
77 }
78
79 ret = do_sigaction(sig, act ? &new_sa : NULL, oact ? &old_sa : NULL);
80
81 if (!ret && oact) {
82 sigset_64to32(&old_sa32.sa.sa_mask, &old_sa.sa.sa_mask);
83 old_sa32.sa.sa_flags = old_sa.sa.sa_flags;
84 old_sa32.sa.sa_handler = (__sighandler_t32)(unsigned long)old_sa.sa.sa_handler;
85 if (copy_to_user(oact, &old_sa32.sa, sizeof old_sa32.sa))
86 return -EFAULT;
87 }
88 return ret;
89}
90
91long
92restore_sigcontext32(struct compat_sigcontext __user *sc, struct compat_regfile __user * rf, 64restore_sigcontext32(struct compat_sigcontext __user *sc, struct compat_regfile __user * rf,
93 struct pt_regs *regs) 65 struct pt_regs *regs)
94{ 66{
diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h
index 640dc3ec8f5d..72ab41a51f32 100644
--- a/arch/parisc/kernel/signal32.h
+++ b/arch/parisc/kernel/signal32.h
@@ -21,17 +21,6 @@
21 21
22#include <linux/compat.h> 22#include <linux/compat.h>
23 23
24typedef compat_uptr_t compat_sighandler_t;
25
26/* Most things should be clean enough to redefine this at will, if care
27 is taken to make libc match. */
28
29struct compat_sigaction {
30 compat_sighandler_t sa_handler;
31 compat_uint_t sa_flags;
32 compat_sigset_t sa_mask; /* mask last for extensibility */
33};
34
35/* 32-bit ucontext as seen from an 64-bit kernel */ 24/* 32-bit ucontext as seen from an 64-bit kernel */
36struct compat_ucontext { 25struct compat_ucontext {
37 compat_uint_t uc_flags; 26 compat_uint_t uc_flags;
@@ -45,10 +34,6 @@ struct compat_ucontext {
45 34
46/* ELF32 signal handling */ 35/* ELF32 signal handling */
47 36
48struct k_sigaction32 {
49 struct compat_sigaction sa;
50};
51
52int copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from); 37int copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from);
53int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from); 38int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from);
54 39
diff --git a/arch/parisc/kernel/sys32.h b/arch/parisc/kernel/sys32.h
index 06c2090cfaba..60dd470f39f8 100644
--- a/arch/parisc/kernel/sys32.h
+++ b/arch/parisc/kernel/sys32.h
@@ -33,16 +33,4 @@
33 set_fs (old_fs); \ 33 set_fs (old_fs); \
34} 34}
35 35
36#ifdef CONFIG_COMPAT
37
38typedef __u32 __sighandler_t32;
39
40struct sigaction32 {
41 __sighandler_t32 sa_handler;
42 unsigned int sa_flags;
43 compat_sigset_t sa_mask; /* mask last for extensibility */
44};
45
46#endif
47
48#endif 36#endif
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index 883171edfc6e..dd52c23c0dcd 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -265,7 +265,7 @@
265 ENTRY_SAME(prctl) 265 ENTRY_SAME(prctl)
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_COMP(rt_sigaction)
269 ENTRY_COMP(rt_sigprocmask) /* 175 */ 269 ENTRY_COMP(rt_sigprocmask) /* 175 */
270 ENTRY_COMP(rt_sigpending) 270 ENTRY_COMP(rt_sigpending)
271 ENTRY_COMP(rt_sigtimedwait) 271 ENTRY_COMP(rt_sigtimedwait)