x86/speculation/mmio: Reuse SRBDS mitigation for SBDS
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>
Fri, 20 May 2022 03:34:14 +0000 (20:34 -0700)
committerBorislav Petkov <bp@suse.de>
Sat, 21 May 2022 10:37:25 +0000 (12:37 +0200)
commita992b8a4682f119ae035a01b40d4d0665c4a2875
treef9fbf2eab4feff29a5eb5386732250a522dbec5a
parent22cac9c677c95f3ac5c9244f8ca0afdc7c8afb19
x86/speculation/mmio: Reuse SRBDS mitigation for SBDS

The Shared Buffers Data Sampling (SBDS) variant of Processor MMIO Stale
Data vulnerabilities may expose RDRAND, RDSEED and SGX EGETKEY data.
Mitigation for this is added by a microcode update.

As some of the implications of SBDS are similar to SRBDS, SRBDS mitigation
infrastructure can be leveraged by SBDS. Set X86_BUG_SRBDS and use SRBDS
mitigation.

Mitigation is enabled by default; use srbds=off to opt-out. Mitigation
status can be checked from below file:

  /sys/devices/system/cpu/vulnerabilities/srbds

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
arch/x86/kernel/cpu/common.c