lkml.org 
[lkml]   [2008]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] x64, fpu: fix possible FPU leakage in error conditions
On Thu, Jul 24, 2008 at 11:59:03AM -0700, Linus Torvalds wrote:
>
> On Thu, 24 Jul 2008, Suresh Siddha wrote:
> >
> > If we don't do init_fpu() + restore from the sane init state, process has
> > to be killed, in the paranoid failing scenario of math_state_restore()
>
> Umm. I'm still not seeing why the right answer is not just to do "stts +
> math_used = 0".
>
> And the specific case of math_state_restore(), that will also fix the
> problem - next time around.

Ok.

> As far as I can tell, your patch causes serious problems in case
> init_fpu() fails. Which it can do, afaik.

Only the first init_fpu() can fail (memory allocation failure). But here,
it is def not the first time.

Anyhow, your suggestion is simple and clean. Will post the patch shortly.

I have to do clear_fpu() though(stts + math_used = 0 may not be enough).

thanks,
suresh


\
 
 \ /
  Last update: 2008-07-24 22:29    [W:0.041 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site