[MODERATED] Re: [PATCH v6 5/9] TAAv6 5

Pawan Gupta <[email protected]>
Newsgroups org.kernel.lore.historical-speck
Message-ID <[email protected]>
On Thu, Oct 10, 2019 at 08:50:11AM +0200, speck for Greg KH wrote:
> 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 <[email protected]>
> > Reviewed-by: Mark Gross <[email protected]>
> > Reviewed-by: Tony Luck <[email protected]>
> > Tested-by: Neelima Krishnan <[email protected]>
> > ---
> >  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 ';'

Oh, ';' is the separator between the main mitigation and the SMT status.

This is the sample output:

	"Mitigation: Clear CPU buffers; SMT vulnerable"
                                      ^
This follows the MDS nomenclature.

Thanks,
Pawan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.