/[qemu]
ViewVC logotype

Revision 7194


Jump to revision: Previous Next
Author: pbrook
Date: Tue Apr 21 01:41:10 2009 UTC (14 years, 7 months ago)
Changed paths: 3
Log Message:
MIPS signal handling fixes.

Also fixes a register corruption bug in do_sigreturn. When "returning"
from sigreturn we are actually restoring the virtual cpu state from the
signal frame.  This is actually surprisingly hard to observe in practice.

Typically an thread be blocked in a FUTEX_WAIT call when the signal arrives,
so the effect is a spurious syscall success and the introduction of a
subtle race condition.

On x86/arm a syscall modifies a single word sized register, so
do_sigreturn can just return that value.  On MIPS a syscall clobbers
multiple registers, so we need additional smarts.  My solution is to
invent a magic errno value that means "don't touch CPU state".

Changed paths:

Path Details
Directorytrunk/linux-user/main.c modified , text changed
Directorytrunk/linux-user/mips/syscall.h modified , text changed
Directorytrunk/linux-user/signal.c modified , text changed

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.5