From: Chuck Anderson Date: Mon, 26 Feb 2018 08:33:53 +0000 (-0800) Subject: retpoline: call clear_retpoline_fallback() with boot parm spectre_v2_heuristics=off X-Git-Tag: v4.1.12-124.31.3~1107 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b55b55d9ac522393e49178704d80a4df73f0b3cd;p=users%2Fjedix%2Flinux-maple.git retpoline: call clear_retpoline_fallback() with boot parm spectre_v2_heuristics=off 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 Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Darren Kenny --- diff --git a/arch/x86/kernel/cpu/bugs_64.c b/arch/x86/kernel/cpu/bugs_64.c index 2a4f6c1234db..63c77b8ee8f6 100644 --- a/arch/x86/kernel/cpu/bugs_64.c +++ b/arch/x86/kernel/cpu/bugs_64.c @@ -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");