aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-23 02:03:02 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 18:15:51 -0500
commit79d432103c6dc4ed46adc8e1f53d34e8ba7089c0 (patch)
tree3b2d49c98ba809621b17a881828ee3e58966bf93 /arch/blackfin
parent0aa0203fb43f04714004b2c4ad33b858e240555d (diff)
blackfin: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/Kconfig1
-rw-r--r--arch/blackfin/kernel/signal.c12
2 files changed, 3 insertions, 10 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index b6f3ad5441c5..a8a9ca7d40f3 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -45,6 +45,7 @@ config BLACKFIN
45 select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS 45 select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS
46 select HAVE_MOD_ARCH_SPECIFIC 46 select HAVE_MOD_ARCH_SPECIFIC
47 select MODULES_USE_ELF_RELA 47 select MODULES_USE_ELF_RELA
48 select GENERIC_SIGALTSTACK
48 49
49config GENERIC_CSUM 50config GENERIC_CSUM
50 def_bool y 51 def_bool y
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c
index 84b4be05840c..b022af6c48f8 100644
--- a/arch/blackfin/kernel/signal.c
+++ b/arch/blackfin/kernel/signal.c
@@ -37,11 +37,6 @@ struct rt_sigframe {
37 struct ucontext uc; 37 struct ucontext uc;
38}; 38};
39 39
40asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
41{
42 return do_sigaltstack(uss, uoss, rdusp());
43}
44
45static inline int 40static inline int
46rt_restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *pr0) 41rt_restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *pr0)
47{ 42{
@@ -100,7 +95,7 @@ asmlinkage int sys_rt_sigreturn(void)
100 if (rt_restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0)) 95 if (rt_restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0))
101 goto badframe; 96 goto badframe;
102 97
103 if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->usp) == -EFAULT) 98 if (restore_altstack(&frame->uc.uc_stack))
104 goto badframe; 99 goto badframe;
105 100
106 return r0; 101 return r0;
@@ -178,10 +173,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t * info,
178 /* Create the ucontext. */ 173 /* Create the ucontext. */
179 err |= __put_user(0, &frame->uc.uc_flags); 174 err |= __put_user(0, &frame->uc.uc_flags);
180 err |= __put_user(0, &frame->uc.uc_link); 175 err |= __put_user(0, &frame->uc.uc_link);
181 err |= 176 err |= __save_altstack(&frame->uc.uc_stack, rdusp());
182 __put_user((void *)current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
183 err |= __put_user(sas_ss_flags(rdusp()), &frame->uc.uc_stack.ss_flags);
184 err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
185 err |= rt_setup_sigcontext(&frame->uc.uc_mcontext, regs); 177 err |= rt_setup_sigcontext(&frame->uc.uc_mcontext, regs);
186 err |= copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); 178 err |= copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
187 179