Greg <gkurz@fr.ibm.com> writes: > Eric W. Biederman wrote: >> >> On this front I have been planning on using sys_clone as it allows >> pieces of the virtualization to be incrementally built, it already >> supports the FS namespace, and it supports flexibly specifying what >> you want to contain. >> > > What would you do to handle the following case: > > pid = getpid(); > if (sys_clone(CLONE_CONTAINER) == 0) { > ppid = getppid(); > assert(ppid == pid); > } > > Most of the calls involving resource ids will return values that aren't > *consistent* with ids already stored in userland... could possibly break some > piece of code. Perhaps a sys_exec() should also be enforced to reset the process > memory. Well that assertion will fail. At that point getppid() will return 0, and getpid() will return 1. Processes getting confused is their own problem. Now there will be a pid that the parent sees that will not be 0. And that is what the parent will see in the context of wait. In my code I introduced a wid (wait id) for that purpose. This makes it possible to manage a container using the usual unix process semantics. Which is very important. Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Greg <gkurz@fr.ibm.com>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- References:
- RFC [patch 00/34] PID Virtualization Overview
- From: Serge Hallyn <serue@us.ibm.com>
- RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Serge Hallyn <serue@us.ibm.com>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Arjan van de Ven <arjan@infradead.org>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: "Serge E. Hallyn" <serue@us.ibm.com>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Alan Cox <alan@lxorguk.ukuu.org.uk>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Dave Hansen <haveblue@us.ibm.com>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Greg KH <greg@kroah.com>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Dave Hansen <haveblue@us.ibm.com>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Hubertus Franke <frankeh@watson.ibm.com>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Linus Torvalds <torvalds@osdl.org>
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- From: Greg <gkurz@fr.ibm.com>
- RFC [patch 00/34] PID Virtualization Overview
- Prev by Date: Re: CD writing in future Linux try #2
- Next by Date: Re: [PATCH] serial: Add spin_lock_init() in 8250 early_serial_setup() to init port.lock
- Previous by thread: Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- Next by thread: Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
- Index(es):
![]() |