Return-Path: Received: from mail.linutronix.de (193.142.43.55:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 17 Apr 2020 19:22:12 -0000 Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jPWZ1-0005jn-GO for speck@linutronix.de; Fri, 17 Apr 2020 21:22:11 +0200 From: Thomas Gleixner Subject: Re: [PATCH 3/4] V8 more sampling fun 3 In-Reply-To: <20200417131947.hg3a6225lmislk77@treble> References: <20200416171723.zk3lzznvslmtt4zf@treble> <20200416174452.GG21456@zn.tnic> <874ktimgta.fsf@nanos.tec.linutronix.de> <20200417131947.hg3a6225lmislk77@treble> Date: Fri, 17 Apr 2020 21:22:10 +0200 Message-ID: <87imhxzzml.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: speck for Josh Poimboeuf writes: > On Fri, Apr 17, 2020 at 02:34:41PM +0200, speck for Thomas Gleixner wrote: >> speck for Borislav Petkov writes: >> > On Thu, Apr 16, 2020 at 12:17:23PM -0500, speck for Josh Poimboeuf wrote: >> > >> > While it is present on all affected CPU models, the microcode mitigation >> > is not needed on models that enumerate ARCH_CAPABILITIES[MDS_NO] in the >> > cases where TSX is not supported or has been disabled with TSX_CTRL. >> >> If the CPU has does not expose TSX_CTRL and has FEATURE_RTM disabled (BIOS >> or fused off) then we declare it as non vulnerable. >> >> If the CPU exposes TSX_CTRL then we declare it vulnerable and decide in >> the mitigation selection whether it is vulnerable or not depending on >> the RTM state. If RTM is off, we say: "Mitigation: TSX disabled". >> >> IMO the whole tsx_fused_off() logic is pointless. It does not matter >> whether TSX got fused off or disabled in BIOS or disabled via >> TSX_CTRL. The CPU model is affected but the problem is mitigated because >> TSX is disabled. > > The idea is that if TSX is *permanently* off, there's no way to trigger > the bug, regardless of how the user has things configured in BIOS or the > kernel. So from the user's standpoint, the CPU is not affected, and > never was, regardless of kernel/BIOS settings and microcode. > > Is there not a way to distinguish "disabled in BIOS" from "permanently > fused off"? If not, then yes we should just consider all of them > "Mitigation: TSX disabled". I don't have access to a MDS_NO part with a BIOS switch for TSX, so I can't investigate it. Thanks, tglx