From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Cong Wang <cwang@twopensource.com>
Cc: netdev <netdev@vger.kernel.org>,
containers@lists.linux-foundation.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-api@vger.kernel.org, David Miller <davem@davemloft.net>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Stephen Hemminger <stephen@networkplumber.org>,
Andrew Morton <akpm@linux-foundation.org>,
Andy Lutomirski <luto@amacapital.net>
Subject: Re: [RFC PATCH net-next v2 0/5] netns: allow to identify peer netns
Date: Fri, 26 Sep 2014 15:40:27 +0200 [thread overview]
Message-ID: <54256CCB.4000709@6wind.com> (raw)
In-Reply-To: <CAHA+R7Ooyam2L-QfP-TjMEZEOqrQcQDxYiebmw760kgEji4G=g@mail.gmail.com>
Le 26/09/2014 04:09, Cong Wang a écrit :
> On Thu, Sep 25, 2014 at 1:53 AM, Nicolas Dichtel
> <nicolas.dichtel@6wind.com> wrote:
>> Le 24/09/2014 18:45, Cong Wang a écrit :
>>>
>>> On Wed, Sep 24, 2014 at 9:27 AM, Nicolas Dichtel
>>> <nicolas.dichtel@6wind.com> wrote:
>>>>
>>>> Now informations got with 'ip link' are wrong and incomplete:
>>>> - the link dev is now tunl0 instead of eth0, because we only got an
>>>> ifindex
>>>> from the kernel without any netns informations.
>>>
>>>
>>> This is not new, macvlan has the same problem. This is why I said
>>> it is mostly a display problem, maybe just mark the ifindex as -1 or
>>> something when it is not in this netns. At least I don't expect the inner
>>> netns know anything outside, and I don't think I am the only one using
>>> netns in this way.
>>
>> I understand your point but there is several use of netns. Netns can be used
>> also to instantiate virtual routers. In this case, administrators or daemons
>> need to be able to monitor and dump the configuration on all netns
>> (particularly beeing able to identify fully x-netns interfaces). We start to
>> discuss this in one of the two thread pointed in my cover letter and get the
>> conclusion that checking user ns is a good way to know if an id should be
>> disclosed or not for a peer netns.
>
> Then you are leaking information, this breaks isolation.
>
>> Can you describe your use case?
>
> Yes, too simple: isolation networking, different netns's don't see each other
> (including anything inside) and only communicate via veth.
If you are a privileged user and you are able to access a peer netns (move an
interface into this peer netns, move an interface from this peer netns to your
own netns), I don't see any reason to not beeing able to get information about
this peer netns (you are already a privileged user in both netns).
If you want to isolate this peer netns (I think you call it "inner netns"), you
have to create a new user ns for this netns, hence a privileged user into this
peer netns will not be able to act in your own netns. And with this scenario and
my patches, this privileged user will not be able to get an id. Isolation is
preserved.
How do you preserved it in your scenario?
>
>
>> If you only play with netns, you may want to monitor all activies in all
>> netns
>> (this is already possible) and beeing able to link information between netns
>> (this is what I'm trying to solve).
>
>
> No, I don't want to monitor anything. Even if I wanted, I would just start one
> daemon in each netns instead of one for all.
Ok you don't want, but some other people (not only me) want it! And having one
daemon per netns does not scale: there are scenarii with thousand netns which
are dynamically created and deleted.
>
> On the other hand, why not exchange the configuration via veth
> between different netns? There are many ways to do so with TCP HTTP etc.
> This doesn't have to be solved in kernel.
>
The standard way with linux to monitor network configuration is netlink.
next prev parent reply other threads:[~2014-09-26 13:40 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 13:20 [RFC PATCH net-next v2 0/5] netns: allow to identify peer netns Nicolas Dichtel
2014-09-23 13:20 ` [RFC PATCH net-next v2 1/5] netns: allocate netns ids Nicolas Dichtel
2014-09-23 13:20 ` [RFC PATCH net-next v2 2/5] netns: add genl cmd to get the id of a netns Nicolas Dichtel
2014-09-23 13:20 ` [RFC PATCH net-next v2 3/5] rtnl: add link netns id to interface messages Nicolas Dichtel
2014-09-23 13:20 ` [RFC PATCH net-next v2 4/5] iptunnels: advertise link netns via netlink Nicolas Dichtel
2014-09-23 13:20 ` [RFC PATCH net-next v2 5/5] rtnl: allow to create device with IFLA_LINK_NETNSID set Nicolas Dichtel
2014-09-23 19:22 ` [RFC PATCH net-next v2 0/5] netns: allow to identify peer netns Cong Wang
2014-09-24 9:23 ` Nicolas Dichtel
2014-09-24 16:01 ` Cong Wang
2014-09-24 16:15 ` Cong Wang
2014-09-24 16:31 ` Nicolas Dichtel
2014-09-24 16:48 ` Cong Wang
2014-09-25 8:53 ` Nicolas Dichtel
2014-09-26 1:58 ` Cong Wang
2014-09-26 13:38 ` Nicolas Dichtel
2014-09-24 16:27 ` Nicolas Dichtel
2014-09-24 16:45 ` Cong Wang
2014-09-25 8:53 ` Nicolas Dichtel
2014-09-26 2:09 ` Cong Wang
2014-09-26 13:40 ` Nicolas Dichtel [this message]
2014-09-26 19:15 ` David Ahern
2014-09-26 19:34 ` Eric W. Biederman
2014-09-26 19:44 ` David Ahern
2014-09-26 20:45 ` Eric W. Biederman
2014-09-26 20:56 ` David Ahern
2014-09-23 19:26 ` Andy Lutomirski
2014-09-24 9:31 ` Nicolas Dichtel
2014-09-24 17:05 ` Andy Lutomirski
2014-09-25 7:54 ` Nicolas Dichtel
2014-09-26 18:10 ` Eric W. Biederman
2014-09-26 18:26 ` Andy Lutomirski
2014-09-26 18:57 ` Eric W. Biederman
2014-09-29 12:06 ` Nicolas Dichtel
2014-09-29 18:43 ` Eric W. Biederman
2014-10-02 13:46 ` Nicolas Dichtel
2014-10-02 13:48 ` [RFC PATCH net-next v3 0/4] " Nicolas Dichtel
2014-10-02 13:48 ` [RFC PATCH net-next v3 1/4] netns: add genl cmd to add and get peer netns ids Nicolas Dichtel
2014-10-02 19:33 ` Eric W. Biederman
2014-10-03 12:22 ` Nicolas Dichtel
2014-10-02 13:48 ` [RFC PATCH net-next v3 2/4] rtnl: add link netns id to interface messages Nicolas Dichtel
2014-10-02 13:48 ` [RFC PATCH net-next v3 3/4] iptunnels: advertise link netns via netlink Nicolas Dichtel
2014-10-02 13:48 ` [RFC PATCH net-next v3 4/4] rtnl: allow to create device with IFLA_LINK_NETNSID set Nicolas Dichtel
2014-10-30 15:25 ` [PATCH net-next v4 0/4] netns: allow to identify peer netns Nicolas Dichtel
2014-10-30 15:25 ` [PATCH net-next v4 1/4] netns: add genl cmd to add and get peer netns ids Nicolas Dichtel
2014-10-30 18:35 ` Eric W. Biederman
2014-10-31 9:41 ` Nicolas Dichtel
2014-10-30 15:25 ` [PATCH net-next v4 2/4] rtnl: add link netns id to interface messages Nicolas Dichtel
2014-10-30 15:25 ` [PATCH net-next v4 3/4] iptunnels: advertise link netns via netlink Nicolas Dichtel
2014-10-30 15:25 ` [PATCH net-next v4 4/4] rtnl: allow to create device with IFLA_LINK_NETNSID set Nicolas Dichtel
2014-10-30 18:41 ` [PATCH net-next v4 0/4] netns: allow to identify peer netns Eric W. Biederman
2014-10-31 9:48 ` Nicolas Dichtel
2014-10-31 19:14 ` Eric W. Biederman
2014-11-05 14:23 ` Nicolas Dichtel
2014-12-04 16:21 ` Nicolas Dichtel
2015-01-15 14:11 ` [PATCH net-next v5 " Nicolas Dichtel
2015-01-15 14:11 ` [PATCH net-next v5 1/4] netns: add rtnl cmd to add and get peer netns ids Nicolas Dichtel
2015-01-15 14:11 ` [PATCH net-next v5 2/4] rtnl: add link netns id to interface messages Nicolas Dichtel
2015-01-15 14:11 ` [PATCH net-next v5 3/4] tunnels: advertise link netns via netlink Nicolas Dichtel
2015-01-15 14:11 ` [PATCH net-next v5 4/4] rtnl: allow to create device with IFLA_LINK_NETNSID set Nicolas Dichtel
2015-01-19 19:16 ` [PATCH net-next v5 0/4] netns: allow to identify peer netns David Miller
2014-11-01 21:08 ` [PATCH net-next v4 " David Miller
2014-11-24 13:45 ` Nicolas Dichtel
2014-10-02 19:20 ` [RFC PATCH net-next v2 0/5] " Eric W. Biederman
2014-10-02 19:31 ` Andy Lutomirski
2014-10-02 19:45 ` Eric W. Biederman
2014-10-02 19:48 ` Andy Lutomirski
2014-10-03 12:22 ` Nicolas Dichtel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54256CCB.4000709@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.linux-foundation.org \
--cc=cwang@twopensource.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).