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: Sat, 6 Feb 2010 13:08:15 +0100 [thread overview]
Message-ID: <20100206120815.GB22280@redhat.com> (raw)
In-Reply-To: <20100206120640.GA22280@redhat.com>
On 02/06, Oleg Nesterov wrote:
>
> On 02/05, Oleg Nesterov wrote:
> >
> > 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?
> >
> > So, the task must have the valid ->thread.xstate,
>
> This is probably correct. But a malicious user can set sc->fpsate
> and fool the kernel, so we must assume buf != NULL implies the
^^^^
can't
> valid ->xstate.
Oleg.
next prev parent reply other threads:[~2010-02-06 12:09 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 [this message]
2010-02-08 18:48 ` Suresh Siddha
2010-02-08 20:26 ` Oleg Nesterov
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=20100206120815.GB22280@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