Re: [PATCH 3/8] x86, fpu: kill save_init_fpu(), change math_error() to use unlazy_fpu()

2015-02-17 Thread Oleg Nesterov
On 02/16, Rik van Riel wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 02/16/2015 04:09 PM, Borislav Petkov wrote: > > On Fri, Feb 06, 2015 at 03:02:00PM -0500, r...@redhat.com wrote: > >> From: Oleg Nesterov > > >> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c

Re: [PATCH 3/8] x86, fpu: kill save_init_fpu(), change math_error() to use unlazy_fpu()

2015-02-17 Thread Oleg Nesterov
On 02/16, Rik van Riel wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/16/2015 04:09 PM, Borislav Petkov wrote: On Fri, Feb 06, 2015 at 03:02:00PM -0500, r...@redhat.com wrote: From: Oleg Nesterov o...@redhat.com diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c

Re: [PATCH 3/8] x86, fpu: kill save_init_fpu(), change math_error() to use unlazy_fpu()

2015-02-16 Thread Rik van Riel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/16/2015 04:09 PM, Borislav Petkov wrote: > On Fri, Feb 06, 2015 at 03:02:00PM -0500, r...@redhat.com wrote: >> From: Oleg Nesterov >> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c >> index fb4cb6adf225..51c465846f06 100644

Re: [PATCH 3/8] x86, fpu: kill save_init_fpu(), change math_error() to use unlazy_fpu()

2015-02-16 Thread Borislav Petkov
On Fri, Feb 06, 2015 at 03:02:00PM -0500, r...@redhat.com wrote: > From: Oleg Nesterov > > math_error() calls save_init_fpu() after conditional_sti(), this means > that the caller can be preempted. If !use_eager_fpu() we can hit the > WARN_ON_ONCE(!__thread_has_fpu(tsk)) and/or save the wrong

Re: [PATCH 3/8] x86, fpu: kill save_init_fpu(), change math_error() to use unlazy_fpu()

2015-02-16 Thread Borislav Petkov
On Fri, Feb 06, 2015 at 03:02:00PM -0500, r...@redhat.com wrote: From: Oleg Nesterov o...@redhat.com math_error() calls save_init_fpu() after conditional_sti(), this means that the caller can be preempted. If !use_eager_fpu() we can hit the WARN_ON_ONCE(!__thread_has_fpu(tsk)) and/or save

Re: [PATCH 3/8] x86, fpu: kill save_init_fpu(), change math_error() to use unlazy_fpu()

2015-02-16 Thread Rik van Riel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/16/2015 04:09 PM, Borislav Petkov wrote: On Fri, Feb 06, 2015 at 03:02:00PM -0500, r...@redhat.com wrote: From: Oleg Nesterov o...@redhat.com diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index fb4cb6adf225..51c465846f06

[PATCH 3/8] x86, fpu: kill save_init_fpu(), change math_error() to use unlazy_fpu()

2015-02-06 Thread riel
From: Oleg Nesterov math_error() calls save_init_fpu() after conditional_sti(), this means that the caller can be preempted. If !use_eager_fpu() we can hit the WARN_ON_ONCE(!__thread_has_fpu(tsk)) and/or save the wrong FPU state. Change math_error() to use unlazy_fpu() and kill save_init_fpu().

[PATCH 3/8] x86, fpu: kill save_init_fpu(), change math_error() to use unlazy_fpu()

2015-02-06 Thread riel
From: Oleg Nesterov o...@redhat.com math_error() calls save_init_fpu() after conditional_sti(), this means that the caller can be preempted. If !use_eager_fpu() we can hit the WARN_ON_ONCE(!__thread_has_fpu(tsk)) and/or save the wrong FPU state. Change math_error() to use unlazy_fpu() and kill