From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (193.142.43.55:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 07 Nov 2019 09:25:47 -0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iSe30-00024b-Az for speck@linutronix.de; Thu, 07 Nov 2019 10:25:46 +0100 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7CD07B1EA for ; Thu, 7 Nov 2019 09:25:40 +0000 (UTC) Date: Thu, 7 Nov 2019 10:25:33 +0100 From: Borislav Petkov Subject: [MODERATED] Re: [PATCH] taa fix Message-ID: <20191107092533.GA4243@zn.tnic> References: <20191107022646.6h724wh4im5zxvw2@treble> MIME-Version: 1.0 In-Reply-To: <20191107022646.6h724wh4im5zxvw2@treble> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: speck@linutronix.de List-ID: On Wed, Nov 06, 2019 at 08:26:46PM -0600, speck for Josh Poimboeuf wrote: > From: Josh Poimboeuf > Subject: [PATCH] x86/speculation/taa: Fix TAA_MSG_SMT printk Subject should be something like "Print TAA_MSG_SMT on IBRS_ALL CPUs too" or so. > 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. >=20 > 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. >=20 > But for TAA, the TAA_MSG_SMT string will never get printed on Cascade > Lake and newer. >=20 > 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. >=20 > Fixes: 1b42f017415b ("x86/speculation/taa: Add mitigation for TSX Async Abo= rt") > Signed-off-by: Josh Poimboeuf > --- > arch/x86/kernel/cpu/bugs.c | 4 ---- > 1 file changed, 4 deletions(-) >=20 > 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) > =20 > void cpu_bugs_smt_update(void) > { > - /* Enhanced IBRS implies STIBP. No update required. */ > - if (spectre_v2_enabled =3D=3D SPECTRE_V2_IBRS_ENHANCED) > - return; > - > mutex_lock(&spec_ctrl_mutex); > =20 > switch (spectre_v2_user) { > --=20 With that addressed: Reviewed-by: Borislav Petkov --=20 Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imend=C3=B6rffer, HRB 36809, = AG N=C3=BCrnberg --=20