[MODERATED] Re: [PATCH v7 04/10] TAAv7 4

Pawan Gupta <[email protected]>
Newsgroups org.kernel.lore.historical-speck
Message-ID <[email protected]>
On Tue, Oct 22, 2019 at 09:04:34PM +0200, speck for Borislav Petkov wrote:
> On Tue, Oct 22, 2019 at 10:44:52AM -0700, speck for Pawan Gupta wrote:
> > There is a small problem with this, it will set
> > 
> > 	taa_mitigation = TAA_MITIGATION_TSX_DISABLE;
> > 
> > when there is no X86_BUG_TAA.
> 
> And?
> 
> When the CPU doesn't support TSX, then this practically is "Mitigation:
> TSX disabled" because, well, TSX *is* disabled.

Side effect of RTM check ahead of X86_BUG_TAA will be a dmesg print
"Mitigation: TSX disabled" when X86_BUG_TAA is not set.

> 
> Also, from all the possible settings:
> 
>         [TAA_MITIGATION_OFF]            = "Vulnerable",
>         [TAA_MITIGATION_UCODE_NEEDED]   = "Vulnerable: Clear CPU buffers attempted, no microcode",
>         [TAA_MITIGATION_VERW]           = "Mitigation: Clear CPU buffers",
>         [TAA_MITIGATION_TSX_DISABLE]    = "Mitigation: TSX disabled",
> 
> TAA_MITIGATION_TSX_DISABLE is the one that fits best for the !RTM case,
> no?

When X86_BUG_TAA is not set sysfs shows "Not affected" irrespective of
value of taa_mitigation.

	cpu_show_common()
	{
		if (!boot_cpu_has_bug(bug))
			return sprintf(buf, "Not affected\n");
		[...]

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.