[PATCH 100-103] ptrace_resume cleanup/simplification

Oleg Nesterov oleg at redhat.com
Mon Oct 19 16:17:42 UTC 2009


On 10/19, Oleg Nesterov wrote:
>
> On 10/19, Oleg Nesterov wrote:
> >
> > On 10/18, Oleg Nesterov wrote:
> > >
> > > > The semantics is that the entry report always does like
> > > > UTRACE_SYSCALL_ABORT to skip the actual call, and then
> > > > there is no exit report.
> > >
> > > Thanks! this is easy.
> >
> > Hmm. This is not what I see in upstream kernel...
> >
> > Afaics, PTRACE_SYSEMU means:
> >
> > 	- cancel this syscall, and do _not_ report SYSCALL_ENTRY
> > 	  to the tracer
>
> Argh, I missreaf the next check after test_thread_flag(TIF_SYSCALL_EMU)
> in syscall_trace_enter(), we should report SYSCALL_ENTRY and stop...
>
> > 	- SYSCALL_EXIT should be reported,

OMG, now I misread ptrace_resume(). SYSEMU doesn't set TIF_SYSCALL_TRACE,
so SYSCALL_EXIT should not be reported.

Sorry for noise...

So. Looks like the only complication is that we should avoid
the unnecessary send_sigtrap() in syscall_trace_leave(), but
we shouldn't use TIF_SYSCALL_EMU - it must die.

Correct?

Oleg.




More information about the utrace-devel mailing list