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