]> www.infradead.org Git - users/hch/misc.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)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 10 Oct 2024 08:38:21 +0000 (10:38 +0200)
commitc62fa117c32bd1abed9304c58e0da6940f8c7fc2
treed28b915af0b18aecc4942cb0156a42afe63b3ac0
parent0fad2878642ec46225af2054564932745ac5c765
x86/bugs: Do not use UNTRAIN_RET with IBPB on entry

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>
arch/x86/kernel/cpu/bugs.c