linux-stable/arch/x86/kernel/cpu
Tony Luck 978e1342c3 x86/speculation/swapgs: Check FSGSBASE in enabling SWAPGS mitigation
Before enabling FSGSBASE the kernel could safely assume that the content
of GS base was a user address. Thus any speculative access as the result
of a mispredicted branch controlling the execution of SWAPGS would be to
a user address. So systems with speculation-proof SMAP did not need to
add additional LFENCE instructions to mitigate.

With FSGSBASE enabled a hostile user can set GS base to a kernel address.
So they can make the kernel speculatively access data they wish to leak
via a side channel. This means that SMAP provides no protection.

Add FSGSBASE as an additional condition to enable the fence-based SWAPGS
mitigation.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200528201402.1708239-9-sashal@kernel.org
2020-06-18 15:47:02 +02:00
..
mce x86/mce/dev-mcelog: Fix -Wstringop-truncation warning about strncpy() 2020-06-11 15:19:17 +02:00
microcode x86/microcode: Fix return value for microcode late loading 2020-04-22 19:55:50 +02:00
mtrr x86/tlb: Move __flush_tlb() out of line 2020-04-26 11:00:05 +02:00
resctrl mmap locking API: convert mmap_sem comments 2020-06-09 09:39:14 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
acrn.c x86/entry: Convert various hypervisor vectors to IDTENTRY_SYSVEC 2020-06-11 15:15:15 +02:00
amd.c Misc updates: 2020-06-01 13:57:51 -07:00
aperfmperf.c x86/cpu: Disable frequency requests via aperfmperf IPI for nohz_full CPUs 2019-06-22 17:23:48 +02:00
bugs.c x86/speculation/swapgs: Check FSGSBASE in enabling SWAPGS mitigation 2020-06-18 15:47:02 +02:00
cacheinfo.c x86/cacheinfo: Fix a -Wtype-limits warning 2019-06-19 19:21:32 +02:00
centaur.c x86/cpu: Remove redundant cpu_detect_cache_sizes() call 2020-01-20 16:32:35 +01:00
common.c x86/cpu: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE 2020-06-18 15:46:59 +02:00
cpu.h x86/speculation: Add Special Register Buffer Data Sampling (SRBDS) mitigation 2020-04-20 12:19:22 +02:00
cpuid-deps.c x86/cpufeatures: Enable a new AVX512 CPU feature 2019-07-22 10:38:25 +02:00
cyrix.c x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors 2019-03-21 12:28:50 +01:00
feat_ctl.c x86/cpu: Fix a -Wmissing-prototypes warning for init_ia32_feat_ctl() 2020-03-23 12:01:59 +01:00
hygon.c x86: Remove X86_FEATURE_MFENCE_RDTSC 2019-07-22 12:00:51 +02:00
hypervisor.c x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable 2019-07-17 08:09:59 +02:00
intel.c A set of fixes and updates for x86: 2020-06-11 15:54:31 -07:00
intel_epb.c x86: intel_epb: Do not build when CONFIG_PM is unset 2019-05-30 10:58:36 +02:00
intel_pconfig.c x86/pconfig: Detect PCONFIG targets 2018-03-12 12:10:54 +01:00
Makefile Merge branch 'x86/kdump' into locking/kcsan, to resolve conflicts 2020-03-21 09:24:41 +01:00
match.c x86/cpu: Add a steppings field to struct x86_cpu_id 2020-04-20 12:19:21 +02:00
mkcapflags.sh x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_* 2020-01-13 18:36:02 +01:00
mshyperv.c x86/entry: Convert various hypervisor vectors to IDTENTRY_SYSVEC 2020-06-11 15:15:15 +02:00
perfctr-watchdog.c x86/perf: Add hardware performance events support for Zhaoxin CPU. 2020-04-30 20:14:35 +02:00
powerflags.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc.c x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_* 2020-01-13 18:36:02 +01:00
rdrand.c x86/rdrand: Sanity-check RDRAND output 2019-10-01 19:55:32 +02:00
scattered.c x86/mm/pat: Rename <asm/pat.h> => <asm/memtype.h> 2019-12-10 10:12:55 +01:00
topology.c x86/mm/pat: Rename <asm/pat.h> => <asm/memtype.h> 2019-12-10 10:12:55 +01:00
transmeta.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tsx.c Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 12:46:42 -08:00
umc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
umwait.c x86/cpu: Move prototype for get_umwait_control_msr() to a global location 2020-02-17 19:32:45 +01:00
vmware.c x86/vmware: Use bool type for vmw_sched_clock 2020-03-24 10:29:22 +01:00
zhaoxin.c x86/cpu: Remove redundant cpu_detect_cache_sizes() call 2020-01-20 16:32:35 +01:00