Re: [PATCH v2 1/2] x86/speculation: Fix incorrect MDS/TAA mitigation status
From: Thomas Gleixner
Date: Fri Nov 15 2019 - 14:36:08 EST
On Fri, 15 Nov 2019, Boris Petkov wrote:
> On November 15, 2019 5:14:44 PM GMT+01:00, Waiman Long <longman@xxxxxxxxxx> wrote:
> >For MDS vulnerable processors with TSX support, enabling either MDS or
> >TAA mitigations will enable the use of VERW to flush internal processor
> >buffers at the right code path. IOW, they are either both mitigated
> >or both not. However, if the command line options are inconsistent,
> >the vulnerabilites sysfs files may not report the mitigation status
> >correctly.
> >
> >For example, with only the "mds=off" option:
> >
> > vulnerabilities/mds:Vulnerable; SMT vulnerable
> >vulnerabilities/tsx_async_abort:Mitigation: Clear CPU buffers; SMT
> >vulnerable
> >
> >The mds vulnerabilities file has wrong status in this case. Similarly,
> >the taa vulnerability file will be wrong with mds mitigation on, but
> >taa off.
> >
> >Change taa_select_mitigation() to sync up the two mitigation status
> >and have them turned off if both "mds=off" and "tsx_async_abort=off"
> >are present.
> >
> >Both hw-vuln/mds.rst and hw-vuln/tsx_async_abort.rst are updated
> >to emphasize the fact that both "mds=off" and "tsx_async_abort=off"
> >have to be specified together for processors that are affected by both
> >TAA and MDS to be effective. As kernel-parameter.txt references both
> >documents above, it is not necessary to update it.
>
> What about kernel-parameters.txt?
See the last sentence of the paragraph you replied to :)
But serioulsy, yes we should mention the interaction in
kernel-parameters.txt as well. Something like:
off - Unconditionally disable MDS mitigation.
+ On TAA affected machines, mds=off can be prevented
+ by an active TAA mitigation as both vulnerabilities
+ are mitigated with the same mechanism.
and the other way round for TAA.
Thanks,
tglx