linux-stable/arch/x86/kernel/fpu
Andy Lutomirski 5ed73f4073 x86/fpu: Fix FNSAVE usage in eagerfpu mode
In eager fpu mode, having deactivated FPU without immediately
reloading some other context is illegal.  Therefore, to recover from
FNSAVE, we can't just deactivate the state -- we need to reload it
if we're not actively context switching.

We had this wrong in fpu__save() and fpu__copy().  Fix both.
__kernel_fpu_begin() was fine -- add a comment.

This fixes a warning triggerable with nofxsr eagerfpu=on.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: yu-cheng yu <yu-cheng.yu@intel.com>
Link: http://lkml.kernel.org/r/60662444e13c76f06e23c15c5dcdba31b4ac3d67.1453675014.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-02-09 15:42:55 +01:00
..
bugs.c x86/fpu/init: Propagate __init annotations 2015-05-19 15:48:11 +02:00
core.c x86/fpu: Fix FNSAVE usage in eagerfpu mode 2016-02-09 15:42:55 +01:00
init.c x86/fpu: Disable AVX when eagerfpu is off 2016-01-12 11:51:21 +01:00
Makefile x86/fpu: Factor out the FPU regset code into fpu/regset.c 2015-05-19 15:48:09 +02:00
regset.c x86/fpu: Rename XSAVE macros 2015-09-14 12:21:46 +02:00
signal.c x86/fpu: Fix 32-bit signal frame handling 2015-11-12 09:23:45 +01:00
xstate.c x86/fpu: Disable MPX when eagerfpu is off 2016-01-12 11:51:21 +01:00