From: Heikki Lindholm <holindho@cs.helsinki.fi>
To: linuxppc-dev@ozlabs.org
Subject: restore_user_regs and fpu
Date: Wed, 04 Jan 2006 20:36:25 +0200 [thread overview]
Message-ID: <43BC15A9.7010009@cs.helsinki.fi> (raw)
Hello,
I haven't really confirmed this can happen, but I was wondering whether
the following would be possible. Looking at restore_user_regs in
ppc/kernel/signal_32.c and assuming:
* last_task_used_math == current, eg. a signal handler used fpu
* fpu state is still what the sig handler left there
If after the fpu state is restored to current->thread.fpr (copy_user)
somebody preempts this task and uses fpu, wouldn't it cause the fpu
state (of the sig handler) to be saved to
last_task_used_math->thread.fpr overwriting the just restored state.
Should the last_task_used_math nullifying, etc. be moved to the front of
the function instead, or am I overlooking something?
-- Heikki Lindholm
next reply other threads:[~2006-01-04 19:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-04 18:36 Heikki Lindholm [this message]
2006-01-11 11:11 ` restore_user_regs and fpu Paul Mackerras
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=43BC15A9.7010009@cs.helsinki.fi \
--to=holindho@cs.helsinki.fi \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).