On 8/18/26 13:44, Jacky Li wrote:
> +    if ((fpstate_64->sw_reserved.xstate_bv & XSTATE_PKRU) == 0) {
> +        return false;
> +    }
Cool stuff!

A few little nits on the XSAVE handling.

It's subtle, but this wouldn't quite work for pkru when in its init
state. I guess the argument is that pkru=0 wouldn't cause a SIGSEGV in
the first place so this code wouldn't ever get run. But, if it were me,
I'd probably warn or _something_ if I ended up with
(xstate_bv&XSTATE_PKRU)==0.

I'd probably also at least _check_ for the compacted format. Basically
make sure that XCOMP_BV==0, too. This isn't strictly necessary. But it
would help me win a bet with a colleague, so would be much appreciated! ;)



Reply via email to