x86/srso: Fix SBPB enablement for spec_rstack_overflow=off
authorJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 5 Sep 2023 05:04:48 +0000 (22:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:40 +0000 (14:56 +0200)
commitadbcec23c8423e3d5df1839c5ae91599dcf703cb
tree5f79bd5ec41efeb2e250d08d9e4ce15f431f58a2
parent755195b2d2df4d70952e5e5122c2cd590821be80
x86/srso: Fix SBPB enablement for spec_rstack_overflow=off

[ Upstream commit 01b057b2f4cc2d905a0bd92195657dbd9a7005ab ]

If the user has requested no SRSO mitigation, other mitigations can use
the lighter-weight SBPB instead of IBPB.

Fixes: fb3bd914b3ec ("x86/srso: Add a Speculative RAS Overflow mitigation")
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/b20820c3cfd1003171135ec8d762a0b957348497.1693889988.git.jpoimboe@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kernel/cpu/bugs.c