Hi Greg,
What follows is backports of the upstream commits
6a877d2450ac x86/fpu: Take task_struct* in copy_sigframe_from_user_to_xstate() 1c813ce03055 x86/fpu: Add a pkru argument to copy_uabi_from_kernel_to_xstate(). 2c87767c35ee x86/fpu: Add a pkru argument to copy_uabi_to_xstate() 4a804c4f8356 x86/fpu: Allow PKRU to be (once again) written by ptrace. d7e5aceace51 x86/fpu: Emulate XRSTOR's behavior if the xfeatures PKRU bit is not set 6ea25770b043 selftests/vm/pkeys: Add a regression test for setting PKRU through ptrace
Those commits fix a regression introduced in 5.14 (by e84ba47e313d) related to handling of PKRU through ptrace(2).
The only substantive difference between this patch series and the upstream patch series is that, because on upstream kernels KVM also calls into copy_uabi_to_xstate(), while on 5.15 KVM has its own separate code path, this patch series copies (five lines of) previously KVM-specific code into copy_uabi_to_xstate() whereas the upstream patch series moves previously KVM-specific code into copy_uabi_to_xstate(). All other changes are adjustments for context that varies or refactorings that are newer than 5.15.