From mboxrd@z Thu Jan 1 00:00:00 1970 From: jamal Subject: Re: RFC: netfilter: nf_conntrack: add support for "conntrack zones" Date: Tue, 23 Feb 2010 09:20:17 -0500 Message-ID: <1266934817.3973.654.camel@bigi> 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> Reply-To: hadi@cyberus.ca Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Daniel Lezcano , Patrick McHardy , Linux Netdev List , containers@lists.linux-foundation.org, Netfilter Development Mailinglist , Ben Greear To: "Eric W. Biederman" Return-path: Received: from mail-pw0-f46.google.com ([209.85.160.46]:50941 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752868Ab0BWOUX (ORCPT ); Tue, 23 Feb 2010 09:20:23 -0500 In-Reply-To: Sender: netfilter-devel-owner@vger.kernel.org List-ID: Added Daniel to the discussion.. On Tue, 2010-02-23 at 06:07 -0800, Eric W. Biederman wrote: > jamal writes: > > Does the point after sys_setns(fd) allow me to do io inside > > ns ? Can i do open() and get a fd from ns ? > > Yes. My intention is that current->nsproxy->net_ns be changed. > We can already change it in unshare so this is feasible. I like it if it makes it as easy as it sounds;-> With lxc, i essentially have to create a proxy process inside the namespace that i use unix domain to open fds inside the ns. Do i still need that? > > The only problem that i see is events are not as nice. I take it i am > > going to get something like an inotify when a new namespace is created? > > Yes. Inotify would at the very least see that mkdir. You could also > use poll on /proc/mounts to see the set of mounts change. It is not as nice but livable. I suppose attributes of the specific namespace are retrieved somewhere there as well.. > > Is it not just a naming convention that you are dealing with? > > Example in your scheme above a nested namespace shows up as: > > /var/run/netns//, no? > > No. More like: > > For the outer namespace: > /var/run/netns/ > > For the inner namespace: > /some/random/fs/path/to/a/chroot/var/run/netns/ > > For a doubly nested scenario: > /some/random/fs/path/to/a/chroot/some/other/random/fs/path/to/another/chroot/var/run/netns/ > > Since I would be using mount namespaces instead of chroot it is not > strictly required that the fs paths nest at all. Ok. cheers, jamal