WSL2-Linux-Kernel/arch/x86/kernel/fpu
Yu-cheng Yu b22cbe404a x86/fpu: Fix invalid FPU ptrace state after execve()
Robert O'Callahan reported that after an execve PTRACE_GETREGSET
NT_X86_XSTATE continues to return the pre-exec register values
until the exec'ed task modifies FPU state.

The test code is at:

  https://bugzilla.redhat.com/attachment.cgi?id=1164286.

What is happening is fpu__clear() does not properly clear fpstate.
Fix it by doing just that.

Reported-by: Robert O'Callahan <robert@ocallahan.org>
Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
Cc: <stable@vger.kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi V. Shankar <ravi.v.shankar@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1479402695-6553-1-git-send-email-yu-cheng.yu@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-11-21 10:38:35 +01:00
..
Makefile x86/fpu: Factor out the FPU regset code into fpu/regset.c 2015-05-19 15:48:09 +02:00
bugs.c x86/fpu: Remove check_fpu() indirection 2016-04-13 11:37:43 +02:00
core.c x86/fpu: Fix invalid FPU ptrace state after execve() 2016-11-21 10:38:35 +01:00
init.c x86/asm: Move the thread_info::status field to thread_struct 2016-09-15 08:25:12 +02:00
regset.c x86/fpu/xstate: Fix PTRACE frames for XSAVES 2016-07-10 17:12:10 +02:00
signal.c tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
xstate.c x86/cpufeature: Add AVX512_4VNNIW and AVX512_4FMAPS features 2016-10-19 17:37:13 +02:00