linux-stable/drivers
Daniel Sneddon 348a89e201 x86/speculation: Add Gather Data Sampling mitigation
commit 8974eb5882 upstream

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>
Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-08 19:58:32 +02:00
..
accessibility
acpi ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily 2023-08-03 10:22:46 +02:00
amba
android
ata ata: pata_ns87415: mark ns87560_tf_read static 2023-08-03 10:22:39 +02:00
atm
auxdisplay
base x86/speculation: Add Gather Data Sampling mitigation 2023-08-08 19:58:32 +02:00
bcma
block rbd: retrieve and check lock owner twice before blocklisting 2023-08-03 10:22:46 +02:00
bluetooth
bus
cdrom
char tpm_tis: Explicitly check for error code 2023-08-03 10:22:44 +02:00
clk
clocksource
comedi
connector
counter
cpufreq cpufreq: intel_pstate: Drop ACPI _PSS states table patching 2023-08-03 10:22:47 +02:00
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio gpio: mvebu: fix irq domain leak 2023-08-03 10:22:26 +02:00
gpu drm/amd: Fix an error handling mistake in psp_sw_init() 2023-08-03 10:22:39 +02:00
greybus
hid
hsi
hv
hwmon hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled 2023-08-03 10:22:44 +02:00
hwspinlock
hwtracing
i2c i2c: nomadik: Remove a useless call in the remove function 2023-08-03 10:22:27 +02:00
i3c
idle
iio
infiniband RDMA/irdma: Report correct WC error 2023-08-03 10:22:39 +02:00
input
interconnect
iommu
ipack
irqchip irqchip/gic-v4.1: Properly lock VPEs when doing a directLPI invalidation 2023-08-03 10:22:45 +02:00
isdn
leds
macintosh
mailbox
mcb
md dm cache policy smq: ensure IO doesn't prevent cleaner policy progress 2023-08-03 10:22:46 +02:00
media
memory
memstick
message
mfd
misc
mmc
most
mtd
mux
net virtio-net: fix race between set queues and probe 2023-08-03 10:22:45 +02:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
parisc
parport
pci PCI: rockchip: Don't advertise MSI-X in PCIe capabilities 2023-08-03 10:22:28 +02:00
pcmcia
perf
phy phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe() 2023-08-03 10:22:34 +02:00
pinctrl pinctrl: amd: Use amd_pinconf_set() for all config options 2023-07-27 08:46:59 +02:00
platform platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100 2023-08-03 10:22:35 +02:00
pnp
power
powercap
pps
ps3
ptp
pwm pwm: meson: fix handling of period/duty if greater than UINT_MAX 2023-08-03 10:22:30 +02:00
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 s390/dasd: fix hanging device after quiesce/resume 2023-08-03 10:22:45 +02:00
sbus
scsi scsi: qla2xxx: Fix hang in task management 2023-08-03 10:22:32 +02:00
sh
siox
slimbus
soc
soundwire soundwire: qcom: update status correctly with mask 2023-08-03 10:22:33 +02:00
spi spi: bcm63xx: fix max prepend length 2023-07-27 08:46:58 +02:00
spmi
ssb
staging staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext() 2023-08-03 10:22:43 +02:00
target
tc
tee
thermal
thunderbolt
tty tty: n_gsm: fix UAF in gsm_cleanup_mux 2023-08-03 10:22:43 +02:00
uio
usb Revert "xhci: add quirk for host controllers that don't update endpoint DCS" 2023-08-03 10:22:43 +02:00
vdpa
vfio
vhost
video fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe 2023-07-27 08:47:02 +02:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile