Re: [PATCH] x86: Reset FPU on exec

2015-04-21 Thread Thomas Gleixner
Andi, On Tue, 21 Apr 2015, Andi Kleen wrote: > > What's the exact purpose of this patch aside of breaking the build? > > Try reading the description? I'll try to decrypt that once I have a functional patch. > Also it builds fine here. I don't care whether it builds for you on your random tree

Re: [PATCH] x86: Reset FPU on exec

2015-04-21 Thread Andi Kleen
On Tue, Apr 21, 2015 at 11:35:58AM +0200, Thomas Gleixner wrote: > On Fri, 17 Apr 2015, Andi Kleen wrote: > > > +void reset_fpu(void) > > +{ > > + drop_init_fpu(current); > > +} > > So we have a new function which is merily a wrapper around a non > existent function. I originally tried to use

Re: [PATCH] x86: Reset FPU on exec

2015-04-21 Thread Thomas Gleixner
On Fri, 17 Apr 2015, Andi Kleen wrote: > +void reset_fpu(void) > +{ > + drop_init_fpu(current); > +} So we have a new function which is merily a wrapper around a non existent function. What's the exact purpose of this patch aside of breaking the build? May I recommend reading and following

[PATCH] x86: Reset FPU on exec

2015-04-17 Thread Andi Kleen
From: Andi Kleen Currently we don't reset FPU state on exec. This can be seen as a (minor) security issue. The bigger issue however is that the AVX state also does not get reset. So a program that uses SSE without VZEROUPPER may get a large penalty. Always set the FPU to the init state at exec t