summaryrefslogtreecommitdiffstats
path: root/arch/score
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-23 03:43:28 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 18:16:15 -0500
commitb774cc5cb6b3b53b276bb7d968e3579afc2922c5 (patch)
tree922a12efa04f84d38e5e215fec3fe7d69874facc /arch/score
parent0aa0203fb43f04714004b2c4ad33b858e240555d (diff)
downloadlinux-b774cc5cb6b3b53b276bb7d968e3579afc2922c5.tar.gz
linux-b774cc5cb6b3b53b276bb7d968e3579afc2922c5.tar.bz2
linux-b774cc5cb6b3b53b276bb7d968e3579afc2922c5.zip
score: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/score')
-rw-r--r--arch/score/Kconfig1
-rw-r--r--arch/score/include/asm/syscalls.h1
-rw-r--r--arch/score/kernel/entry.S5
-rw-r--r--arch/score/kernel/signal.c21
4 files changed, 3 insertions, 25 deletions
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index 3b1482e7afac..a125d7207bcc 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -14,6 +14,7 @@ config SCORE
select HAVE_MOD_ARCH_SPECIFIC
select MODULES_USE_ELF_REL
select CLONE_BACKWARDS
+ select GENERIC_SIGALTSTACK
choice
prompt "System type"
diff --git a/arch/score/include/asm/syscalls.h b/arch/score/include/asm/syscalls.h
index acaeed680956..98d1df92fbd1 100644
--- a/arch/score/include/asm/syscalls.h
+++ b/arch/score/include/asm/syscalls.h
@@ -1,7 +1,6 @@
#ifndef _ASM_SCORE_SYSCALLS_H
#define _ASM_SCORE_SYSCALLS_H
-asmlinkage long score_sigaltstack(struct pt_regs *regs);
asmlinkage long score_rt_sigreturn(struct pt_regs *regs);
#include <asm-generic/syscalls.h>
diff --git a/arch/score/kernel/entry.S b/arch/score/kernel/entry.S
index 1557ca1a2951..7234ed09b7b7 100644
--- a/arch/score/kernel/entry.S
+++ b/arch/score/kernel/entry.S
@@ -491,8 +491,3 @@ ENTRY(sys_rt_sigreturn)
mv r4, r0
la r8, score_rt_sigreturn
br r8
-
-ENTRY(sys_sigaltstack)
- mv r4, r0
- la r8, score_sigaltstack
- br r8
diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c
index 02353bde92d8..a00fba32b0eb 100644
--- a/arch/score/kernel/signal.c
+++ b/arch/score/kernel/signal.c
@@ -134,16 +134,6 @@ static void __user *get_sigframe(struct k_sigaction *ka,
}
asmlinkage long
-score_sigaltstack(struct pt_regs *regs)
-{
- const stack_t __user *uss = (const stack_t __user *) regs->regs[4];
- stack_t __user *uoss = (stack_t __user *) regs->regs[5];
- unsigned long usp = regs->regs[0];
-
- return do_sigaltstack(uss, uoss, usp);
-}
-
-asmlinkage long
score_rt_sigreturn(struct pt_regs *regs)
{
struct rt_sigframe __user *frame;
@@ -167,9 +157,7 @@ score_rt_sigreturn(struct pt_regs *regs)
else if (sig)
force_sig(sig, current);
- /* It is more difficult to avoid calling this function than to
- call it and ignore errors. */
- if (do_sigaltstack(&frame->rs_uc.uc_stack, NULL, regs->regs[0]) == -EFAULT)
+ if (restore_altstack(&frame->rs_uc.uc_stack))
goto badframe;
regs->is_syscall = 0;
@@ -209,12 +197,7 @@ static int setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
err |= copy_siginfo_to_user(&frame->rs_info, info);
err |= __put_user(0, &frame->rs_uc.uc_flags);
err |= __put_user(NULL, &frame->rs_uc.uc_link);
- err |= __put_user((void __user *)current->sas_ss_sp,
- &frame->rs_uc.uc_stack.ss_sp);
- err |= __put_user(sas_ss_flags(regs->regs[0]),
- &frame->rs_uc.uc_stack.ss_flags);
- err |= __put_user(current->sas_ss_size,
- &frame->rs_uc.uc_stack.ss_size);
+ err |= __save_altstack(&frame->rs_uc.uc_stack, regs->regs[0]);
err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext);
err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set));