]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/entry: Have entry_ibpb() invalidate return predictions
authorJohannes Wikner <kwikner@ethz.ch>
Mon, 23 Sep 2024 18:49:36 +0000 (20:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Oct 2024 13:40:42 +0000 (15:40 +0200)
commite421c6839f698d134dca5301806c2e1c5c07d56e
treec4532b2778e02b894ebaaf75293da9b064d3290d
parent1e0398acb650933b21b97fe768ca13e372ff77d7
x86/entry: Have entry_ibpb() invalidate return predictions

commit 50e4b3b94090babe8d4bb85c95f0d3e6b07ea86e upstream.

entry_ibpb() should invalidate all indirect predictions, including return
target predictions. Not all IBPB implementations do this, in which case the
fallback is RSB filling.

Prevent SRSO-style hijacks of return predictions following IBPB, as the return
target predictor can be corrupted before the IBPB completes.

  [ bp: Massage. ]

Signed-off-by: Johannes Wikner <kwikner@ethz.ch>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/entry/entry.S