[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170206204728.GA23737@htj.duckdns.org>
Date: Mon, 6 Feb 2017 15:47:28 -0500
From: Tejun Heo <tj@...nel.org>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Stephen Hemminger <stephen@...workplumber.org>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
xgao01@...il.wm.edu, "Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: Fw: [Bug 193911] New: net_prio.ifpriomap is not aware of the
network namespace, and discloses all network interface
Hello,
On Sun, Feb 05, 2017 at 11:05:36PM -0800, Cong Wang wrote:
> > To be more specific, the read operation of net_prio.ifpriomap is handled by the
> > function read_priomap. Tracing from this function, we can find it invokes
> > for_each_netdev_rcu and set the first parameter as the address of init_net. It
> > iterates all network devices of the host regardless of the network namespace.
> > Thus, from the view of a container, it can read the names of all network
> > devices of the host.
>
> I think that is probably because cgroup files don't provide a net pointer
> for the context, if so we probably need some API similar to
> class_create_file_ns().
Yeah, the whole thing never considered netns or delegation. Maybe the
read function itself should probably filter on the namespace of the
reader? I'm not completely sure whether trying to fix it won't cause
some of existing use cases to break. Eric, what do you think?
Thanks.
--
tejun
Powered by blists - more mailing lists