From: Oleg Nesterov <oleg@redhat.com>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: PATCH? process_32.c:__switch_to() calls __math_state_restore() before updating current_task
Date: Mon, 8 Feb 2010 21:26:52 +0100 [thread overview]
Message-ID: <20100208202652.GA27043@redhat.com> (raw)
In-Reply-To: <1265654890.2843.27.camel@sbs-t61.sc.intel.com>
On 02/08, Suresh Siddha wrote:
>
> On Fri, 2010-02-05 at 04:44 -0800, Oleg Nesterov wrote:
> > Could you please explain me another issue? I know nothing about fpu
> > handling, I am reading this code trying to understand the unrelated
> > bug with the old kernel.
> >
> > In short: why restore_i387_xstate() does init_fpu() when !used_math(),
> > can't (or shouldn't) it merely do set_used_math() ?
> >
> > restore_i387_xstate:
> >
> > if (!used_math()) {
> > err = init_fpu(tsk);
> > if (err)
> > return err;
> > }
> >
> > note that buf != NULL. This means that used_math() was true when
> > get_sigframe() was called, otherwise buf == sigcontext->fpstate
> > would be NULL, right?
>
> No. When the signal is delivered sigcontext->fpstate can be null and
> when we return from the signal handler, user can update the
> sigcontext->fpstate pointer
Yes, I already realized this, see my next emails.
> and the user expects the kernel to update
> the fpstate of the process accordingly.
but I didn't know it is "officially" allowed to populate .xstate
this way.
Thanks Suresh for your explanations.
Oleg.
prev parent reply other threads:[~2010-02-08 20:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 16:51 PATCH? process_32.c:__switch_to() calls __math_state_restore() before updating current_task Oleg Nesterov
2010-02-04 17:40 ` Suresh Siddha
2010-02-05 12:44 ` Oleg Nesterov
2010-02-06 12:06 ` Oleg Nesterov
2010-02-06 12:08 ` Oleg Nesterov
2010-02-08 18:48 ` Suresh Siddha
2010-02-08 20:26 ` Oleg Nesterov [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=20100208202652.GA27043@redhat.com \
--to=oleg@redhat.com \
--cc=arjan@linux.intel.com \
--cc=jeremy.fitzhardinge@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=suresh.b.siddha@intel.com \
/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