Skip to content

Commit

Permalink
x86/fpu/xstate: Use fpstate for xsave_to_user_sigframe()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
KAGA-KOKO authored and suryasaimadhu committed Oct 21, 2021
1 parent 073e627 commit 0b2d39a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/fpu/xstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0b2d39a

Please sign in to comment.