]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
retpoline: call clear_retpoline_fallback() with boot parm spectre_v2_heuristics=off
authorChuck Anderson <chuck.anderson@oracle.com>
Mon, 26 Feb 2018 08:33:53 +0000 (00:33 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 3 Mar 2018 01:58:31 +0000 (17:58 -0800)
retpoline_fallback=off is one of the spectre_v2_heuristics boot parm
settings.  Disable retpoline fallback when boot parameter
spectre_v2_heuristics=off is specified.

Orabug: 27625404
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
arch/x86/kernel/cpu/bugs_64.c

index 2a4f6c1234db1251c739f40b9cb29bf5d9c7febc..63c77b8ee8f6f7f3fe0955c40c32e78addcd2d95 100644 (file)
@@ -61,6 +61,7 @@ int __init spectre_v2_heuristics_setup(char *p)
                /* Disable all heuristics. */
                if (!strncmp(p, "off", 3)) {
                        use_ibrs_on_skylake = false;
+                       clear_retpoline_fallback();
                        break;
                }
                len = strlen("skylake");