]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
x86/speculation: Move arch_smt_update() call to after mitigation decisions
authorJosh Poimboeuf <jpoimboe@redhat.com>
Tue, 2 Apr 2019 15:00:14 +0000 (10:00 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 6 May 2019 16:58:14 +0000 (18:58 +0200)
arch_smt_update() now has a dependency on both Spectre v2 and MDS
mitigations.  Move its initial call to after all the mitigation decisions
have been made.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
CVE-2018-12126
CVE-2018-12127
CVE-2018-12130

(cherry picked from commit 7c3658b20194a5b3209a143f63bc9c643c6a3ae2)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/kernel/cpu/bugs.c

index ab112edf4e30d689dc326d96b34035fb4a5f2354..086bb04cf15fef7939e6563d64754c1c6075042e 100644 (file)
@@ -109,6 +109,8 @@ void __init check_bugs(void)
 
        mds_select_mitigation();
 
+       arch_smt_update();
+
 #ifdef CONFIG_X86_32
        /*
         * Check whether we are able to run this kernel safely on SMP.
@@ -634,9 +636,6 @@ specv2_set_mode:
 
        /* Set up IBPB and STIBP depending on the general spectre V2 command */
        spectre_v2_user_select_mitigation(cmd);
-
-       /* Enable STIBP if appropriate */
-       arch_smt_update();
 }
 
 static void update_stibp_msr(void * __unused)