[PATCH] Reliably detect post-execve trap on ia64

Roland McGrath roland at redhat.com
Mon Feb 1 20:05:56 UTC 2010


> +	if (!ia32 && !(tcp->flags & TCB_INSYSCALL) && tcp->scno == SYS_execve) {
> +		siginfo_t si;
> +
> +		/* Check whether this is the execve post-exec signal.  */
> +		if (ptrace(PTRACE_GETSIGINFO, tcp->pid, 0, (long)&si) == 0)
> +			if (si.si_code == SI_USER)
> +				return 0;

Really?  That just tells you it is any real SIGTRAP without si_code set.
Is there no other such signal an ia64 kernel can produce?

So, a few questions arise.

What made this change necessary?  Your comment says, "Reliably detect ..."
but you haven't described what is unreliable about what it does today.

For recent kernels, this issue is moot if we use PTRACE_O_TRACEEXEC.  You
had a patch to do just that, which had some unresolved nits in the review.
Why not just resolve those issues so we can merge that patch instead?


Thanks,
Roland




More information about the Strace-devel mailing list