OSDN Git Service

x86/fpu/signal: Prepare for variable sigframe length
authorChang S. Bae <chang.seok.bae@intel.com>
Thu, 21 Oct 2021 22:55:13 +0000 (15:55 -0700)
committerBorislav Petkov <bp@suse.de>
Tue, 26 Oct 2021 08:18:09 +0000 (10:18 +0200)
commit53599b4d54b9b8dda1d537a558946869d2acbddc
treec644c9d2ec95f2068954e47463e833c40d09d939
parent4b7ca609a33dd8696bcbd2f1ad949e26a591592f
x86/fpu/signal: Prepare for variable sigframe length

The software reserved portion of the fxsave frame in the signal frame
is copied from structures which have been set up at boot time. With
dynamically enabled features the content of these structures is no
longer correct because the xfeatures and size can be different per task.

Calculate the software reserved portion at runtime and fill in the
xfeatures and size values from the tasks active fpstate.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211021225527.10184-10-chang.seok.bae@intel.com
arch/x86/kernel/fpu/internal.h
arch/x86/kernel/fpu/signal.c
arch/x86/kernel/fpu/xstate.c