From 02cd44f6d4ad54cb5111ce280f8097c36a70c96e Mon Sep 17 00:00:00 2001 From: kib Date: Sat, 21 Jul 2012 21:39:02 +0000 Subject: [PATCH] MFamd64 r238669: Force clean FPU state in PCB user FPU save area for PT_I386_{GET,SET}XMMREGS. Reported by: bde MFC after: 1 week --- sys/i386/i386/ptrace_machdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/i386/i386/ptrace_machdep.c b/sys/i386/i386/ptrace_machdep.c index 4608c9b939d4..5965a694c6c4 100644 --- a/sys/i386/i386/ptrace_machdep.c +++ b/sys/i386/i386/ptrace_machdep.c @@ -54,10 +54,12 @@ cpu_ptrace(struct thread *td, int req, void *addr, int data) fpstate = &td->td_pcb->pcb_user_save.sv_xmm; switch (req) { case PT_GETXMMREGS: + npxgetregs(td); error = copyout(fpstate, addr, sizeof(*fpstate)); break; case PT_SETXMMREGS: + npxgetregs(td); error = copyin(addr, fpstate, sizeof(*fpstate)); fpstate->sv_env.en_mxcsr &= cpu_mxcsr_mask; break;