Return-Path: Received: from mail.linutronix.de (193.142.43.55:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 10 Oct 2019 06:50:22 -0000 Received: from mail.kernel.org ([198.145.29.99]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iISHE-0000mC-VK for speck@linutronix.de; Thu, 10 Oct 2019 08:50:21 +0200 Date: Thu, 10 Oct 2019 08:50:11 +0200 From: Greg KH Subject: [MODERATED] Re: [PATCH v6 5/9] TAAv6 5 Message-ID: <20191010065011.GB256999@kroah.com> References: <5d9e6e22.1c69fb81.6df19.ff55SMTPIN_ADDED_BROKEN@mx.google.com> MIME-Version: 1.0 In-Reply-To: <5d9e6e22.1c69fb81.6df19.ff55SMTPIN_ADDED_BROKEN@mx.google.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Wed, Oct 09, 2019 at 04:26:56PM -0700, speck for Pawan Gupta wrote: > Add the sysfs reporting file for TSX Async Abort. It exposes the > vulnerability and the mitigation state similar to the existing files for > the other hardware vulnerabilities. > > sysfs file path is: > /sys/devices/system/cpu/vulnerabilities/tsx_async_abort > > Signed-off-by: Pawan Gupta > Reviewed-by: Mark Gross > Reviewed-by: Tony Luck > Tested-by: Neelima Krishnan > --- > arch/x86/kernel/cpu/bugs.c | 23 +++++++++++++++++++++++ > drivers/base/cpu.c | 9 +++++++++ > include/linux/cpu.h | 3 +++ > 3 files changed, 35 insertions(+) > > diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c > index 0b7c7a826580..073687ddd06d 100644 > --- a/arch/x86/kernel/cpu/bugs.c > +++ b/arch/x86/kernel/cpu/bugs.c > @@ -1451,6 +1451,21 @@ static ssize_t mds_show_state(char *buf) > sched_smt_active() ? "vulnerable" : "disabled"); > } > > +static ssize_t tsx_async_abort_show_state(char *buf) > +{ > + if ((taa_mitigation == TAA_MITIGATION_TSX_DISABLE) || > + (taa_mitigation == TAA_MITIGATION_OFF)) > + return sprintf(buf, "%s\n", taa_strings[taa_mitigation]); > + > + if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) { > + return sprintf(buf, "%s; SMT Host state unknown\n", > + taa_strings[taa_mitigation]); > + } > + > + return sprintf(buf, "%s; SMT %s\n", taa_strings[taa_mitigation], Shouldn't that be: return sprintf(buf, "%s: SMT %s\n", taa_strings[taa_mitigation], Use a ':' and not a ';' thanks, greg k-h