RE: [PATCH v2 04/35] x86/bugs: Restructure mds mitigation

From: Kaplan, David
Date: Thu Nov 14 2024 - 10:03:46 EST


[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx>
> Sent: Wednesday, November 13, 2024 9:04 PM
> To: Kaplan, David <David.Kaplan@xxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>; Borislav Petkov <bp@xxxxxxxxx>; Peter
> Zijlstra <peterz@xxxxxxxxxxxxx>; Josh Poimboeuf <jpoimboe@xxxxxxxxxx>; Ingo
> Molnar <mingo@xxxxxxxxxx>; Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>;
> x86@xxxxxxxxxx; H . Peter Anvin <hpa@xxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 04/35] x86/bugs: Restructure mds mitigation
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Tue, Nov 05, 2024 at 03:54:24PM -0600, David Kaplan wrote:
> > @@ -277,12 +304,19 @@ enum rfds_mitigations { static enum
> > rfds_mitigations rfds_mitigation __ro_after_init =
> > IS_ENABLED(CONFIG_MITIGATION_RFDS) ? RFDS_MITIGATION_AUTO
> :
> > RFDS_MITIGATION_OFF;
> >
> > +/* Return TRUE if any VERW-based mitigation is enabled. */ static
> > +bool __init mitigate_any_verw(void)
>
> s/mitigate_any_verw/verw_enabled/ ?

Ok

>
> > +{
> > + return (mds_mitigation != MDS_MITIGATION_OFF ||
> > + taa_mitigation != TAA_MITIGATION_OFF ||
>
> TAA_MITIGATION_TSX_DISABLED does not require VERW, this should be:
>
> taa_mitigation != TAA_MITIGATION_OFF ||
> taa_mitigation != TAA_MITIGATION_TSX_DISABLED ||
>
> > + mmio_mitigation != MMIO_MITIGATION_OFF ||
> > + rfds_mitigation != RFDS_MITIGATION_OFF); }

Good catch, will fix

--David Kaplan