]> git.baikalelectronics.ru Git - kernel.git/commit
x86/speculation: Warn about Spectre v2 LFENCE mitigation
authorJosh Poimboeuf <jpoimboe@redhat.com>
Fri, 25 Feb 2022 22:31:49 +0000 (14:31 -0800)
committerBorislav Petkov <bp@suse.de>
Sat, 5 Mar 2022 08:16:24 +0000 (09:16 +0100)
commit338a77dcb9f98bea4455e34e976653b00687b08b
treee3900abb0623492d3aa96ccdf8af54bc33544926
parent8b32be95a86dc5dce7403f42a9da77499aa10099
x86/speculation: Warn about Spectre v2 LFENCE mitigation

With:

  36e5ff44126b ("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>
arch/x86/kernel/cpu/bugs.c