x86/fpu: Prepare fpu_clone() for dynamically enabled features
mainline inclusion from mainline-v5.16-rc1 commit 9e798e9a category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I590ZC CVE: NA Intel-SIG: commit 9e798e9a x86/fpu: Prepare fpu_clone() for dynamically enabled features. -------------------------------- The default portion of the parent's FPU state is saved in a child task. With dynamic features enabled, the non-default portion is not saved in a child's fpstate because these register states are defined to be caller-saved. The new task's fpstate is therefore the default buffer. Fork inherits the permission of the parent. Also, do not use memcpy() when TIF_NEED_FPU_LOAD is set because it is invalid when the parent has dynamic features. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NChang S. Bae <chang.seok.bae@intel.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20211021225527.10184-11-chang.seok.bae@intel.comSigned-off-by: NLin Wang <lin.x.wang@intel.com>
Showing
想要评论请 注册 或 登录