x86/speculation/taa: Fix printing of TAA_MSG_SMT on IBRS_ALL CPUs
authorJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 7 Nov 2019 02:26:46 +0000 (20:26 -0600)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 7 Nov 2019 15:06:27 +0000 (16:06 +0100)
For new IBRS_ALL CPUs, the Enhanced IBRS check at the beginning of
cpu_bugs_smt_update() causes the function to return early, unintentionally
skipping the MDS and TAA logic.

This is not a problem for MDS, because there appears to be no overlap
between IBRS_ALL and MDS-affected CPUs.  So the MDS mitigation would be
disabled and nothing would need to be done in this function anyway.

But for TAA, the TAA_MSG_SMT string will never get printed on Cascade
Lake and newer.

The check is superfluous anyway: when 'spectre_v2_enabled' is
SPECTRE_V2_IBRS_ENHANCED, 'spectre_v2_user' is always
SPECTRE_V2_USER_NONE, and so the 'spectre_v2_user' switch statement
handles it appropriately by doing nothing.  So just remove the check.

Fixes: 1b42f017415b ("x86/speculation/taa: Add mitigation for TSX Async Abort")
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Borislav Petkov <bp@suse.de>
arch/x86/kernel/cpu/bugs.c

index 850005590167d5bafca70503650b6aea3bba156f..4c7b0fa15a19403019f7366811655a5174dfc812 100644 (file)
@@ -886,10 +886,6 @@ static void update_mds_branch_idle(void)
 
 void cpu_bugs_smt_update(void)
 {
-       /* Enhanced IBRS implies STIBP. No update required. */
-       if (spectre_v2_enabled == SPECTRE_V2_IBRS_ENHANCED)
-               return;
-
        mutex_lock(&spec_ctrl_mutex);
 
        switch (spectre_v2_user) {