Commit 8735b7d0 authored by Hiroshi Shimamoto's avatar Hiroshi Shimamoto Committed by Ingo Molnar

x86: signal_64: make setup_sigcontext() similar

Impact: cleanup

remove passing task struct.
Signed-off-by: default avatarHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ee7d523c
...@@ -160,8 +160,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) ...@@ -160,8 +160,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
static inline int static inline int
setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate, setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
struct pt_regs *regs, struct pt_regs *regs, unsigned long mask)
unsigned long mask, struct task_struct *me)
{ {
int err = 0; int err = 0;
...@@ -185,13 +184,13 @@ setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate, ...@@ -185,13 +184,13 @@ setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
err |= __put_user(regs->r13, &sc->r13); err |= __put_user(regs->r13, &sc->r13);
err |= __put_user(regs->r14, &sc->r14); err |= __put_user(regs->r14, &sc->r14);
err |= __put_user(regs->r15, &sc->r15); err |= __put_user(regs->r15, &sc->r15);
err |= __put_user(me->thread.trap_no, &sc->trapno); err |= __put_user(current->thread.trap_no, &sc->trapno);
err |= __put_user(me->thread.error_code, &sc->err); err |= __put_user(current->thread.error_code, &sc->err);
err |= __put_user(regs->ip, &sc->ip); err |= __put_user(regs->ip, &sc->ip);
err |= __put_user(regs->flags, &sc->flags); err |= __put_user(regs->flags, &sc->flags);
err |= __put_user(fpstate, &sc->fpstate); err |= __put_user(fpstate, &sc->fpstate);
err |= __put_user(mask, &sc->oldmask); err |= __put_user(mask, &sc->oldmask);
err |= __put_user(me->thread.cr2, &sc->cr2); err |= __put_user(current->thread.cr2, &sc->cr2);
return err; return err;
} }
...@@ -251,8 +250,7 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -251,8 +250,7 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
err |= __put_user(sas_ss_flags(regs->sp), err |= __put_user(sas_ss_flags(regs->sp),
&frame->uc.uc_stack.ss_flags); &frame->uc.uc_stack.ss_flags);
err |= __put_user(me->sas_ss_size, &frame->uc.uc_stack.ss_size); err |= __put_user(me->sas_ss_size, &frame->uc.uc_stack.ss_size);
err |= setup_sigcontext(&frame->uc.uc_mcontext, fp, err |= setup_sigcontext(&frame->uc.uc_mcontext, fp, regs, set->sig[0]);
regs, set->sig[0], me);
err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
/* Set up to return from userspace. If provided, use a stub /* Set up to return from userspace. If provided, use a stub
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment