提交 766b7576 编写于 作者: T Thomas Gleixner 提交者: Lin Wang

x86/fpu: Remove fpu::state

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

Intel-SIG: commit 2f27b503 x86/fpu: Remove fpu::state.

--------------------------------

All users converted. Remove it along with the sanity checks.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NBorislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211013145322.765063318@linutronix.deSigned-off-by: NLin Wang <lin.x.wang@intel.com>
上级 41b415b9
...@@ -352,20 +352,16 @@ struct fpu { ...@@ -352,20 +352,16 @@ struct fpu {
struct fpstate *fpstate; struct fpstate *fpstate;
/* /*
* @state: * @__fpstate:
* *
* In-memory copy of all FPU registers that we save/restore * Initial in-memory storage for FPU registers which are saved in
* over context switches. If the task is using the FPU then * context switch and when the kernel uses the FPU. The registers
* the registers in the FPU are more recent than this state * are restored from this storage on return to user space if they
* copy. If the task context-switches away then they get * are not longer containing the tasks FPU register state.
* saved here and represent the FPU state.
*/ */
union {
struct fpstate __fpstate; struct fpstate __fpstate;
union fpregs_state state;
};
/* /*
* WARNING: 'state' is dynamically-sized. Do not put * WARNING: '__fpstate' is dynamically-sized. Do not put
* anything after it here. * anything after it here.
*/ */
}; };
......
...@@ -184,10 +184,6 @@ static void __init fpu__init_task_struct_size(void) ...@@ -184,10 +184,6 @@ static void __init fpu__init_task_struct_size(void)
CHECK_MEMBER_AT_END_OF(struct thread_struct, fpu); CHECK_MEMBER_AT_END_OF(struct thread_struct, fpu);
CHECK_MEMBER_AT_END_OF(struct task_struct, thread); CHECK_MEMBER_AT_END_OF(struct task_struct, thread);
BUILD_BUG_ON(sizeof(struct fpstate) != sizeof(union fpregs_state));
BUILD_BUG_ON(offsetof(struct thread_struct, fpu.state) !=
offsetof(struct thread_struct, fpu.__fpstate));
arch_task_struct_size = task_size; arch_task_struct_size = task_size;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册