linux/arch/x86/kernel/cpu
Daniel Sneddon 8974eb5882 x86/speculation: Add Gather Data Sampling mitigation
Gather Data Sampling (GDS) is a hardware vulnerability which allows
unprivileged speculative access to data which was previously stored in
vector registers.

Intel processors that support AVX2 and AVX512 have gather instructions
that fetch non-contiguous data elements from memory. On vulnerable
hardware, when a gather instruction is transiently executed and
encounters a fault, stale data from architectural or internal vector
registers may get transiently stored to the destination vector
register allowing an attacker to infer the stale data using typical
side channel techniques like cache timing attacks.

This mitigation is different from many earlier ones for two reasons.
First, it is enabled by default and a bit must be set to *DISABLE* it.
This is the opposite of normal mitigation polarity. This means GDS can
be mitigated simply by updating microcode and leaving the new control
bit alone.

Second, GDS has a "lock" bit. This lock bit is there because the
mitigation affects the hardware security features KeyLocker and SGX.
It needs to be enabled and *STAY* enabled for these features to be
mitigated against GDS.

The mitigation is enabled in the microcode by default. Disable it by
setting gather_data_sampling=off or by disabling all mitigations with
mitigations=off. The mitigation status can be checked by reading:

    /sys/devices/system/cpu/vulnerabilities/gather_data_sampling

Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
2023-07-19 16:45:37 -07:00
..
mce Locking changes for v6.5: 2023-06-27 14:14:30 -07:00
microcode x86/microcode/AMD: Load late on both threads too 2023-06-12 11:02:17 +02:00
mtrr x86/mtrr: Unify debugging printing 2023-06-01 15:04:33 +02:00
resctrl x86/resctrl: Implement rename op for mon groups 2023-06-07 12:40:36 +02:00
sgx - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
.gitignore
acrn.c x86/acrn: Set up timekeeping 2022-08-04 11:11:59 +02:00
amd.c - Add Emerald Rapids to the list of Intel models supporting PPIN 2023-04-25 10:20:52 -07:00
aperfmperf.c x86/aperfmperf: Erase stale arch_freq_scale values when disabling frequency invariance readings 2023-01-16 10:19:15 +01:00
bugs.c x86/speculation: Add Gather Data Sampling mitigation 2023-07-19 16:45:37 -07:00
cacheinfo.c x86/cpu/cacheinfo: Remove cpu_callout_mask dependency 2023-05-15 13:44:52 +02:00
centaur.c
common.c x86/speculation: Add Gather Data Sampling mitigation 2023-07-19 16:45:37 -07:00
cpu.h x86/speculation: Add Gather Data Sampling mitigation 2023-07-19 16:45:37 -07:00
cpuid-deps.c x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag 2023-01-23 17:38:31 +01:00
cyrix.c x86/cyrix: include header linux/isa-dma.h 2022-07-26 14:03:12 -05:00
feat_ctl.c x86/cpu: Include the header of init_ia32_feat_ctl()'s prototype 2022-09-26 17:06:27 +02:00
hygon.c - Split MTRR and PAT init code to accomodate at least Xen PV and TDX 2022-12-13 14:56:56 -08:00
hypervisor.c
intel_epb.c x86/intel_epb: Set Alder Lake N and Raptor Lake P normal EPB 2022-11-03 11:31:01 -07:00
intel_pconfig.c
intel.c modules-6.4-rc1 2023-04-27 16:36:55 -07:00
Makefile x86/cpu: Remove X86_FEATURE_NAMES 2023-05-15 20:03:08 +02:00
match.c
mkcapflags.sh
mshyperv.c - Add the necessary glue so that the kernel can run as a confidential 2023-04-25 10:48:08 -07:00
perfctr-watchdog.c
powerflags.c
proc.c x86/aperfmperf: Integrate the fallback code from show_cpuinfo() 2022-04-27 20:22:20 +02:00
rdrand.c x86/rdrand: Remove "nordrand" flag in favor of "random.trust_cpu" 2022-07-18 15:04:04 +02:00
scattered.c x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag 2023-01-23 17:38:31 +01:00
topology.c x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms 2023-05-25 10:48:42 -07:00
transmeta.c
tsx.c x86/cpu: Remove redundant extern x86_read_arch_cap_msr() 2023-01-10 12:40:24 +01:00
umc.c
umwait.c x86/umwait: move to use bus_get_dev_root() 2023-03-17 15:29:29 +01:00
vmware.c sched/clock/x86: Mark sched_clock() noinstr 2023-01-31 15:01:47 +01:00
vortex.c x86/CPU: Add support for Vortex CPUs 2021-10-21 15:49:07 +02:00
zhaoxin.c