Re: [PATCH] x86/speculation: Fix incorrect MDS/TAA mitigation status

From: Thomas Gleixner
Date: Thu Nov 14 2019 - 13:48:48 EST


On Thu, 14 Nov 2019, Waiman Long wrote:
> On 11/14/19 12:45 PM, Borislav Petkov wrote:
> >> - /* TAA mitigation is turned off on the cmdline (tsx_async_abort=off) */
> >> - if (taa_mitigation == TAA_MITIGATION_OFF)
> >> + /*
> >> + * TAA mitigation via VERW is turned off if both
> >> + * tsx_async_abort=off and mds=off are specified.
> >> + */
> > So this changes the dependency of switches so if anything, it should be
> > properly documented first in all three:
> >
> > Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
> > Documentation/x86/tsx_async_abort.rst
> > Documentation/admin-guide/kernel-parameters.txt
> >
> > However, before we do that, we need to agree on functionality:
> I agree that the documentation needs to be updated. I am going to do
> that once we have a consensus of what is the right thing to do.
> > Will the mitigations be disabled only with *both* =off supplied on the
> > command line or should the mitigations be disabled when *any* of the two
> > =off is supplied?
>
> The mitigation is disabled only with BOTH =off supplied or
> "mitigations=off". This is the current behavior. This patch is just to
> make sure that vulnerabilities files reflect the actual behavior. Of
> course, we can change it to disable mitigation with either =off if this
> is what the consensus turn out to be.

I think the current behaviour is correct. It's just a coincidence that both
issues happen to use the same mitigation technology in the exactly same
places. So if you leave one on then the other gets mitigated as a side
effect and the sysfs file should reflect that.

Thanks,

tglx