linux/arch/x86
Thomas Gleixner 822ef687a0 x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS
commit f36cf386e3 upstream.

Intel provided the following information:

 On all current Atom processors, instructions that use a segment register
 value (e.g. a load or store) will not speculatively execute before the
 last writer of that segment retires. Thus they will not use a
 speculatively written segment value.

That means on ATOMs there is no speculation through SWAPGS, so the SWAPGS
entry paths can be excluded from the extra LFENCE if PTI is disabled.

Create a separate bug flag for the through SWAPGS speculation and mark all
out-of-order ATOMs and AMD/HYGON CPUs as not affected. The in-order ATOMs
are excluded from the whole mitigation mess anyway.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
[bwh: Backported to 3.16:
 - There's no whitelist entry (or any support) for Hygon CPUs
 - Use the next available X86_BUG number
 - Adjust context, indentation]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-08-13 12:39:22 +01:00
..
boot x86/cpufeature: Carve out X86_FEATURE_* 2019-05-22 23:15:08 +01:00
configs USB: remove CONFIG_USB_DEBUG from defconfig files 2014-05-28 09:40:45 -07:00
crypto x86/cpufeature: Carve out X86_FEATURE_* 2019-05-22 23:15:08 +01:00
ia32 x86/speculation/mds: Clear CPU buffers on exit to user 2019-05-22 23:15:22 +01:00
include x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS 2019-08-13 12:39:22 +01:00
kernel x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS 2019-08-13 12:39:22 +01:00
kvm kvm: mmu: Fix overflow on kvm mmu page limit calculation 2019-08-13 12:39:08 +01:00
lguest asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
lib x86/cpufeature: Carve out X86_FEATURE_* 2019-05-22 23:15:08 +01:00
math-emu x86/ldt: Further fix FPU emulation 2015-09-03 13:29:55 +01:00
mm x86/speculation: Support 'mitigations=' cmdline option 2019-05-22 23:15:26 +01:00
net bpf, x64: fix memleak when not converging after image 2018-10-21 08:45:51 +01:00
oprofile x86/cpufeature: Carve out X86_FEATURE_* 2019-05-22 23:15:08 +01:00
pci x86/PCI: Fix Broadcom CNB20LE unintended sign extension (redux) 2019-04-04 16:13:40 +01:00
platform x86/platform/uv: Include clocksource.h for clocksource_touch_watchdog() 2018-02-13 18:42:35 +00:00
power x86/power/64: Fix kernel text mapping corruption during image restoration 2016-08-22 22:38:25 +01:00
realmode x86/build: Supress realmode.bin is up to date message 2014-04-16 15:17:24 +02:00
syscalls seccomp: add "seccomp" syscall 2018-09-25 23:47:34 +01:00
tools x86/tools: Fix gcc-7 warning in relocs.c 2018-10-03 04:10:07 +01:00
um x86/cpufeature: Carve out X86_FEATURE_* 2019-05-22 23:15:08 +01:00
vdso x86/cpufeature: Carve out X86_FEATURE_* 2019-05-22 23:15:08 +01:00
video x86: Use vga_default_device() when determining whether an fb is primary 2012-04-24 09:50:17 +01:00
xen tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all} 2018-10-21 08:46:06 +01:00
.gitignore x86/kprobes: Add arch/x86/tools/insn_sanity to .gitignore 2012-01-16 08:21:59 +01:00
Kbuild x86, realmode: realmode.bin infrastructure 2012-05-08 11:41:48 -07:00
Kconfig x86/Kconfig: Select SCHED_SMT if SMP enabled 2019-05-22 23:15:13 +01:00
Kconfig.cpu Merge branch 'x86-nuke-platforms-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-02 13:15:58 -07:00
Kconfig.debug x86/efi: Dump the EFI page table 2014-03-04 16:17:17 +00:00
Makefile x86/retpoline: Remove compile time warning 2018-03-19 18:59:08 +00:00
Makefile.um um: fix linker script generation 2012-04-09 13:59:00 -04:00
Makefile_32.cpu x86, 386 removal: Remove CONFIG_M386 from Kconfig 2012-11-29 13:23:01 -08:00