[PATCH 128] introduce suppress_sigtrap() to prevent unwanted send_sigtrap()
Roland McGrath
roland at redhat.com
Sat Nov 7 00:06:15 UTC 2009
> I don't understand how the discussed changes in syscall_trace_leave() path
> can make any difference here.
All that part does is move all decisions about what to do into the
tracehook/utrace/ptrace layers out of arch code.
> The PTRACE_O_TRACEFORK tracee calls fork(), stops in SYSCALL_ENTRY.
>
> The tracer does PTRACE_SINGLESTEP. utrace_control(UTRACE_SINGLESTEP)
> sets TIF_SINGLESTEP.
>
> The tracee resumes, it must report PTRACE_EVENT_FORK. But, unlike
> upstream, we don't stop inside do_fork(), the tracee will stop
> in utrace_resume(). Before that, it passes syscall_trace_leave(),
> and since TIF_SINGLESTEP is set the tracee gets SIGTRAP.
After the arch/tracehook cleanup we've been discussing, what happens here
is consistent across machines. It reaches tracehook_report_syscall_exit()
with step=1, and nothing else magical happens when after returns. So that
is the hook into utrace/higher code that decides what to do. Its options
here are just like all other "stacked events" cases.
Thanks,
Roland
More information about the utrace-devel
mailing list