From: Andi Kleen <andi@firstfloor.org>
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: Mon, 29 Apr 2013 10:57:34 -0700 [thread overview]
Message-ID: <m2a9ohusmp.fsf@firstfloor.org> (raw)
In-Reply-To: <6D83E89737156549AEA25EF9ED712C5DDEF7@DEFTHW99EK1MSX.ww902.siemens.net> (Christof Warlich's message of "Mon, 29 Apr 2013 14:34:41 +0000")
"Warlich, Christof" <christof.warlich@siemens.com> writes:
>
> First, this link:
> http://valgrind.10908.n7.nabble.com/need-FPU-and-SSE-state-in-sigcontext-ucontext-td19844.html
> suggests that unlike the GPRs, the FP registers are _not_ restored after
> returnung from the signal handler.
The FP registers are restored lazily, but the state for this is kept in
the kernel.
One easy way may be to catch the FPU exception too and clear from there?
There can be some complications with different save formats too (XSAVE
vs FXSAVE). So your solution may not be necessarily 100% portable
to all systems.
-Andi
--
ak@linux.intel.com -- Speaking for myself only
next prev parent reply other threads:[~2013-04-29 17:57 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 [this message]
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
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=m2a9ohusmp.fsf@firstfloor.org \
--to=andi@firstfloor.org \
--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