From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control. Date: Sat, 27 Feb 2010 01:04:47 -0800 Message-ID: References: <4B4F24AC.70105@trash.net> <1263481549.23480.24.camel@bigi> <4B4F3A50.1050400@trash.net> <1263490403.23480.109.camel@bigi> <4B50403A.6010507@trash.net> <1263568754.23480.142.camel@bigi> <1266875729.3673.12.camel@bigi> <1266931623.3973.643.camel@bigi> <1266934817.3973.654.camel@bigi> <1266966581.3973.675.camel@bigi> <4B883987.6090408@parallels.com> <4B883E6F.1060907@parallels.com> <4B88D80A.8010701@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: hadi@cyberus.ca, Daniel Lezcano , Patrick McHardy , Linux Netdev List , containers@lists.linux-foundation.org, Netfilter Development Mailinglist , Ben Greear , Serge Hallyn , Matt Helsley To: Pavel Emelyanov Return-path: Received: from out01.mta.xmission.com ([166.70.13.231]:53064 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968007Ab0B0JFE (ORCPT ); Sat, 27 Feb 2010 04:05:04 -0500 In-Reply-To: <4B88D80A.8010701@parallels.com> (Pavel Emelyanov's message of "Sat\, 27 Feb 2010 11\:30\:02 +0300") Sender: netfilter-devel-owner@vger.kernel.org List-ID: Pavel Emelyanov writes: > Eric W. Biederman wrote: >> Pavel Emelyanov writes: >> >>>>> Yet another set of per-namespace IDs along with CLONE_NEWXXX ones? >>>>> I currently have a way to create all namespaces we have with one >>>>> syscall. Why don't we have an ability to enter them all with one syscall? >>>> The CLONE_NEWXXX series of bits has been an royal pain to work with, >>>> and it appears to be unnecessary complications for no gain. >>> That's the answer for the "Yet another set..." question. >>> How about the "Why don't we have..." one? >> >> I am not certain which question you are asking: >> >> Why don't we have an ability to enter all namespaces with one syscall >> invocation? > > Exactly. Please add at least the NSTYPE_NSPROXY or whatever, that will > pin all namespaces of a given pid from the very beginning. For nsfd(2) that is doable. At least for now setns can't restore it. >> Why don't we have a syscall that allows us to enter every namespace? > > This one is done in the patch, no? > > Although the approach is OK for me, there's one design issue, that came > up to my mind recently: can we use this fd to wail for a namespace to > stop? I currently don't see this ability, but this is something I require > badly. I have designed these file descriptors to pin the namespaces, so waiting for them to exit isn't something they can do now. It makes a lot of sense to have similar ones that take weak references to the namespaces that we can use to wait for a namespace to exit. Eric