fx->mxcsr = MXCSR_DEFAULT;
}
-extern void __sanitize_i387_state(struct task_struct *);
+extern void __fpstate_sanitize_xstate(struct task_struct *);
-static inline void sanitize_i387_state(struct task_struct *tsk)
+static inline void fpstate_sanitize_xstate(struct task_struct *tsk)
{
if (!use_xsaveopt())
return;
- __sanitize_i387_state(tsk);
+ __fpstate_sanitize_xstate(tsk);
}
#define user_insn(insn, output, input...) \
return -ENODEV;
fpu__activate_stopped(fpu);
- sanitize_i387_state(target);
+ fpstate_sanitize_xstate(target);
return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
&fpu->state.fxsave, 0, -1);
return -ENODEV;
fpu__activate_stopped(fpu);
- sanitize_i387_state(target);
+ fpstate_sanitize_xstate(target);
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
&fpu->state.fxsave, 0, -1);
&fpu->state.fsave, 0,
-1);
- sanitize_i387_state(target);
+ fpstate_sanitize_xstate(target);
if (kbuf && pos == 0 && count == sizeof(env)) {
convert_from_fxsr(kbuf, target);
fpu__activate_stopped(fpu);
- sanitize_i387_state(target);
+ fpstate_sanitize_xstate(target);
if (!static_cpu_has(X86_FEATURE_FPU))
return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf);
* if the corresponding header bit is zero. This is to ensure that user-space doesn't
* see some stale state in the memory layout during signal handling, debugging etc.
*/
-void __sanitize_i387_state(struct task_struct *tsk)
+void __fpstate_sanitize_xstate(struct task_struct *tsk)
{
struct i387_fxsave_struct *fx = &tsk->thread.fpu.state.fxsave;
int feature_bit;
if (ia32_fxstate)
fpu_fxsave(&tsk->thread.fpu);
} else {
- sanitize_i387_state(tsk);
+ fpstate_sanitize_xstate(tsk);
if (__copy_to_user(buf_fx, xsave, xstate_size))
return -1;
}