]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/bugs: Add SRSO_USER_KERNEL_NO support
authorBorislav Petkov (AMD) <bp@alien8.de>
Mon, 11 Nov 2024 16:22:08 +0000 (17:22 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 30 Dec 2024 16:48:33 +0000 (17:48 +0100)
commit877818802c3e970f67ccb53012facc78bef5f97a
tree6e733248c5eb3f438a964bf520411d3be5624658
parentfc033cf25e612e840e545f8d5ad2edd6ba613ed5
x86/bugs: Add SRSO_USER_KERNEL_NO support

If the machine has:

  CPUID Fn8000_0021_EAX[30] (SRSO_USER_KERNEL_NO) -- If this bit is 1,
  it indicates the CPU is not subject to the SRSO vulnerability across
  user/kernel boundaries.

have it fall back to IBPB on VMEXIT only, in the case it is going to run
VMs:

  Speculative Return Stack Overflow: Mitigation: IBPB on VMEXIT only

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Link: https://lore.kernel.org/r/20241202120416.6054-2-bp@kernel.org
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/bugs.c
arch/x86/kernel/cpu/common.c