[Bug 162774] strace ignores int3 SIGTRAP
bugzilla at redhat.com
bugzilla at redhat.com
Wed Sep 10 12:53:10 UTC 2008
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=162774
--- Comment #6 from Denys Vlasenko <dvlasenk at redhat.com> 2008-09-10 08:53:06 EDT ---
Created an attachment (id=316309)
--> (https://bugzilla.redhat.com/attachment.cgi?id=316309)
Proof-of-concept patch
This patch sets PTRACE_O_TRACESYSGOOD option for traced child. Kernel will flag
ptrace-related signals by setting bit 0x80 in signo.
Patch contains some debugging code nad comments which are easy to spot.
Patch is run-tested. int3 example:
# /root/srcdevel/strace/fix/strace.t1/strace ./int3
ptrace(PTRACE_SETOPTIONS, ..., PTRACE_O_TRACESYSGOOD) successful
execve("./int3", ["./int3"], [/* 54 vars */]bogus SIGTRAP: made it SIGTRAP80
) = 0
--- SIGTRAP (Trace/breakpoint trap) @ 0 (0) ---
+++ killed by SIGTRAP +++
Also tried running e.g. "ls -l" and it seems that stracing of normal programs
is not affected.
In this patch, "strace -p" is not using PTRACE_O_TRACESYSGOOD trick yet.
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the fedora-triage-list
mailing list