Re: [RFC PATCH 7/X] ptrace: mv task->parent ptrace_task->pt_tracer

Roland McGrath
2009-05-27T02:11:50Z

> But is the current code correct? If we are not traced any longer
> si_pid/si_uid are not necessary right either, we should calculate them
> before ptrace_stop(), no?

Yes, though nothing really cares about these values for such cases.
(It's really only there for dealing with debuggers that were written
before PTRACE_SETSIGINFO was invented.)

It's probably best now to clean this up so that this logic is
applied in the tracer causing the resumption rather than in the
tracee. i.e. do it in ptrace_resume() and ptrace_detach(). It's
only now with your exhaustive clean-up of ptrace that we will get
really confident that we are covering all the possible paths that
can change ->exit_code and then resume it. (I think those two are
it, but you should check my logic.)

Thanks,
Roland