Re: [PATCH] x86: also disable FSRM if ERMS is disabled

From: Andrew Cooper
Date: Tue Oct 11 2022 - 18:59:21 EST


On 11/10/2022 23:19, Luck, Tony wrote:
>> That won't help because userspace will still use them since the CPUID
>> flags remain set.
> Even if writing the MSR did clear the CPUID bits, it wouldn't help with applications
> that started before the kernel cleared the bits (assuming this was some run-time
> update patch).
>
> Worst case scenario is that the applications don't pick the most efficient memcpy().

As hint-only bits, the kernel is free to do whatever it wants behind the
scenes.  The only case I'm aware of which dynamically clears fast
strings is the #MC ECC poison overread erratum.

If you want to truly hide the CPUID bits, then you can use CPUID
Faulting (IvyBridge and later, available to userspace), or for a few
generations prior to that, the CPUID mask MSRs, but the settings do want
to be uniform from boot.

~Andrew