From d0903193124132c6bb59a895eeb0656f86013da1 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 28 Apr 2015 11:11:10 +0200 Subject: x86/fpu: Rename sanitize_i387_state() to fpstate_sanitize_xstate() So the sanitize_i387_state() function has the following purpose: on CPUs that support optimized xstate saving instructions, an FPU fpstate might end up having partially uninitialized data. This function initializes that data. Note that the function name is a misnomer and confusing on two levels, not only is it not i387 specific at all, but it is the exact opposite: it only matters on xstate CPUs. So rename sanitize_i387_state() and __sanitize_i387_state() to fpstate_sanitize_xstate() and __fpstate_sanitize_xstate(), to clearly express the purpose and usage of the function. We'll further clean up this function in the next patch. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar --- arch/x86/include/asm/fpu/internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/x86/include/asm/fpu') diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h index 161b51bf267e..6b6fa46037f8 100644 --- a/arch/x86/include/asm/fpu/internal.h +++ b/arch/x86/include/asm/fpu/internal.h @@ -139,13 +139,13 @@ static inline void fx_finit(struct i387_fxsave_struct *fx) 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...) \ -- cgit v1.2.3