From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.10-rc3, i386: fpu handling on sigreturn
Date: Thu, 23 Dec 2004 10:33:40 +0100 [thread overview]
Message-ID: <41CA90F4.8000800@fujitsu-siemens.com> (raw)
In-Reply-To: <20041222235448.GA17720@verdi.suse.de>
Andi Kleen wrote:
> On Thu, Dec 23, 2004 at 12:49:39AM +0100, Bodo Stroesser wrote:
>
>>Andi Kleen wrote:
>>
>>>Bodo Stroesser <bstroesser@fujitsu-siemens.com> writes:
>>>
>>>
>>>>Now, the interrupted processes fpu no longer is cleared!
>>>
>>>
>>>I agree it's a bug, although it's probably pretty obscure so people
>>>didn't notice it. The right fix would be to just clear_fpu again
>>>in this case. The problem has been in Linux forever.
>>
>>Wouldn't it be better to also reset used_math to 0? (As it has been,
>>before the sighandler was started)
>
>
> It would only be an optimization, and i doubt it's worth to optimize for
> such an obscure case.
>
> -Andi
Sorry, I don't agree. AFAICS, if used_math isn't reset, on the next
attempt of the process to use the fpu, it will be reloaded with the
values, that come from the sighandler and that still reside in
thread.i387. Thus, clear_cpu() without resetting used_math has no
effect to the userspace task.
Resetting current->used_math to 0 would make math_state_restore()
calling init_fpu(), that clears thread.i387 before the fpu is loaded.
Bodo
next prev parent reply other threads:[~2004-12-23 9:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <41C9B21F.90802@fujitsu-siemens.com.suse.lists.linux.kernel>
2004-12-22 23:24 ` 2.6.10-rc3, i386: fpu handling on sigreturn Andi Kleen
2004-12-22 23:49 ` Bodo Stroesser
2004-12-22 23:54 ` Andi Kleen
2004-12-23 9:33 ` Bodo Stroesser [this message]
2004-12-23 11:29 ` Andi Kleen
2004-12-22 17:42 Bodo Stroesser
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=41CA90F4.8000800@fujitsu-siemens.com \
--to=bstroesser@fujitsu-siemens.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.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