]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - arch/x86/kernel/cpu/bugs.c
x86/speculation: Warn about Spectre v2 LFENCE mitigation
authorJosh Poimboeuf <jpoimboe@redhat.com>
Fri, 25 Feb 2022 22:31:49 +0000 (14:31 -0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 9 Mar 2022 18:45:03 +0000 (15:45 -0300)
commit92cf97b2dc85505112c10a5742c1219a3005c248
tree196bf25af0a0a11cf1a7604b1a3b3ffcc3b6823c
parente9bf3dbe8a520c79c4afa5f0b8155e839ae9f596
x86/speculation: Warn about Spectre v2 LFENCE mitigation

commit eafd987d4a82c7bb5aa12f0e3b4f8f3dea93e678 upstream.

With:

  f8a66d608a3e ("x86,bugs: Unconditionally allow spectre_v2=retpoline,amd")

it became possible to enable the LFENCE "retpoline" on Intel. However,
Intel doesn't recommend it, as it has some weaknesses compared to
retpoline.

Now AMD doesn't recommend it either.

It can still be left available as a cmdline option. It's faster than
retpoline but is weaker in certain scenarios -- particularly SMT, but
even non-SMT may be vulnerable in some cases.

So just unconditionally warn if the user requests it on the cmdline.

  [ bp: Massage commit message. ]

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