提交 35318ecb 编写于 作者: T Thomas Gleixner 提交者: Aichun Shi

x86/fpu/xstate: Use fpstate for xsave_to_user_sigframe()

mainline inclusion
from mainline-v5.16-rc1
commit 0b2d39aa
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I590ZC
CVE: NA

Intel-SIG: commit 0b2d39aa 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: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NBorislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211013145323.077781448@linutronix.deSigned-off-by: NLin Wang <lin.x.wang@intel.com>
Signed-off-by: NAichun Shi <aichun.shi@intel.com>
上级 dcd0c974
......@@ -153,7 +153,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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册