Re: [patch 00/41] x86/fpu: Spring cleaning and PKRU sanitizing

From: Dave Hansen
Date: Fri Jun 11 2021 - 20:40:44 EST


On 6/11/21 5:24 PM, Thomas Gleixner wrote:
> The Intel SDM states in volume 1, chapter 13.6
>
> PROCESSOR TRACKING OF XSAVE-MANAGED STATE
>
> * PKRU state. PKRU state is in its initial configuration if the value
> of the PKRU is 0.>
...
> IOW there is no consistency vs. XINUSE and initial state guaranteed at
> all. So why should the kernel worry about this?

This is my feeling on it as well. I may be a bit corrupted by having
talked to the hardware folks who have built the init state "trackers",
but I've always had the opinion that XINUSE is very weakly defined.

There are some other bits of the SDM that you noted that clearly call
out that XINUSE is not strictly tied to the *value* of the component.