7d94143291
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> |
||
---|---|---|
.. | ||
cpufreq | ||
acpi-ext.c | ||
acpi-processor.c | ||
acpi.c | ||
asm-offsets.c | ||
audit.c | ||
brl_emu.c | ||
crash_dump.c | ||
crash.c | ||
cyclone.c | ||
efi_stub.S | ||
efi.c | ||
entry.h | ||
entry.S | ||
err_inject.c | ||
esi_stub.S | ||
esi.c | ||
fsys.S | ||
fsyscall_gtod_data.h | ||
gate-data.S | ||
gate.lds.S | ||
gate.S | ||
head.S | ||
ia64_ksyms.c | ||
init_task.c | ||
iosapic.c | ||
irq_ia64.c | ||
irq_lsapic.c | ||
irq.c | ||
ivt.S | ||
jprobes.S | ||
kprobes.c | ||
machine_kexec.c | ||
machvec.c | ||
Makefile | ||
mca_asm.S | ||
mca_drv_asm.S | ||
mca_drv.c | ||
mca_drv.h | ||
mca.c | ||
minstate.h | ||
module.c | ||
msi_ia64.c | ||
numa.c | ||
pal.S | ||
palinfo.c | ||
patch.c | ||
perfmon_default_smpl.c | ||
perfmon_generic.h | ||
perfmon_itanium.h | ||
perfmon_mckinley.h | ||
perfmon_montecito.h | ||
perfmon.c | ||
process.c | ||
ptrace.c | ||
relocate_kernel.S | ||
sal.c | ||
salinfo.c | ||
semaphore.c | ||
setup.c | ||
sigframe.h | ||
signal.c | ||
smp.c | ||
smpboot.c | ||
sys_ia64.c | ||
time.c | ||
topology.c | ||
traps.c | ||
unaligned.c | ||
uncached.c | ||
unwind_decoder.c | ||
unwind_i.h | ||
unwind.c | ||
vmlinux.lds.S |