From: "H. Peter Anvin" <hpa@zytor.com>
To: "Warlich, Christof" <christof.warlich@siemens.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: X86 fpu registers in a signal handler's ucontext
Date: Thu, 02 May 2013 20:18:04 -0700 [thread overview]
Message-ID: <51832C6C.1030805@zytor.com> (raw)
In-Reply-To: <6D83E89737156549AEA25EF9ED712C5DDEF7@DEFTHW99EK1MSX.ww902.siemens.net>
On 04/29/2013 07:34 AM, Warlich, Christof wrote:
> Second, only FP state seems to be available through ucontext_t, and I would
> need to clear exceptions for SSE as well.
Not true.
> Can anyone give me some advice on how to I could proceed?
To optimize the common case, if the signal handler doesn't touch the FPU
the state is not reloaded from the signal stack. Therefore you need to
execute an FPU instruction -- pretty much any FPU instruction -- in your
signal handler in order to force the reload.
-hpa
prev parent reply other threads:[~2013-05-03 3:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 14:34 X86 fpu registers in a signal handler's ucontext Warlich, Christof
2013-04-29 17:57 ` Andi Kleen
2013-04-30 6:35 ` Warlich, Christof
2013-04-30 11:28 ` Mikael Pettersson
2013-04-30 13:45 ` Warlich, Christof
2013-04-30 14:42 ` Mikael Pettersson
2013-05-02 5:42 ` Warlich, Christof
2013-05-02 7:06 ` richard -rw- weinberger
2013-05-02 7:43 ` Warlich, Christof
2013-05-02 9:04 ` Warlich, Christof
2013-05-02 11:12 ` Mikael Pettersson
2013-05-03 3:18 ` H. Peter Anvin [this message]
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=51832C6C.1030805@zytor.com \
--to=hpa@zytor.com \
--cc=christof.warlich@siemens.com \
--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