Oleg Nesterov <oleg@xxxxxxxxxx> writes: > On 04/06, Matt Helsley wrote: >> >> On Mon, Apr 05, 2010 at 08:44:43PM -0700, Roland McGrath wrote: >> >> > tracehook_report_clone_complete() call is made when that task_struct is no >> > longer guaranteed to be valid. > > Hmm. I missed this. > >> Also, if utrace allows multiple tracers and they each >> exist in a different namespace then storing a pid nr isn't going to work. > > Yes, but utrace is simple. ptrace_report_clone() does > > ctx->eventmsg = child->pid; > > we should fix this line and that is all, afaics. Every tracer has a > separate "struct ptrace_context *ctx". > >> So my hunch is, in the long run, we'll need to hold a reference there and >> drop it when the last tracer detaches > > Without utrace only one tracer is possible. > > So, I think we should either change do_fork() to get the right tracee_pid_nr, > or add get/put into do_fork() and change tracehooks as Roland suggested. For a unicast path where the is no danger of the destination process changing I don't see why we can't compute the userspace pid_nr. It only get's tricky for things like broadcast signals (pgrp, session) when we don't who the final recipient process will be. I think that only gets truly bad in the case of unix domain sockets. Eric _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers