]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/bugs: Do not use UNTRAIN_RET with IBPB on entry
authorJohannes Wikner <kwikner@ethz.ch>
Tue, 8 Oct 2024 10:58:03 +0000 (12:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Oct 2024 13:40:43 +0000 (15:40 +0200)
commit0b263c2086ef2d70afd97c14ac2e377b05d9254a
treec0d18b642f7296d4ac85c3f6351d0fc9a94a743d
parent0cced32e21effcfe7be7cbfb0f50c7c8941dddd9
x86/bugs: Do not use UNTRAIN_RET with IBPB on entry

commit c62fa117c32bd1abed9304c58e0da6940f8c7fc2 upstream.

Since X86_FEATURE_ENTRY_IBPB will invalidate all harmful predictions
with IBPB, no software-based untraining of returns is needed anymore.
Currently, this change affects retbleed and SRSO mitigations so if
either of the mitigations is doing IBPB and the other one does the
software sequence, the latter is not needed anymore.

  [ bp: Massage commit message. ]

Suggested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Johannes Wikner <kwikner@ethz.ch>
Cc: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/bugs.c