]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 09:23:41 +0000 (11:23 +0200)
commit122b446a43f869fbb8e1fba30abdd93af09540c6
treed09510113f89342455c9472f7470e4a42384c3b5
parent5135e0724fb0cca372725f9bc3b86d5a706802d9
x86/bugs: Fix BHI handling of RRSBA

commit 1cea8a280dfd1016148a3820676f2f03e3f5b898 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/bugs.c