x86/fpu: Use copy_xstate_to_uabi_buf() in fpregs_get()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Jun 2021 12:01:44 +0000 (14:01 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 23 Jun 2021 15:49:47 +0000 (17:49 +0200)
commit3f7f75634ccefefcc929696f346db7a748e78f79
tree777eae2ecb9d67f1d468532794ddf565a7e5cafd
parentadc997b3d66d1cfa8c15a7dbafdaef239a51b5db
x86/fpu: Use copy_xstate_to_uabi_buf() in fpregs_get()

Use the new functionality of copy_xstate_to_uabi_buf() to retrieve the
FX state when XSAVE* is in use. This avoids to overwrite 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/20210623121453.014441775@linutronix.de
arch/x86/kernel/fpu/regset.c