From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sukadev Bhattiprolu Subject: Re: [RFC][PATCH 7/7][v2] Define clone_with_pids syscall Date: Thu, 28 May 2009 10:01:03 -0700 Message-ID: <20090528170103.GA26183@us.ibm.com> References: <20090528043748.GA16522@us.ibm.com> <20090528043945.GG16522@us.ibm.com> <4A1EA73F.1080802@cs.columbia.edu> <20090528151444.GA17772@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20090528151444.GA17772-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Serge E. Hallyn" Cc: Containers , "David C. Hansen" List-Id: containers.vger.kernel.org Serge E. Hallyn [serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org] wrote: | Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org): | > In general, can a task figure out it's depth in the pid-ns hierarchy ? | | In user-space? No. Not from any existing user interface. But hypothetically or in the long-term can/should sys_checkpoint() not be able to figure out if it has to C/R say a bash shell that has nested pid namespaces ? I am guessing sys_checkpoint() can know if its crossing a pid-ns boundary by comparing or computing the max nesting level while walking a process tree. i.e if task_pid(task)->pid_ns->level is not the same for all process in the tree, then we have nested namespaces. How to checkpoint/restart such a tree is of course a bigger challenge. But if sys_checkpoint() can find the max nesting level ? If that info is saved in checkpoint image, clone_with_pids() could use that info - no ? | | That's why the task has to be allowed to specify only 2 pids, and | have that mean 'auto-select all other pids'. | | -serge