diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-20 14:24:26 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-19 18:07:41 -0500 |
commit | c40702c49faef05ae324f121d8b3e215244ee152 (patch) | |
tree | b0b2a51b07e944497da5cb48fb461963a3762cad /arch/x86/um/signal.c | |
parent | 9026843952adac5b123c7b8dc961e5c15828d9e1 (diff) |
new helpers: __save_altstack/__compat_save_altstack, switch x86 and um to those
note that they are relying on access_ok() already checked by caller.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/um/signal.c')
-rw-r--r-- | arch/x86/um/signal.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c index bdaa08cfbcf4..71cef48ea5cd 100644 --- a/arch/x86/um/signal.c +++ b/arch/x86/um/signal.c | |||
@@ -342,9 +342,7 @@ static int copy_ucontext_to_user(struct ucontext __user *uc, | |||
342 | { | 342 | { |
343 | int err = 0; | 343 | int err = 0; |
344 | 344 | ||
345 | err |= put_user(current->sas_ss_sp, &uc->uc_stack.ss_sp); | 345 | err |= __save_altstack(&uc->uc_stack, sp); |
346 | err |= put_user(sas_ss_flags(sp), &uc->uc_stack.ss_flags); | ||
347 | err |= put_user(current->sas_ss_size, &uc->uc_stack.ss_size); | ||
348 | err |= copy_sc_to_user(&uc->uc_mcontext, fp, ¤t->thread.regs, 0); | 346 | err |= copy_sc_to_user(&uc->uc_mcontext, fp, ¤t->thread.regs, 0); |
349 | err |= copy_to_user(&uc->uc_sigmask, set, sizeof(*set)); | 347 | err |= copy_to_user(&uc->uc_sigmask, set, sizeof(*set)); |
350 | return err; | 348 | return err; |
@@ -529,10 +527,7 @@ int setup_signal_stack_si(unsigned long stack_top, int sig, | |||
529 | /* Create the ucontext. */ | 527 | /* Create the ucontext. */ |
530 | err |= __put_user(0, &frame->uc.uc_flags); | 528 | err |= __put_user(0, &frame->uc.uc_flags); |
531 | err |= __put_user(0, &frame->uc.uc_link); | 529 | err |= __put_user(0, &frame->uc.uc_link); |
532 | err |= __put_user(me->sas_ss_sp, &frame->uc.uc_stack.ss_sp); | 530 | err |= __save_altstack(&frame->uc.uc_stack, PT_REGS_SP(regs)); |
533 | err |= __put_user(sas_ss_flags(PT_REGS_SP(regs)), | ||
534 | &frame->uc.uc_stack.ss_flags); | ||
535 | err |= __put_user(me->sas_ss_size, &frame->uc.uc_stack.ss_size); | ||
536 | err |= copy_sc_to_user(&frame->uc.uc_mcontext, &frame->fpstate, regs, | 531 | err |= copy_sc_to_user(&frame->uc.uc_mcontext, &frame->fpstate, regs, |
537 | set->sig[0]); | 532 | set->sig[0]); |
538 | err |= __put_user(&frame->fpstate, &frame->uc.uc_mcontext.fpstate); | 533 | err |= __put_user(&frame->fpstate, &frame->uc.uc_mcontext.fpstate); |