]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/bugs: Skip RSB fill at VMEXIT
authorJohannes Wikner <kwikner@ethz.ch>
Tue, 8 Oct 2024 10:36:30 +0000 (12:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Oct 2024 13:40:43 +0000 (15:40 +0200)
commit0cced32e21effcfe7be7cbfb0f50c7c8941dddd9
treef1f39534ee5a7692a19cc1f28a315785f40d3e29
parente421c6839f698d134dca5301806c2e1c5c07d56e
x86/bugs: Skip RSB fill at VMEXIT

commit 0fad2878642ec46225af2054564932745ac5c765 upstream.

entry_ibpb() is designed to follow Intel's IBPB specification regardless
of CPU. This includes invalidating RSB entries.

Hence, if IBPB on VMEXIT has been selected, entry_ibpb() as part of the
RET untraining in the VMEXIT path will take care of all BTB and RSB
clearing so there's no need to explicitly fill the RSB 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