aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/cris/Kconfig1
-rw-r--r--arch/cris/arch-v10/kernel/signal.c31
-rw-r--r--arch/cris/arch-v32/kernel/signal.c36
-rw-r--r--arch/cris/include/asm/signal.h7
4 files changed, 1 insertions, 74 deletions
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 686968c10897..c2a1d0a8924c 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -52,6 +52,7 @@ config CRIS
52 select CLONE_BACKWARDS2 52 select CLONE_BACKWARDS2
53 select GENERIC_SIGALTSTACK 53 select GENERIC_SIGALTSTACK
54 select OLD_SIGSUSPEND 54 select OLD_SIGSUSPEND
55 select OLD_SIGACTION
55 56
56config HZ 57config HZ
57 int 58 int
diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c
index e53c1b455c35..090e9c64408b 100644
--- a/arch/cris/arch-v10/kernel/signal.c
+++ b/arch/cris/arch-v10/kernel/signal.c
@@ -41,37 +41,6 @@
41 41
42void do_signal(int canrestart, struct pt_regs *regs); 42void do_signal(int canrestart, struct pt_regs *regs);
43 43
44int sys_sigaction(int sig, const struct old_sigaction __user *act,
45 struct old_sigaction *oact)
46{
47 struct k_sigaction new_ka, old_ka;
48 int ret;
49
50 if (act) {
51 old_sigset_t mask;
52 if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
53 __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
54 __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) ||
55 __get_user(new_ka.sa.sa_flags, &act->sa_flags) ||
56 __get_user(mask, &act->sa_mask))
57 return -EFAULT;
58 siginitset(&new_ka.sa.sa_mask, mask);
59 }
60
61 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
62
63 if (!ret && oact) {
64 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
65 __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
66 __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) ||
67 __put_user(old_ka.sa.sa_flags, &oact->sa_flags) ||
68 __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask))
69 return -EFAULT;
70 }
71
72 return ret;
73}
74
75/* 44/*
76 * Do a signal return; undo the signal stack. 45 * Do a signal return; undo the signal stack.
77 */ 46 */
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c
index 4ccf144b49a9..cee740732d1f 100644
--- a/arch/cris/arch-v32/kernel/signal.c
+++ b/arch/cris/arch-v32/kernel/signal.c
@@ -52,42 +52,6 @@ void do_signal(int restart, struct pt_regs *regs);
52void keep_debug_flags(unsigned long oldccs, unsigned long oldspc, 52void keep_debug_flags(unsigned long oldccs, unsigned long oldspc,
53 struct pt_regs *regs); 53 struct pt_regs *regs);
54 54
55int
56sys_sigaction(int signal, const struct old_sigaction *act,
57 struct old_sigaction *oact)
58{
59 int retval;
60 struct k_sigaction newk;
61 struct k_sigaction oldk;
62
63 if (act) {
64 old_sigset_t mask;
65
66 if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
67 __get_user(newk.sa.sa_handler, &act->sa_handler) ||
68 __get_user(newk.sa.sa_restorer, &act->sa_restorer) ||
69 __get_user(newk.sa.sa_flags, &act->sa_flags) ||
70 __get_user(mask, &act->sa_mask))
71 return -EFAULT;
72
73 siginitset(&newk.sa.sa_mask, mask);
74 }
75
76 retval = do_sigaction(signal, act ? &newk : NULL, oact ? &oldk : NULL);
77
78 if (!retval && oact) {
79 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
80 __put_user(oldk.sa.sa_handler, &oact->sa_handler) ||
81 __put_user(oldk.sa.sa_restorer, &oact->sa_restorer) ||
82 __put_user(oldk.sa.sa_flags, &oact->sa_flags) ||
83 __put_user(oldk.sa.sa_mask.sig[0], &oact->sa_mask))
84 return -EFAULT;
85
86 }
87
88 return retval;
89}
90
91static int 55static int
92restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) 56restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
93{ 57{
diff --git a/arch/cris/include/asm/signal.h b/arch/cris/include/asm/signal.h
index b3650ab2c320..c11b8745cece 100644
--- a/arch/cris/include/asm/signal.h
+++ b/arch/cris/include/asm/signal.h
@@ -16,13 +16,6 @@ typedef struct {
16 unsigned long sig[_NSIG_WORDS]; 16 unsigned long sig[_NSIG_WORDS];
17} sigset_t; 17} sigset_t;
18 18
19struct old_sigaction {
20 __sighandler_t sa_handler;
21 old_sigset_t sa_mask;
22 unsigned long sa_flags;
23 void (*sa_restorer)(void);
24};
25
26#define __ARCH_HAS_SA_RESTORER 19#define __ARCH_HAS_SA_RESTORER
27 20
28#include <asm/sigcontext.h> 21#include <asm/sigcontext.h>