Re: [PATCH v8 3/5] x86/pkeys: Update PKRU to enable all pkeys before XSAVE

From: Dmitry Vyukov
Date: Thu Feb 06 2025 - 13:39:10 EST


On Thu, 6 Feb 2025 at 19:21, Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>
> On 2/4/25 02:01, Dmitry Vyukov wrote:
> >> But this updated PKRU value is also pushed onto the sigframe, which
> >> means the register value restored from sigcontext will be different from
> >> the user-defined one, which is unexpected. Fix that by overwriting the
> >> PKRU value on the sigframe with the original, user-defined PKRU.
> >
> > This unfortunatly seems to be broken for rseq user-space writes.
>
> Hi Dmitry,
>
> Are you saying that Aruna's patch caused a regression in the rseq code?
> Or that the rseq code has a separate but similar issue to the one that
> Aruna's patch fixed?

No, no regression. Just another issue for real PKEY uses.