public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: liuj97@gmail.com (Jiang Liu)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFT PATCH v2 3/4] arm64: reduce duplicated code when saving/restoring FPSIMD for signal handling
Date: Tue, 15 Oct 2013 00:01:20 +0800	[thread overview]
Message-ID: <525C1550.5090208@gmail.com> (raw)
In-Reply-To: <20131014154401.GG7682@arm.com>

On 10/14/2013 11:44 PM, Catalin Marinas wrote:
> On Sun, Oct 13, 2013 at 03:20:19PM +0100, Jiang Liu wrote:
>> +void fpsimd_prepare_sigctx(struct fpsimd_state *state)
>> +{
>> +	/* dump the hardware registers to the fpsimd_state structure */
>> +	fpsimd_save_state(state);
>> +	fpsimd_clear_fpsr();
>> +}
> 
> What don't particularly like is that you save the FP context and then
> corrupt it. Can we get preempted after this function and before we save
> it on the signal stack?
> 
Yeah, good point!
There's a race window to get preempted, will fix it.
Thanks!
Gerry

  reply	other threads:[~2013-10-14 16:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-13 14:20 [RFT PATCH v2 1/4] arm64: fix possible invalid FPSIMD initialization state Jiang Liu
2013-10-13 14:20 ` [RFT PATCH v2 2/4] arm64: restore FPSIMD to default state for kernel and signal contexts Jiang Liu
2013-10-14 15:16   ` Will Deacon
2013-10-14 15:30     ` Jiang Liu
2013-10-14 15:39       ` Will Deacon
2013-10-14 15:50         ` Jiang Liu
2013-10-14 15:23   ` Catalin Marinas
2013-10-13 14:20 ` [RFT PATCH v2 3/4] arm64: reduce duplicated code when saving/restoring FPSIMD for signal handling Jiang Liu
2013-10-14 15:44   ` Catalin Marinas
2013-10-14 16:01     ` Jiang Liu [this message]
2013-10-13 14:20 ` [RFT PATCH v2 4/4] arm64: reuse FPSIMD hardware context if possible Jiang Liu
2013-10-14 13:54 ` [RFT PATCH v2 1/4] arm64: fix possible invalid FPSIMD initialization state Catalin Marinas
2013-10-14 13:58   ` Jiang Liu

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=525C1550.5090208@gmail.com \
    --to=liuj97@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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