Roland McGrath 7d94143291 Fix spurious syscall tracing after PTRACE_DETACH + PTRACE_ATTACH
When PTRACE_SYSCALL was used and then PTRACE_DETACH is used, the
TIF_SYSCALL_TRACE flag is left set on the formerly-traced task.  This
means that when a new tracer comes along and does PTRACE_ATTACH, it's
possible he gets a syscall tracing stop even though he's never used
PTRACE_SYSCALL.  This happens if the task was in the middle of a system
call when the second PTRACE_ATTACH was done.  The symptom is an
unexpected SIGTRAP when the tracer thinks that only SIGSTOP should have
been provoked by his ptrace calls so far.

A few machines already fixed this in ptrace_disable (i386, ia64, m68k).
But all other machines do not, and still have this bug.  On x86_64, this
constitutes a regression in IA32 compatibility support.

Since all machines now use TIF_SYSCALL_TRACE for this, I put the
clearing of TIF_SYSCALL_TRACE in the generic ptrace_detach code rather
than adding it to every other machine's ptrace_disable.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-10 18:57:47 -07:00
..
2007-08-15 13:20:38 -07:00
2007-05-11 05:38:25 -04:00
2005-04-16 15:20:36 -07:00
2007-07-17 10:22:59 -07:00
2007-07-19 13:48:00 -07:00
2007-05-10 09:35:30 -07:00
2006-06-21 11:19:22 -07:00
2006-06-21 11:19:22 -07:00
2005-04-16 15:20:36 -07:00
2006-07-31 13:28:43 -07:00
2007-07-09 13:37:44 -07:00
2007-07-25 13:08:26 -07:00
2007-07-29 17:09:29 -07:00
2007-05-11 14:55:43 -07:00
2006-12-12 12:00:55 -08:00
2007-05-11 14:55:43 -07:00
2006-09-26 14:44:37 -07:00
2007-08-13 13:22:45 -07:00
2007-05-11 14:55:43 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-12-07 10:48:19 -08:00
2007-07-31 15:39:38 -07:00
2007-05-11 14:55:43 -07:00
2007-05-11 14:55:43 -07:00
2005-04-16 15:20:36 -07:00
2007-05-08 14:51:59 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2007-06-26 13:33:10 -07:00