x86/fpu: Reset permission and fpstate on exec()
mainline inclusion from mainline-v5.16-rc1 commit e61d6310 category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I590ZC CVE: NA Intel-SIG: commit e61d6310 x86/fpu: Reset permission and fpstate on exec(). -------------------------------- On exec(), extended register states saved in the buffer is cleared. With dynamic features, each task carries variables besides the register states. The struct fpu has permission information and struct fpstate contains buffer size and feature masks. They are all dynamically updated with dynamic features. Reset the current task's entire FPU data before an exec() so that the new task starts with default permission and fpstate. Rename the register state reset function because the old naming confuses as it does not reset struct fpstate. 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-12-chang.seok.bae@intel.comSigned-off-by: NLin Wang <lin.x.wang@intel.com>
Showing
想要评论请 注册 或 登录