Re: [PATCH 1/2] x86/bugs: Check VERW mitigations for consistency
From: Daniel Sneddon
Date: Tue Oct 29 2024 - 10:36:04 EST
On 10/29/24 04:39, Borislav Petkov wrote:
> On Mon, Oct 28, 2024 at 04:50:34PM -0700, Daniel Sneddon wrote:
>> There are currently 4 mitigations that use VERW: MDS, TAA,
>> MMIO Stale Data, and Register File Data Sampling. Because
>> all 4 use the same mitigation path, if any one of them is
>> enabled, they're all enabled. Normally, this is what is
>> wanted. However, if a user wants to disable the mitigation,
>> this can cause problems. If the user misses disabling even
>> one of these mitigations, then none of them will be
>> disabled. This can cause confusion as the user expects to
>> regain the performance lost to the mitigation but isn't
>> seeing any improvement. Since there are already 4 knobs for
>> controlling it, adding a 5th knob that controls all 4
>> mitigations together would just overcomplicate things.
>> Instead, let the user know their mitigations are out of sync
>> when at least one of these mitigations is disabled but not
>> all 4.
>
> Please split this commit message into smaller chunks for better readability.
> For example:
>
> There are currently 4 mitigations that use VERW: MDS, TAA, MMIO Stale Data,
> and Register File Data Sampling. Because all 4 use the same mitigation path,
> if any one of them is enabled, they're all enabled.
>
> Normally, this is what is wanted. However, if a user wants to disable the
> mitigation, this can cause problems. If the user misses disabling even one of
> these mitigations, then none of them will be disabled.
>
> This can cause confusion as the user expects to regain the performance lost to
> the mitigation but isn't seeing any improvement. Since there are already
> 4 knobs for controlling it, adding a 5th knob that controls all 4 mitigations
> together would just overcomplicate things.
>
> Instead, let the user know their mitigations are out of sync when at least one
> of these mitigations is disabled but not all 4.
>
> Thx.
>
Will do.