android_kernel_oneplus_msm8998/arch/x86/kernel/fpu
Andy Lutomirski 85191ed0a2 x86/fpu: Fix math emulation in eager fpu mode
commit 4ecd16ec7059390b430af34bd8bc3ca2b5dcef9a upstream.

Systems without an FPU are generally old and therefore use lazy FPU
switching. Unsurprisingly, math emulation in eager FPU mode is a
bit buggy. Fix it.

There were two bugs involving kernel code trying to use the FPU
registers in eager mode even if they didn't exist and one BUG_ON()
that was incorrect.

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/b4b8d112436bd6fab866e1b4011131507e8d7fbe.1453675014.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-16 09:54:25 +02:00
..
bugs.c
core.c x86/fpu: Fix math emulation in eager fpu mode 2018-06-16 09:54:25 +02:00
init.c x86/fpu: Hard-disable lazy FPU mode 2018-06-16 09:54:25 +02:00
Makefile
regset.c x86/fpu: Don't let userspace set bogus xcomp_bv 2017-10-05 09:41:47 +02:00
signal.c x86/fpu: Don't let userspace set bogus xcomp_bv 2017-10-05 09:41:47 +02:00
xstate.c x86/fpu: Disable MPX when eagerfpu is off 2018-06-16 09:54:24 +02:00