[Devel] Re: [v11][PATCH 9/9] Document clone_with_pids() syscall
Serge E. Hallyn
serue at us.ibm.com
Sun Nov 8 07:09:35 PST 2009
Quoting Oren Laadan (orenl at librato.com):
> Sukadev Bhattiprolu wrote:
> > Matt Helsley [matthltc at us.ibm.com] wrote:
> > | > If userspace passes an array with n pids and there are k namespace levels
> > | > then clone_with_pids() makes sure that the kernel sees a pid array like:
> > | >
> > | > index 0 ... k - (n + 1) ... k - 1
> > | > +-----------------------+-------------------------+
> > | > pid_t | 0 ..................0 | <copied from userspace> |
> > | > +-----------------------+-------------------------+
> > |
> > | (diagram assumes n != k. If n == k then pids[0] is the pid desired
> > | in the initial namespace..)
> >
> > True.
> >
> > Also I was not sure if we should prevent choosing pids in ancestor containers.
> > since a process is not even supposed to know of ancestor namespaces. Is there
> > a need for choosing pids in those namespaces.
Yes, that is necessary.
> > | I don't know if it makes more sense to change clone_with_pids() or have
> > | [e]glibc wrappers swap the array contents.
>
> I prefer to decide now on an order and stick to it in the kernel and
> in glibc.
Agreed!
I'd forgotten that, as Matt said, we can just specify pids to the depth
that we want, so I guess the current order is fine.
-serge
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list