diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-10-13 17:55:51 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-10-21 15:04:46 +0300 |
commit | 0b2d39aa03574eb401cdfaac2f483a6f68173355 (patch) | |
tree | 13cc19b2949c01bb763defda7879ba56e448df13 /arch/x86/kernel/fpu/xstate.h | |
parent | 073e627a4537e682c43a1e8df659ce24cbced40c (diff) | |
download | linux-0b2d39aa03574eb401cdfaac2f483a6f68173355.tar.xz |
x86/fpu/xstate: Use fpstate for xsave_to_user_sigframe()
With dynamically enabled features the sigframe code must know the features
which are enabled for the task. Get them from fpstate.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211013145323.077781448@linutronix.de
Diffstat (limited to 'arch/x86/kernel/fpu/xstate.h')
-rw-r--r-- | arch/x86/kernel/fpu/xstate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/fpu/xstate.h b/arch/x86/kernel/fpu/xstate.h index 24a1479caea2..3e9eaf9f7cf3 100644 --- a/arch/x86/kernel/fpu/xstate.h +++ b/arch/x86/kernel/fpu/xstate.h @@ -149,7 +149,7 @@ static inline int xsave_to_user_sigframe(struct xregs_state __user *buf) * internally, e.g. PKRU. That's user space ABI and also required * to allow the signal handler to modify PKRU. */ - u64 mask = xfeatures_mask_uabi(); + u64 mask = current->thread.fpu.fpstate->user_xfeatures; u32 lmask = mask; u32 hmask = mask >> 32; int err; |