]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
x86/bugs: Do not enable IBPB-on-entry when IBPB is not supported
authorThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 7 Jul 2022 16:41:52 +0000 (13:41 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 19 Jul 2022 19:20:07 +0000 (16:20 -0300)
commitfb1dd6d4203f35ebe9e21d0f1cc17684857c1c3e
treeab6be36cfe0b49482ea81d501018cee478157208
parentb2e0cb8490a99ae2b855176c54d0536622a48188
x86/bugs: Do not enable IBPB-on-entry when IBPB is not supported

commit 2259da159fbe5dba8ac00b560cf00b6a6537fa18 upstream.

There are some VM configurations which have Skylake model but do not
support IBPB. In those cases, when using retbleed=ibpb, userspace is going
to be killed and kernel is going to panic.

If the CPU does not support IBPB, warn and proceed with the auto option. Also,
do not fallback to IBPB on AMD/Hygon systems if it is not supported.

Fixes: 3ebc17006888 ("x86/bugs: Add retbleed=ibpb")
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CVE-2022-29900
CVE-2022-29901
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/x86/kernel/cpu/bugs.c