aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-23 02:07:30 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 18:15:52 -0500
commitd970e42897525adc836207b44ef64347e59d613e (patch)
tree3293ef9b4c11fc48345cd7a0c316c881acd9c910 /arch/cris
parent0aa0203fb43f04714004b2c4ad33b858e240555d (diff)
cris: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/cris')
-rw-r--r--arch/cris/Kconfig1
-rw-r--r--arch/cris/arch-v10/kernel/signal.c8
-rw-r--r--arch/cris/arch-v32/kernel/signal.c8
3 files changed, 3 insertions, 14 deletions
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index c59a01dd9c0c..22d470276408 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -50,6 +50,7 @@ config CRIS
50 select GENERIC_CMOS_UPDATE 50 select GENERIC_CMOS_UPDATE
51 select MODULES_USE_ELF_RELA 51 select MODULES_USE_ELF_RELA
52 select CLONE_BACKWARDS2 52 select CLONE_BACKWARDS2
53 select GENERIC_SIGALTSTACK
53 54
54config HZ 55config HZ
55 int 56 int
diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c
index 0bb477c13a4e..187237f655e6 100644
--- a/arch/cris/arch-v10/kernel/signal.c
+++ b/arch/cris/arch-v10/kernel/signal.c
@@ -84,12 +84,6 @@ int sys_sigaction(int sig, const struct old_sigaction __user *act,
84 return ret; 84 return ret;
85} 85}
86 86
87int sys_sigaltstack(const stack_t *uss, stack_t __user *uoss)
88{
89 return do_sigaltstack(uss, uoss, rdusp());
90}
91
92
93/* 87/*
94 * Do a signal return; undo the signal stack. 88 * Do a signal return; undo the signal stack.
95 */ 89 */
@@ -214,7 +208,7 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13,
214 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) 208 if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
215 goto badframe; 209 goto badframe;
216 210
217 if (do_sigaltstack(&frame->uc.uc_stack, NULL, rdusp()) == -EFAULT) 211 if (restore_altstack(&frame->uc.uc_stack))
218 goto badframe; 212 goto badframe;
219 213
220 return regs->r10; 214 return regs->r10;
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c
index b60d1b65a426..168b6958e2b8 100644
--- a/arch/cris/arch-v32/kernel/signal.c
+++ b/arch/cris/arch-v32/kernel/signal.c
@@ -99,12 +99,6 @@ sys_sigaction(int signal, const struct old_sigaction *act,
99 return retval; 99 return retval;
100} 100}
101 101
102int
103sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
104{
105 return do_sigaltstack(uss, uoss, rdusp());
106}
107
108static int 102static int
109restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) 103restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
110{ 104{
@@ -209,7 +203,7 @@ sys_rt_sigreturn(long r10, long r11, long r12, long r13, long mof, long srp,
209 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) 203 if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
210 goto badframe; 204 goto badframe;
211 205
212 if (do_sigaltstack(&frame->uc.uc_stack, NULL, rdusp()) == -EFAULT) 206 if (restore_altstack(&frame->uc.uc_stack))
213 goto badframe; 207 goto badframe;
214 208
215 keep_debug_flags(oldccs, oldspc, regs); 209 keep_debug_flags(oldccs, oldspc, regs);