x86/fpu: Add a pkru argument to copy_uabi_to_xstate()
authorKyle Huey <me@kylehuey.com>
Tue, 15 Nov 2022 23:09:29 +0000 (15:09 -0800)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 16 Nov 2022 23:03:30 +0000 (15:03 -0800)
commit2c87767c35ee9744f666ccec869d5fe742c3de0a
tree92cb331f3a1aa2e0abc69cd3979ba79a0bb4af73
parent1c813ce0305571e1b2e4cc4acca451da9e6ad18f
x86/fpu: Add a pkru argument to copy_uabi_to_xstate()

In preparation for moving PKRU handling code out of
fpu_copy_uabi_to_guest_fpstate() and into copy_uabi_to_xstate(), add an
argument that copy_uabi_from_kernel_to_xstate() can use to pass the
canonical location of the PKRU value. For
copy_sigframe_from_user_to_xstate() the kernel will actually restore the
PKRU value from the fpstate, but pass in the thread_struct's pkru location
anyways for consistency.

Signed-off-by: Kyle Huey <me@kylehuey.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20221115230932.7126-4-khuey%40kylehuey.com
arch/x86/kernel/fpu/xstate.c