]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/spectre: Favor IBRS on Skylake over retpoline
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 2 Feb 2018 19:25:06 +0000 (14:25 -0500)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 8 Feb 2018 18:16:58 +0000 (10:16 -0800)
commitf9adb8f42da19cde986fa55f60327b31accfc100
treeef51acf491440a5071f86bf6755fe4dc4ef81bba
parent407b0b9d0f4b1451d37aedbfd0cbe9789bf72e53
x86/spectre: Favor IBRS on Skylake over retpoline

Couple of rules around this. If the user has choosen:

 spectre_v2=retpoline
 spectre_v2=retpoline,generic

That we will respect their wishes.

If the customer has:

 spectre_v2=auto (by default)
 spectre_v2=force

Then we will figure out if this is a machine with Skylake
affected CPUS. If so, we will pick IBRS over retpoline
if IBRS is available.

And lastly, if the kernel is compiled without retpoline
support we will pick IBRS over minimal retpoline support
(if IBRS is available).

In other words the priority for non-Skylake is:

retpoline
IBRS
minimal asm

On Skylake:

IBRS
retpoline
minimal asm

Orabug: 27477743
CVE: CVE-2017-5715

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
arch/x86/kernel/cpu/bugs_64.c