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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Jan 2023 09:33:41 +0000 (10:33 +0100)
commitbfa72faf69e82f7d64fefe0ca162f803d98e6679
treeeaafc6382ee6567e14076b338b10da56b5f98882
parenta442736b704d4194ae68f75f4ee2e64cf2b8a142
x86/fpu: Add a pkru argument to copy_uabi_to_xstate()

commit 2c87767c35ee9744f666ccec869d5fe742c3de0a upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/fpu/xstate.c