From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"andi@firstfloor.org" <andi@firstfloor.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"stable@kernel.org" <stable@kernel.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [patch] x64, fpu: fix possible FPU leakage in error conditions
Date: Thu, 24 Jul 2008 13:27:28 -0700 [thread overview]
Message-ID: <20080724202728.GL14380@linux-os.sc.intel.com> (raw)
In-Reply-To: <alpine.LFD.1.10.0807241154260.3237@nehalem.linux-foundation.org>
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
next prev parent reply other threads:[~2008-07-24 20:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 18:04 [patch] x64, fpu: fix possible FPU leakage in error conditions Suresh Siddha
2008-07-24 18:31 ` Linus Torvalds
2008-07-24 18:50 ` Suresh Siddha
2008-07-24 18:59 ` Linus Torvalds
2008-07-24 20:27 ` Suresh Siddha [this message]
2008-07-24 20:30 ` Linus Torvalds
2008-07-24 21:23 ` Suresh Siddha
2008-07-24 21:54 ` Linus Torvalds
2008-07-24 22:25 ` Suresh Siddha
2008-07-24 22:43 ` Linus Torvalds
2008-07-24 23:02 ` Suresh Siddha
2008-07-24 23:06 ` Suresh Siddha
2008-07-24 23:16 ` Linus Torvalds
2008-07-25 1:07 ` Suresh Siddha
2008-07-26 14:37 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080724202728.GL14380@linux-os.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox