]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/spectre_v2: Remove remaining references to lfence mitigation
authorAlejandro Jimenez <alejandro.j.jimenez@oracle.com>
Thu, 13 Sep 2018 16:53:03 +0000 (12:53 -0400)
committerBrian Maly <brian.maly@oracle.com>
Mon, 22 Oct 2018 17:16:44 +0000 (13:16 -0400)
The LFENCE mitigation alone was deemed to be insufficient and the
related code was mostly removed by commit cf3b86bc07619
(Revert "x86/spec_ctrl: Add 'nolfence' knob to disable fallback for
spectre_v2 mitigation")

This patch cleans up two additional references that still exist.

Orabug: 28631590
CVE: CVE-2018-15572

Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Reviewed-by: Mark Kanda <mark.kanda@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/include/asm/nospec-branch.h
arch/x86/kernel/cpu/bugs_64.c

index 182dc7bc88a692469dc9ddc1561bda391e6f2136..117bd5b11bb0e4e1d445a8a0070af179e23c2cd7 100644 (file)
@@ -169,7 +169,6 @@ enum spectre_v2_mitigation {
        SPECTRE_V2_RETPOLINE_GENERIC,
        SPECTRE_V2_RETPOLINE_AMD,
        SPECTRE_V2_IBRS,
-       SPECTRE_V2_IBRS_LFENCE,
 };
 
 extern void x86_spec_ctrl_set(u64);
index 809f85a36be9bb917d2dab6aee7138d3cacc8c92..4029abe7a8f6e7cb2fc4e9560bddfe0e5ba638d5 100644 (file)
@@ -675,7 +675,7 @@ out:
         * or deactivated in favour of retpolines the RSB fill on context
         * switch is required.
         */
-       if (((mode != SPECTRE_V2_IBRS) && (mode != SPECTRE_V2_IBRS_LFENCE)) &&
+       if ((mode != SPECTRE_V2_IBRS) &&
            ((!boot_cpu_has(X86_FEATURE_PTI) &&
             !boot_cpu_has(X86_FEATURE_SMEP)) || is_skylake_era())) {
                setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW);