linux-stable/drivers
Mark Gross 9ecf57e4aa x86/speculation: Add Special Register Buffer Data Sampling (SRBDS) mitigation
commit 7e5b3c267d upstream

SRBDS is an MDS-like speculative side channel that can leak bits from the
random number generator (RNG) across cores and threads. New microcode
serializes the processor access during the execution of RDRAND and
RDSEED. This ensures that the shared buffer is overwritten before it is
released for reuse.

While it is present on all affected CPU models, the microcode mitigation
is not needed on models that enumerate ARCH_CAPABILITIES[MDS_NO] in the
cases where TSX is not supported or has been disabled with TSX_CTRL.

The mitigation is activated by default on affected processors and it
increases latency for RDRAND and RDSEED instructions. Among other
effects this will reduce throughput from /dev/urandom.

* Enable administrator to configure the mitigation off when desired using
  either mitigations=off or srbds=off.

* Export vulnerability status via sysfs

* Rename file-scoped macros to apply for non-whitelist table initializations.

 [ bp: Massage,
   - s/VULNBL_INTEL_STEPPING/VULNBL_INTEL_STEPPINGS/g,
   - do not read arch cap MSR a second time in tsx_fused_off() - just pass it in,
   - flip check in cpu_set_bug_bits() to save an indentation level,
   - reflow comments.
   jpoimboe: s/Mitigated/Mitigation/ in user-visible strings
   tglx: Dropped the fused off magic for now
 ]

