aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/signal_64.c
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-11-05 21:33:35 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-06 02:02:00 -0500
commitee7d523c124a186ce3a886868de9cd1d8bc991f3 (patch)
tree1a28fbfe2b7e3bba1b1c276ce6ca4ed91d68b8d2 /arch/x86/kernel/signal_64.c
parent99ea1b93bf80a287dd70499b96d9c4d06f320ff2 (diff)
x86: signal_64: setup fpstate in setup_sigcontext()
Impact: cleanup set fpstate field of signal context at setup_sigcontext(). Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/signal_64.c')
-rw-r--r--arch/x86/kernel/signal_64.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index cfbb60a5f9d2..97d26fa62ac1 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -159,8 +159,9 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
159 */ 159 */
160 160
161static inline int 161static inline int
162setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, 162setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
163 unsigned long mask, struct task_struct *me) 163 struct pt_regs *regs,
164 unsigned long mask, struct task_struct *me)
164{ 165{
165 int err = 0; 166 int err = 0;
166 167
@@ -188,6 +189,7 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
188 err |= __put_user(me->thread.error_code, &sc->err); 189 err |= __put_user(me->thread.error_code, &sc->err);
189 err |= __put_user(regs->ip, &sc->ip); 190 err |= __put_user(regs->ip, &sc->ip);
190 err |= __put_user(regs->flags, &sc->flags); 191 err |= __put_user(regs->flags, &sc->flags);
192 err |= __put_user(fpstate, &sc->fpstate);
191 err |= __put_user(mask, &sc->oldmask); 193 err |= __put_user(mask, &sc->oldmask);
192 err |= __put_user(me->thread.cr2, &sc->cr2); 194 err |= __put_user(me->thread.cr2, &sc->cr2);
193 195
@@ -249,8 +251,8 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
249 err |= __put_user(sas_ss_flags(regs->sp), 251 err |= __put_user(sas_ss_flags(regs->sp),
250 &frame->uc.uc_stack.ss_flags); 252 &frame->uc.uc_stack.ss_flags);
251 err |= __put_user(me->sas_ss_size, &frame->uc.uc_stack.ss_size); 253 err |= __put_user(me->sas_ss_size, &frame->uc.uc_stack.ss_size);
252 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0], me); 254 err |= setup_sigcontext(&frame->uc.uc_mcontext, fp,
253 err |= __put_user(fp, &frame->uc.uc_mcontext.fpstate); 255 regs, set->sig[0], me);
254 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); 256 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
255 257
256 /* Set up to return from userspace. If provided, use a stub 258 /* Set up to return from userspace. If provided, use a stub