diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-23 03:19:49 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:05 -0500 |
commit | faec5a96a024c1256b289253f3609b4a5f6f3576 (patch) | |
tree | cb05b67ef299935638713a3ccdcbe31d65bfa550 /arch/openrisc/kernel | |
parent | 0aa0203fb43f04714004b2c4ad33b858e240555d (diff) |
openrisc: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/openrisc/kernel')
-rw-r--r-- | arch/openrisc/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/openrisc/kernel/signal.c | 15 |
2 files changed, 2 insertions, 17 deletions
diff --git a/arch/openrisc/kernel/entry.S b/arch/openrisc/kernel/entry.S index 5e5b30601bbf..54afd0a129fe 100644 --- a/arch/openrisc/kernel/entry.S +++ b/arch/openrisc/kernel/entry.S | |||
@@ -1083,10 +1083,6 @@ ENTRY(__sys_fork) | |||
1083 | l.j _fork_save_extra_regs_and_call | 1083 | l.j _fork_save_extra_regs_and_call |
1084 | l.addi r3,r1,0 | 1084 | l.addi r3,r1,0 |
1085 | 1085 | ||
1086 | ENTRY(sys_sigaltstack) | ||
1087 | l.j _sys_sigaltstack | ||
1088 | l.addi r5,r1,0 | ||
1089 | |||
1090 | ENTRY(sys_rt_sigreturn) | 1086 | ENTRY(sys_rt_sigreturn) |
1091 | l.j _sys_rt_sigreturn | 1087 | l.j _sys_rt_sigreturn |
1092 | l.addi r3,r1,0 | 1088 | l.addi r3,r1,0 |
diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c index ddedc8a77861..ae167f7e081a 100644 --- a/arch/openrisc/kernel/signal.c +++ b/arch/openrisc/kernel/signal.c | |||
@@ -33,12 +33,6 @@ | |||
33 | 33 | ||
34 | #define DEBUG_SIG 0 | 34 | #define DEBUG_SIG 0 |
35 | 35 | ||
36 | asmlinkage long | ||
37 | _sys_sigaltstack(const stack_t *uss, stack_t *uoss, struct pt_regs *regs) | ||
38 | { | ||
39 | return do_sigaltstack(uss, uoss, regs->sp); | ||
40 | } | ||
41 | |||
42 | struct rt_sigframe { | 36 | struct rt_sigframe { |
43 | struct siginfo *pinfo; | 37 | struct siginfo *pinfo; |
44 | void *puc; | 38 | void *puc; |
@@ -103,9 +97,7 @@ asmlinkage long _sys_rt_sigreturn(struct pt_regs *regs) | |||
103 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) | 97 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) |
104 | goto badframe; | 98 | goto badframe; |
105 | 99 | ||
106 | /* It is more difficult to avoid calling this function than to | 100 | if (restore_altstack(&frame->uc.uc_stack)) |
107 | call it and ignore errors. */ | ||
108 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->sp) == -EFAULT) | ||
109 | goto badframe; | 101 | goto badframe; |
110 | 102 | ||
111 | return regs->gpr[11]; | 103 | return regs->gpr[11]; |
@@ -205,10 +197,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
205 | err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext)); | 197 | err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext)); |
206 | err |= __put_user(0, &frame->uc.uc_flags); | 198 | err |= __put_user(0, &frame->uc.uc_flags); |
207 | err |= __put_user(NULL, &frame->uc.uc_link); | 199 | err |= __put_user(NULL, &frame->uc.uc_link); |
208 | err |= __put_user((void *)current->sas_ss_sp, | 200 | err |= __save_altstack(&frame->uc.uc_stack, regs->sp); |
209 | &frame->uc.uc_stack.ss_sp); | ||
210 | err |= __put_user(sas_ss_flags(regs->sp), &frame->uc.uc_stack.ss_flags); | ||
211 | err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); | ||
212 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]); | 201 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]); |
213 | 202 | ||
214 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); | 203 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); |