diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-04-28 11:25:02 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-19 15:48:00 +0200 |
commit | 36e49e7f2ec8fa2cdf1ec0439374583ea0a82c47 (patch) | |
tree | 45aea69b1b3511affa63b0589fdee4d58a630319 /arch/x86/kernel/fpu/xstate.c | |
parent | x86/fpu: Simplify fpstate_sanitize_xstate() calls (diff) | |
download | linux-36e49e7f2ec8fa2cdf1ec0439374583ea0a82c47.tar.xz linux-36e49e7f2ec8fa2cdf1ec0439374583ea0a82c47.zip |
x86/fpu: Pass 'struct fpu' to fpstate_sanitize_xstate()
Currently fpstate_sanitize_xstate() has a task_struct input parameter,
but it only uses the fpu structure from it - so pass in a 'struct fpu'
pointer only and update all call sites.
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/fpu/xstate.c')
-rw-r--r-- | arch/x86/kernel/fpu/xstate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c index 47b9591947e1..a8ce38a9d70b 100644 --- a/arch/x86/kernel/fpu/xstate.c +++ b/arch/x86/kernel/fpu/xstate.c @@ -92,16 +92,16 @@ EXPORT_SYMBOL_GPL(cpu_has_xfeatures); * 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 fpstate_sanitize_xstate(struct task_struct *tsk) +void fpstate_sanitize_xstate(struct fpu *fpu) { - struct i387_fxsave_struct *fx = &tsk->thread.fpu.state.fxsave; + struct i387_fxsave_struct *fx = &fpu->state.fxsave; int feature_bit; u64 xfeatures; if (!use_xsaveopt()) return; - xfeatures = tsk->thread.fpu.state.xsave.header.xfeatures; + xfeatures = fpu->state.xsave.header.xfeatures; /* * None of the feature bits are in init state. So nothing else @@ -318,7 +318,7 @@ int save_xstate_sig(void __user *buf, void __user *buf_fx, int size) if (ia32_fxstate) fpu_fxsave(&tsk->thread.fpu); } else { - fpstate_sanitize_xstate(tsk); + fpstate_sanitize_xstate(&tsk->thread.fpu); if (__copy_to_user(buf_fx, xsave, xstate_size)) return -1; } |