linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* restore_user_regs and fpu
@ 2006-01-04 18:36 Heikki Lindholm
  2006-01-11 11:11 ` Paul Mackerras
  0 siblings, 1 reply; 2+ messages in thread
From: Heikki Lindholm @ 2006-01-04 18:36 UTC (permalink / raw)
  To: linuxppc-dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-11 11:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-04 18:36 restore_user_regs and fpu Heikki Lindholm
2006-01-11 11:11 ` Paul Mackerras

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).