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 ; 23 Oct 2019 06:47:14 -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 1iNAQK-0003kb-Jd for speck@linutronix.de; Wed, 23 Oct 2019 08:47:13 +0200 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8A3C3B256 for ; Wed, 23 Oct 2019 06:47:04 +0000 (UTC) Date: Wed, 23 Oct 2019 08:46:54 +0200 From: Borislav Petkov Subject: [MODERATED] Re: [PATCH v7 04/10] TAAv7 4 Message-ID: <20191023064653.GA12272@zn.tnic> References: <20191022165112.GK31458@zn.tnic> <20191022174452.GE29216@guptapadev.amr> <20191022190434.GR31458@zn.tnic> <20191022212902.GA30440@guptapadev.amr> <20191022215321.GY31458@zn.tnic> <20191022220555.GZ31458@zn.tnic> <20191023002756.GB30440@guptapadev.amr> <20191023052527.GA26602@guptapadev.amr> MIME-Version: 1.0 In-Reply-To: <20191023052527.GA26602@guptapadev.amr> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: speck@linutronix.de List-ID: On Tue, Oct 22, 2019 at 10:25:27PM -0700, speck for Pawan Gupta wrote: > I think we first need to agree on whether disabling TSX is the > mitigation for X86_BUG_TAA or the lack of bug. Your clearing the bug bit > here makes me think that you are treating it as lack of bug. This series > treats it as a mitigation when the hardware has the bug. Let me know > your thoughts on this. Ok, I see your point. And yes, let's do what you're suggesting because that mirrors reality optimally: static void __init taa_select_mitigation(void) {=20 u64 ia32_cap; if (!boot_cpu_has_bug(X86_BUG_TAA) || cpu_mitigations_off()) { taa_mitigation =3D TAA_MITIGATION_OFF; return; } if (!boot_cpu_has(X86_FEATURE_RTM)) { taa_mitigation =3D TAA_MITIGATION_TSX_DISABLE; goto out; } ... so the bug presence would take precedence and in the !X86_BUG_TAA case or when we've disabled all mitigations, we won't say anything. Then, if the bug is present but we've disabled TSX, we say "Mitigation: TSX disabled". Hohumm, makes sense to me. Thx. --=20 Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imend=C3=B6rffer, HRB 36809, = AG N=C3=BCrnberg --=20