1
0
Fork 0
alistair23-linux/arch
Petteri Aimonen c4db485dd3 x86/fpu: Reset MXCSR to default in kernel_fpu_begin()
[ Upstream commit 7ad816762f ]

Previously, kernel floating point code would run with the MXCSR control
register value last set by userland code by the thread that was active
on the CPU core just before kernel call. This could affect calculation
results if rounding mode was changed, or a crash if a FPU/SIMD exception
was unmasked.

Restore MXCSR to the kernel's default value.

 [ bp: Carve out from a bigger patch by Petteri, add feature check, add
   FNINIT call too (amluto). ]

Signed-off-by: Petteri Aimonen <jpa@git.mail.kapsi.fi>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=207979
Link: https://lkml.kernel.org/r/20200624114646.28953-2-bp@alien8.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-22 09:32:51 +02:00
..
alpha alpha: fix memory barriers so that they conform to the specification 2020-06-22 09:31:21 +02:00
arc ARC: elf: use right ELF_ARCH 2020-07-16 08:16:46 +02:00
arm arm64: Introduce a way to disable the 32bit vdso 2020-07-22 09:32:50 +02:00
arm64 arm64: arch_timer: Allow an workaround descriptor to disable compat vdso 2020-07-22 09:32:50 +02:00
c6x mm: consolidate pgtable_cache_init() and pgd_cache_init() 2019-09-24 15:54:09 -07:00
csky csky: Fixup abiv2 syscall_trace break a4 & a5 2020-06-17 16:40:21 +02:00
h8300 mm: consolidate pgtable_cache_init() and pgd_cache_init() 2019-09-24 15:54:09 -07:00
hexagon hexagon: define ioremap_uc 2020-05-10 10:31:31 +02:00
ia64 mm/memory_hotplug: shrink zones when offlining memory 2020-01-09 10:19:56 +01:00
m68k m68k/PCI: Fix a memory leak in an error handling path 2020-06-24 17:50:16 +02:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:37:02 +01:00
mips MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen 2020-07-09 09:37:56 +02:00
nds32 asm-generic/nds32: don't redefine cacheflush primitives 2020-01-17 19:48:43 +01:00
nios2 nios2 update for v5.4-rc1 2019-09-27 13:02:19 -07:00
openrisc openrisc: Fix issue with argument clobbering for clone/fork 2020-06-24 17:50:37 +02:00
parisc parisc: Fix kernel panic in mem_init() 2020-06-03 08:21:28 +02:00
powerpc powerpc/kvm/book3s64: Fix kernel crash with nested kvm & DEBUG_VIRTUAL 2020-07-16 08:16:35 +02:00
riscv RISC-V: Don't allow write+exec only page mapping request in mmap 2020-06-30 15:37:06 -04:00
s390 s390/maccess: add no DAT mode to kernel_write 2020-07-16 08:16:48 +02:00
sh pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs 2020-02-24 08:36:41 +01:00
sparc fix a braino in "sparc32: fix register window handling in genregs32_[gs]et()" 2020-06-30 15:36:47 -04:00
um um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/ 2020-05-02 08:48:53 +02:00
unicore32 mm: treewide: clarify pgtable_page_{ctor,dtor}() naming 2019-09-26 10:10:44 -07:00
x86 x86/fpu: Reset MXCSR to default in kernel_fpu_begin() 2020-07-22 09:32:51 +02:00
xtensa xtensa: Implement copy_thread_tls 2020-01-14 20:08:35 +01:00
.gitignore
Kconfig asm-generic/tlb: add missing CONFIG symbol 2020-02-24 08:37:02 +01:00