[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Bug 162774] strace ignores int3 SIGTRAP

Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


--- Comment #8 from Denys Vlasenko <dvlasenk redhat com>  2008-09-10 11:44:57 EDT ---
The "bug" of extra SIGTRAP which patch works around is not really a bug, it's a
feature of execve:

       execve - execute program
       If  the current program is being ptraced, a SIGTRAP is sent to it after
       a successful execve().

This extra SIGTRAP is not affected by PTRACE_O_TRACESYSGOOD option. In my
opinion, this SIGTRAP should not be passed to straced program as this may
change its behavior, so handling of this SIGTRAP as coded in the patch is
correct, only comment

+  /* Kernel bug (observed on 2.6.25 x86_64):
+   * even if we set PTRACE_O_TRACESYSGOOD option,
+   * after execve(), post-syscall ptrace-generated SIGTRAP
+   * has signo == SIGTRAP, not (SIGTRAP | 0x80)!
+   * Detect it by looking at siginfo.
+   */

nees changing. I am not sure whether the detection is future-proof (why kernel
doesn't fill in correct si.si_signo? What would happen if it would be fixed in
kernel? etc), but so far it works.

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.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]