]> git.itanic.dy.fi Git - linux-stable/commit
x86/bugs: Fix BHI handling of RRSBA
authorJosh Poimboeuf <jpoimboe@kernel.org>
Thu, 11 Apr 2024 05:40:47 +0000 (22:40 -0700)
committerIngo Molnar <mingo@kernel.org>
Thu, 11 Apr 2024 08:30:33 +0000 (10:30 +0200)
commit1cea8a280dfd1016148a3820676f2f03e3f5b898
tree40f1e43dcec158a28a3df64570a986c068b34ea2
parentd0485730d2189ffe5d986d4e9e191f1e4d5ffd24
x86/bugs: Fix BHI handling of RRSBA

The ARCH_CAP_RRSBA check isn't correct: RRSBA may have already been
disabled by the Spectre v2 mitigation (or can otherwise be disabled by
the BHI mitigation itself if needed).  In that case retpolines are fine.

Fixes: ec9404e40e8f ("x86/bhi: Add BHI mitigation knob")
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/6f56f13da34a0834b69163467449be7f58f253dc.1712813475.git.jpoimboe@kernel.org
arch/x86/kernel/cpu/bugs.c