Hi. This is my first post to this list (not that i'm even subscribed) and am
very new to linux internals so apologies up front :)
There is a subtle bug in the behaviour of ptrace when modifying the EIP
register. Noteably, if the eip changes and a syscall was interrupted, the
signal handling code will subtract 2 from the eip thinking its trying to
restart the syscall (obviously, only on systems that restart slow syscalls).
This behaviour could cause problems with debuggers that change the execution
My fix would be to change orig_eax to -1 if the eip register is modified.
Thus the signal handling code wouldnt think it needed to restart any syscalls.
This is untested code btw.
in the putreg function
put_stack_long(child, 4*ORIG_EAX - sizeof(struct pt_regs), -1);
I believe that is all that is required, but since I'd hardly call myself a
kernel hacker I'll let the experts decide. Its highly likely that many other
unix systems have this same problem.
Please reply to this email personally, as I'm not a subscriber to this
-- Silvio - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:13 EST