WSL2-Linux-Kernel/drivers
Pawan Gupta 2fb08b672e x86/rfds: Mitigate Register File Data Sampling (RFDS)
commit 8076fcde016c9c0e0660543e67bff86cb48a7c9c upstream.

RFDS is a CPU vulnerability that may allow userspace to infer kernel
stale data previously used in floating point registers, vector registers
and integer registers. RFDS only affects certain Intel Atom processors.

Intel released a microcode update that uses VERW instruction to clear
the affected CPU buffers. Unlike MDS, none of the affected cores support
SMT.

Add RFDS bug infrastructure and enable the VERW based mitigation by
default, that clears the affected buffers just before exiting to
userspace. Also add sysfs reporting and cmdline parameter
"reg_file_data_sampling" to control the mitigation.

For details see:
Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst

  [ pawan: - Resolved conflicts in sysfs reporting.
	   - s/ATOM_GRACEMONT/ALDERLAKE_N/ATOM_GRACEMONT is called
	     ALDERLAKE_N in 6.6. ]

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-10 16:18:48 +02:00
..
accessibility speakup: Fix 8bit characters from direct synth 2024-04-10 16:18:40 +02:00
acpi ACPI: CPPC: Use access_width over bit_width for system memory accesses 2024-04-10 16:18:46 +02:00
amba
android
ata ahci: asm1064: asm1166: don't limit reported ports 2024-04-10 16:18:43 +02:00
atm
auxdisplay
base x86/rfds: Mitigate Register File Data Sampling (RFDS) 2024-04-10 16:18:48 +02:00
bcma
block aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts 2024-03-26 18:21:15 -04:00
bluetooth Bluetooth: hci_qca: don't use IS_ERR_OR_NULL() with gpiod_get_optional() 2024-03-26 18:21:22 -04:00
bus bus: tegra-aconnect: Update dependency to ARCH_TEGRA 2024-03-26 18:21:19 -04:00
cdrom
char
clk clk: qcom: mmcc-msm8974: fix terminating of frequency table arrays 2024-04-10 16:18:37 +02:00
clocksource clocksource/drivers/arm_global_timer: Fix maximum prescaler value 2024-04-10 16:18:46 +02:00
comedi comedi: comedi_test: Prevent timers rescheduling during deletion 2024-03-26 18:21:34 -04:00
connector
counter
cpufreq cpufreq: brcmstb-avs-cpufreq: fix up "add check for cpufreq_cpu_get's return value" 2024-04-10 16:18:44 +02:00
cpuidle
crypto crypto: qat - resolve race condition during AER recovery 2024-04-10 16:18:35 +02:00
cxl
dax
dca
devfreq
dio
dma dmaengine: tegra210-adma: Update dependency to ARCH_TEGRA 2024-03-26 18:21:25 -04:00
dma-buf
edac
eisa
extcon
firewire firewire: core: use long bus reset on gap count error 2024-03-26 18:21:13 -04:00
firmware
fpga
fsi
gnss
gpio gpio: fix resource unwinding order in error path 2024-03-06 14:38:50 +00:00
gpu drm/i915: Check before removing mm notifier 2024-04-10 16:18:45 +02:00
greybus
hid HID: amd_sfh: Update HPD sensor structure elements 2024-03-26 18:21:30 -04:00
hsi
hv
hwmon hwmon: (amc6821) add of_match table 2024-04-10 16:18:40 +02:00
hwspinlock
hwtracing
i2c i2c: i801: Avoid potential double call to gpiod_remove_lookup_table 2024-04-10 16:18:46 +02:00
i3c
idle
iio
infiniband RDMA/rtrs-clt: Check strnlen return len in sysfs mpath_policy_store() 2024-03-26 18:21:33 -04:00
input Input: gpio_keys_polled - suppress deferred probe error for gpio 2024-03-26 18:21:13 -04:00
interconnect Revert "interconnect: Teach lockdep about icc_bw_lock order" 2024-03-06 14:38:50 +00:00
iommu iommu/dma: Force swiotlb_max_mapping_size on an untrusted device 2024-04-10 16:18:47 +02:00
ipack
irqchip
isdn
leds leds: sgm3140: Add missing timer cleanup and flash gpio control 2024-03-26 18:21:31 -04:00
macintosh
mailbox
mcb
md dm snapshot: fix lockup in dm_exception_table_exit 2024-04-10 16:18:44 +02:00
media media: xc4000: Fix atomicity violation in xc4000_get_frequency 2024-04-10 16:18:34 +02:00
memory
memstick
message
mfd mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref 2024-03-26 18:21:29 -04:00
misc mei: me: add arrow lake point H DID 2024-04-10 16:18:46 +02:00
mmc mmc: core: Fix switch on gp3 partition 2024-04-10 16:18:39 +02:00
most
mtd mtd: rawnand: meson: fix scrambling mode value in command macro 2024-04-10 16:18:36 +02:00
mux
net net: ravb: Add R-Car Gen4 support 2024-04-10 16:18:44 +02:00
nfc
ntb NTB: fix possible name leak in ntb_register_device() 2024-03-26 18:21:28 -04:00
nubus
nvdimm
nvme
nvmem nvmem: meson-efuse: fix function pointer type mismatch 2024-04-10 16:18:40 +02:00
of
opp OPP: debugfs: Fix warning around icc_get_name() 2024-03-26 18:21:23 -04:00
parisc
parport
pci PCI: dwc: endpoint: Fix advertised resizable BAR size 2024-04-10 16:18:41 +02:00
pcmcia
perf
phy phy: tegra: xusb: Add API to retrieve the port number of phy 2024-04-10 16:18:40 +02:00
pinctrl pinctrl: mediatek: Drop bogus slew rate register range for MT8192 2024-03-26 18:21:26 -04:00
platform
pnp
power
powercap
pps
ps3
ptp
pwm pwm: sti: Fix capture for st,pwm-num-chan < st,capture-num-chan 2024-03-26 18:21:18 -04:00
rapidio
ras
regulator
remoteproc remoteproc: stm32: fix incorrect optional pointers 2024-03-26 18:21:37 -04:00
reset
rpmsg
rtc rtc: mt6397: select IRQ_DOMAIN instead of depending on it 2024-03-26 18:21:34 -04:00
s390 s390/zcrypt: fix reference counting on zcrypt card objects 2024-04-10 16:18:42 +02:00
sbus
scsi scsi: bfa: Fix function pointer type mismatch for hcb_qe->cbfn 2024-03-26 18:21:33 -04:00
sh
siox
slimbus slimbus: core: Remove usage of the deprecated ida_simple_xx() API 2024-04-10 16:18:40 +02:00
soc soc: fsl: qbman: Use raw spinlock for cgr_lock 2024-04-10 16:18:42 +02:00
soundwire
spi spi: spi-mt65xx: Fix NULL pointer access in interrupt handler 2024-03-26 18:21:37 -04:00
spmi
ssb
staging media: staging: ipu3-imgu: Set fields before media_entity_pads_init() 2024-04-10 16:18:33 +02:00
target
tc
tee tee: optee: Fix kernel panic caused by incorrect error handling 2024-04-10 16:18:46 +02:00
thermal
thunderbolt
tty tty: serial: imx: Fix broken RS485 2024-04-10 16:18:47 +02:00
uio
usb usb: port: Don't try to peer unused USB ports based on location 2024-04-10 16:18:45 +02:00
vdpa vdpa/mlx5: Allow CVQ size changes 2024-03-26 18:21:36 -04:00
vfio vfio/platform: Disable virqfds on cleanup 2024-04-10 16:18:41 +02:00
vhost
video backlight: lp8788: Fully initialize backlight_properties during probe 2024-03-26 18:21:31 -04:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog watchdog: stm32_iwdg: initialize default timeout 2024-03-26 18:21:33 -04:00
xen xen/events: close evtchn after mapping cleanup 2024-04-10 16:18:46 +02:00
zorro
Kconfig
Makefile