m32r: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
0aa0203fb4
commit
1084f751d4
|
@ -15,6 +15,7 @@ config M32R
|
||||||
select GENERIC_ATOMIC64
|
select GENERIC_ATOMIC64
|
||||||
select ARCH_USES_GETTIMEOFFSET
|
select ARCH_USES_GETTIMEOFFSET
|
||||||
select MODULES_USE_ELF_RELA
|
select MODULES_USE_ELF_RELA
|
||||||
|
select GENERIC_SIGALTSTACK
|
||||||
|
|
||||||
config SBUS
|
config SBUS
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -27,15 +27,6 @@
|
||||||
|
|
||||||
#define DEBUG_SIG 0
|
#define DEBUG_SIG 0
|
||||||
|
|
||||||
asmlinkage int
|
|
||||||
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
|
|
||||||
unsigned long r2, unsigned long r3, unsigned long r4,
|
|
||||||
unsigned long r5, unsigned long r6, struct pt_regs *regs)
|
|
||||||
{
|
|
||||||
return do_sigaltstack(uss, uoss, regs->spu);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do a signal return; undo the signal stack.
|
* Do a signal return; undo the signal stack.
|
||||||
*/
|
*/
|
||||||
|
@ -113,7 +104,7 @@ sys_rt_sigreturn(unsigned long r0, unsigned long r1,
|
||||||
if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &result))
|
if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &result))
|
||||||
goto badframe;
|
goto badframe;
|
||||||
|
|
||||||
if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->spu) == -EFAULT)
|
if (restore_altstack(&frame->uc.uc_stack))
|
||||||
goto badframe;
|
goto badframe;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -213,10 +204,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
/* Create the ucontext. */
|
/* Create the ucontext. */
|
||||||
err |= __put_user(0, &frame->uc.uc_flags);
|
err |= __put_user(0, &frame->uc.uc_flags);
|
||||||
err |= __put_user(0, &frame->uc.uc_link);
|
err |= __put_user(0, &frame->uc.uc_link);
|
||||||
err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
|
err |= __save_altstack(&frame->uc.uc_stack, regs->spu);
|
||||||
err |= __put_user(sas_ss_flags(regs->spu),
|
|
||||||
&frame->uc.uc_stack.ss_flags);
|
|
||||||
err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
|
|
||||||
err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]);
|
err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]);
|
||||||
err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
|
err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
|
||||||
if (err)
|
if (err)
|
||||||
|
|
Loading…
Reference in New Issue