[MODERATED] [PATCH] taa fix
Josh Poimboeuf <[email protected]> Wed, 6 Nov 2019 20:26:46 -0600
| Newsgroups | org.kernel.lore.historical-speck |
|---|---|
| Message-ID | <20191107022646.6h724wh4im5zxvw2@treble> |
From: Josh Poimboeuf <[email protected]> Subject: [PATCH] x86/speculation/taa: Fix TAA_MSG_SMT printk 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. I don't think it's a problem for MDS, because AFAICT 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 <[email protected]> --- arch/x86/kernel/cpu/bugs.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 850005590167..4c7b0fa15a19 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -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) { -- 2.20.1
signature.asc
(application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJdw4DmAAoJECgnh/JDkysF710QAKtArg7T4XKvNwfoKDfJEqpe XrxFW4EEu56jwjl+6Ey+Wl6kC3dMW6xnfrh6J1ifVPXenVN1ApTgOVeWcgYsU8gj 0r4RpJwxfGCg0kTQknPC7DBXSAMCpN9x5Moj9fZ2/uWlHACKgo+kEZeFZ+k1fNtb u1J0GM1UDQl5Osn5sY/4sd7XYneUCFa3vHWZPOp1PtxBEmsaWG4PZwkn/j+tCqbn FZiQt0N7ChiskTVGNtBamq5/P31yXzlC1sQ3zvvqyqE8PVAtcWTUN0JesK6cEWin 5KhL22/az/ygThUayn1abBwp5rYFrW+O2gE8lz0IvaRniMoKDFpVt6UsFv+23W5s AzY4W0iP/pWPDVA93BCxhtw+z2eHQcIwUGW4xdtUUm660Hh/9awWr5JcA8CCZi+2 SVa5mFuA6h7u2jD5AhLJKIFgVaSIS/fmIjzWipwuPQaW1DHDARl8evo7tqUoO0aX bN47/ocMSh31am1tahahgzxh3iNXCz60KpvfJ+GB5hQ4oUFXBTXufM97EiAIF+wY b6uhcWs18LvaiaYCKYzVHSbLXSaJOxkbN6YlpTECq+YaEQKcLJzPAqblgO1WJBxG Wk5OhWCUc4wcaeIxnWq5WyxmTdjQN6j6yolouyJT9SGdiv5aCofeE0b8sL8KWQbo ZypRlZtAX4ezD1L3jVDh =Ekdf -----END PGP SIGNATURE-----