Signed-off-by: Mark Gross <mgross@linux.intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Tested-by: Neelima Krishnan <neelima.krishnan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-11 09:23:01 +02:00
..
accessibility
acpi PM: ACPI: Output correct message on target power state 2020-05-05 19:15:50 +02:00
amba
android binder: take read mode of mmap_sem in binder_alloc_free_page() 2020-05-02 17:24:39 +02:00
ata libata: Return correct status in sata_pmp_eh_recover_pm() when ATA_DFLAG_DETACH is set 2020-04-24 08:00:45 +02:00
atm fore200e: Fix incorrect checks of NULL pointer dereference 2020-02-28 16:36:00 +01:00
auxdisplay
base x86/speculation: Add Special Register Buffer Data Sampling (SRBDS) mitigation 2020-06-11 09:23:01 +02:00
bcma bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA 2020-01-27 14:46:45 +01:00
block virtio-blk: handle block_device_operations callbacks after hot unplug 2020-05-20 08:17:05 +02:00
bluetooth Bluetooth: btusb: fix PM leak in error case of setup 2020-01-09 10:17:57 +01:00
bus bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads 2020-04-24 08:00:23 +02:00
cdrom cdrom: respect device capabilities during opening action 2020-01-04 13:59:52 +01:00
char ipmi: Fix NULL pointer dereference in ssif_probe 2020-05-20 08:17:08 +02:00
clk clk: rockchip: fix incorrect configuration of rk3228 aclk_gpu* clocks 2020-05-20 08:17:16 +02:00
clocksource clocksource/drivers/bcm2835_timer: Fix memory leak of timer 2020-02-28 16:35:57 +01:00
connector
cpufreq cpufreq: intel_pstate: Only mention the BIOS disabling turbo mode once 2020-05-20 08:17:06 +02:00
cpuidle cpuidle: Do not unset the driver if it is there already 2019-12-17 20:39:33 +01:00
crypto crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static 2020-05-02 17:24:12 +02:00
dax
dca
devfreq Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" 2020-03-11 18:02:50 +01:00
dio
dma dmaengine: tegra210-adma: Fix an error handling path in 'tegra_adma_probe()' 2020-05-27 16:43:07 +02:00
dma-buf dma-buf: Fix memory leak in sync_file_merge() 2019-12-21 10:47:50 +01:00
edac EDAC/amd64: Set grain per DIMM 2020-03-11 18:02:56 +01:00
eisa
extcon extcon: sm5502: Reset registers during initialization 2019-12-31 12:37:06 +01:00
firewire net: add annotations on hh->hh_len lockless accesses 2020-01-09 10:17:59 +01:00
firmware efi/x86: Ignore the memory attributes table on i386 2020-04-24 08:00:28 +02:00
fmc
fpga
fsi fsi: core: Fix small accesses and unaligned offsets via sysfs 2019-12-31 12:37:35 +01:00
gpio gpio: exar: Fix bad handling for ida_simple_get error path 2020-06-03 08:17:59 +02:00
gpu drm/qxl: lost qxl_bo_kunmap_atomic_page in qxl_image_init_helper() 2020-05-20 08:17:07 +02:00
hid HID: i2c-hid: add Schneider SCL142ALM to descriptor override 2020-06-11 09:22:58 +02:00
hsi
hv hv_balloon: Balloon up according to request page number 2020-02-14 16:32:12 -05:00
hwmon hwmon: (da9052) Synchronize access with mfd 2020-05-20 08:17:09 +02:00
hwspinlock
hwtracing intel_th: pci: Add Elkhart Lake CPU support 2020-04-02 16:34:18 +02:00
i2c i2c: altera: Fix race between xfer_msg and isr thread 2020-06-11 09:22:56 +02:00
ide ide: serverworks: potential overflow in svwks_set_pio_mode() 2020-02-28 16:36:05 +01:00
idle
iio iio: adc: stm32-adc: fix device used to request dma 2020-05-27 16:43:13 +02:00
infiniband RDMA/pvrdma: Fix missing pci disable in pvrdma_pci_probe() 2020-06-03 08:18:00 +02:00
input Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() 2020-06-03 08:17:57 +02:00
iommu iommu: Fix reference count leak in iommu_group_alloc. 2020-06-03 08:18:03 +02:00
ipack
irqchip irqchip/mbigen: Free msi_desc on device teardown 2020-04-24 08:01:01 +02:00
isdn
leds leds: pca963x: Fix open-drain initialization 2020-02-28 16:35:55 +01:00
lightnvm lightnvm: pblk: fix lock order in pblk_rb_tear_down_check 2020-01-27 14:46:32 +01:00
macintosh
mailbox
mcb
md dm verity fec: fix hash block number in verity_fec_decode 2020-05-05 19:15:50 +02:00
media media: fdp1: Fix R-Car M3-N naming in debug message 2020-05-27 16:43:09 +02:00
memory
memstick
message scsi: mptfusion: Fix double fetch bug in ioctl 2020-01-23 08:20:31 +01:00
mfd mfd: dln2: Fix sanity checking for endpoints 2020-04-24 08:00:52 +02:00
misc mei: release me_cl object reference 2020-05-27 16:43:11 +02:00
mmc mmc: block: Fix use-after-free issue for rpmb 2020-06-03 08:18:00 +02:00
mtd ubi: Fix seq_file usage in detailed_erase_block_info debugfs file 2020-05-27 16:42:53 +02:00
mux
net net: usb: qmi_wwan: add Telit LE910C1-EUX composition 2020-06-11 09:22:59 +02:00
nfc NFC: st21nfca: add missed kfree_skb() in an error path 2020-06-11 09:22:59 +02:00
ntb NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks 2020-01-27 14:46:05 +01:00
nubus
nvdimm libnvdimm: Fix endian conversion issues 2020-06-11 09:22:55 +02:00
nvme nvme-fc: Revert "add module to ops template to allow module references" 2020-04-24 08:00:36 +02:00
nvmem nvmem: qfprom: remove incorrect write support 2020-06-11 09:23:01 +02:00
of of: unittest: kmemleak in of_unittest_platform_populate() 2020-04-24 08:01:17 +02:00
oprofile
parisc
parport parport: load lowlevel driver if ports not found 2019-12-31 12:37:39 +01:00
pci PCI/ASPM: Allow re-enabling Clock PM 2020-05-02 17:24:15 +02:00
pcmcia
perf drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer 2020-04-02 16:34:14 +02:00
phy phy: qualcomm: Adjust indentation in read_poll_timeout 2020-02-14 16:32:17 -05:00
pinctrl pinctrl: cherryview: Add missing spinlock usage in chv_gpio_irq_handler 2020-05-20 08:17:08 +02:00
platform platform/x86: asus-nb-wmi: Do not load on Asus T100TA and T200TA 2020-05-27 16:43:03 +02:00
pnp
power power: supply: bq27xxx_battery: Silence deferred-probe error 2020-04-24 08:01:18 +02:00
powercap
pps
ps3
ptp ptp: free ptp device pin descriptors properly 2020-01-23 08:20:35 +01:00
pwm pwm: bcm2835: Dynamically allocate base 2020-05-02 17:24:15 +02:00
rapidio rapidio: fix an error in get_user_pages_fast() error handling 2020-05-27 16:43:12 +02:00
ras
regulator regulator: rk808: Lower log level on optional GPIOs being not available 2020-02-28 16:35:59 +01:00
remoteproc remoteproc: Fix wrong rvring index computation 2020-05-02 17:24:39 +02:00
reset
rpmsg rpmsg: glink: smem: Ensure ordering during tx 2020-04-24 08:01:06 +02:00
rtc rtc: 88pm860x: fix possible race condition 2020-04-24 08:01:18 +02:00
s390 scsi: zfcp: fix request object use-after-free in send path causing wrong traces 2020-06-03 08:18:13 +02:00
sbus
scsi scsi: ufs: Release clock if DMA map fails 2020-06-11 09:22:58 +02:00
sfi
sh
sn
soc soc: imx: gpc: fix power up sequencing 2020-04-24 08:01:18 +02:00
spi spi: dw: use "smp_mb()" to avoid sending spi data error 2020-06-11 09:22:55 +02:00
spmi
ssb
staging staging: rtl8712: Fix IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 2020-06-11 09:23:00 +02:00
target scsi: target/iblock: fix WRITE SAME zeroing 2020-05-05 19:15:52 +02:00
tc
tee tee: optee: Fix compilation issue with nommu 2020-02-05 14:18:24 +00:00
thermal thermal: cpu_cooling: Actually trace CPU load in thermal_power_cpu_get_power 2020-01-27 14:46:34 +01:00
thunderbolt thunderbolt: Prevent crash if non-active NVMem file is read 2020-02-28 16:36:09 +01:00
tty tty: hvc_console, fix crashes on parallel open/close 2020-06-11 09:23:00 +02:00
uio uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol() 2020-02-28 16:35:57 +01:00
usb CDC-ACM: heed quirk also in error handling 2020-06-11 09:23:00 +02:00
uwb
vfio vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn() 2020-05-05 19:15:51 +02:00
vhost vhost/vsock: fix packet delivery order to monitoring devices 2020-05-27 16:42:56 +02:00
video fbdev: potential information leak in do_fb_ioctl() 2020-04-24 08:01:23 +02:00
virt
virtio virtio_balloon: prevent pfn array overflow 2020-02-28 16:36:09 +01:00
vlynq
vme vme: bridges: reduce stack usage 2020-02-28 16:36:04 +01:00
w1
watchdog watchdog: Fix the race between the release of watchdog_core_data and cdev 2020-05-27 16:42:50 +02:00
xen xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status 2020-05-02 17:24:44 +02:00
zorro
Kconfig
Makefile