x86/fpu/signal: Sanitize the xstate check on sigframe
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Jun 2021 12:02:27 +0000 (14:02 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 23 Jun 2021 18:02:46 +0000 (20:02 +0200)
commit1258a8c896044564514c1b53795ba3033b1e9fd6
tree2539d5498140af9754cafd7e5a7df683e37bae4c
parent9ba589f9cdbd8906465b108bc7ec0fc1519a06d3
x86/fpu/signal: Sanitize the xstate check on sigframe

Utilize the check for the extended state magic in the FX software reserved
bytes and set the parameters for restoring fx_only in the relevant members
of fw_sw_user.

This allows further cleanups on top because the data is consistent.

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/20210623121457.277738268@linutronix.de
arch/x86/kernel/fpu/signal.c