x86/fpu: Use copy_xstate_to_uabi_buf() in xfpregs_get()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Jun 2021 12:01:43 +0000 (14:01 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 23 Jun 2021 15:49:47 +0000 (17:49 +0200)
commitadc997b3d66d1cfa8c15a7dbafdaef239a51b5db
tree0606a36b68d671b03ecb1cf694a4e3d3d1743618
parenteb6f51723f03c9a1c098ed196a31a03e626b9fb6
x86/fpu: Use copy_xstate_to_uabi_buf() in xfpregs_get()

Use the new functionality of copy_xstate_to_uabi_buf() to retrieve the
FX state when XSAVE* is in use. This avoids overwriting the FPU state
buffer with fpstate_sanitize_xstate() which is error prone and duplicated
code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210623121452.901736860@linutronix.de
arch/x86/kernel/fpu/regset.c