diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-10-15 01:09:35 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-10-21 20:36:58 +0200 |
commit | 1c253ff2287fe31307a67938c4487936db967ff5 (patch) | |
tree | 11268e05b6b6c3b55b45b31acce96fd3fec3abf1 /arch/x86/kernel/fpu/signal.c | |
parent | x86/fpu: Move xstate size to fpu_*_cfg (diff) | |
download | linux-1c253ff2287fe31307a67938c4487936db967ff5.tar.xz linux-1c253ff2287fe31307a67938c4487936db967ff5.zip |
x86/fpu: Move xstate feature masks to fpu_*_cfg
Move the feature mask storage to the kernel and user config
structs. Default and maximum feature set are the same for now.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211014230739.352041752@linutronix.de
Diffstat (limited to 'arch/x86/kernel/fpu/signal.c')
-rw-r--r-- | arch/x86/kernel/fpu/signal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c index fab440369663..c14f477f5651 100644 --- a/arch/x86/kernel/fpu/signal.c +++ b/arch/x86/kernel/fpu/signal.c @@ -417,7 +417,8 @@ static bool __fpu_restore_sig(void __user *buf, void __user *buf_fx, u64 mask = user_xfeatures | xfeatures_mask_supervisor(); fpregs->xsave.header.xfeatures &= mask; - success = !os_xrstor_safe(&fpregs->xsave, xfeatures_mask_all); + success = !os_xrstor_safe(&fpregs->xsave, + fpu_kernel_cfg.max_features); } else { success = !fxrstor_safe(&fpregs->fxsave); } |