]> git.baikalelectronics.ru Git - kernel.git/commit
x86/bugs: Do IBPB fallback check only once
authorJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 14 Jun 2022 22:07:19 +0000 (15:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jul 2022 10:54:05 +0000 (12:54 +0200)
commit6439b03661bbe2139f74e887b1494ea9519ce124
tree1bab513d2cbbfb5ee1cd135dfaf17202025fc580
parenta359d0adcdd3dfa991679aee38ca5ac539eff059
x86/bugs: Do IBPB fallback check only once

commit 895a5c18e0079ed65b9baea0610f4f705a8f2aa7 upstream.

When booting with retbleed=auto, if the kernel wasn't built with
CONFIG_CC_HAS_RETURN_THUNK, the mitigation falls back to IBPB.  Make
sure a warning is printed in that case.  The IBPB fallback check is done
twice, but it really only needs to be done once.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/bugs.c