lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180122212353.7n6lrruqedfhrwux@gmail.com>
Date:   Mon, 22 Jan 2018 22:23:54 +0100
From:   Christian Brauner <christian.brauner@...onical.com>
To:     Jiri Benc <jbenc@...hat.com>
Cc:     Christian Brauner <christian.brauner@...ntu.com>,
        davem@...emloft.net, dsahern@...il.com, fw@...len.de,
        daniel@...earbox.net, lucien.xin@...il.com,
        mschiffer@...verse-factory.net, jakub.kicinski@...ronome.com,
        vyasevich@...il.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, stephen@...workplumber.org
Subject: Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd

On Mon, Jan 22, 2018 at 10:00:46PM +0100, Jiri Benc wrote:
> On Thu, 18 Jan 2018 21:55:53 +0100, Christian Brauner wrote:
> > A more concrete scenario is creating a network namespace, moving a
> > device into it via RTM_SETLINK which also supports IFLA_NET_NS_{FD,PID}
> > and then wanting to query the device. This would be very easy to do if
> > one could reuse the IFLA_NET_NS_{FD,PID} without having to set a
> > netnsid.
> 
> Wouldn't be a better solution to have a way to request the netnsid
> allocation (and return it) right away when creating the name space,
> then?

That is certainly a good idea and I'm happy to send a follow-up patch
for that! But there's still value in being able to use
IFLA_NET_NS_{FD,PID} in scenarios where the network namespace has been
created by another process. In this case we don't know what its netnsid
is and not even if it had been assigned one at creation time or not. In
this case it would be useful to refer to the netns via a pid or fd. A
more concrete and frequent example is querying a network namespace of a
(sorry for the buzzword :)) container for all defined network
interfaces.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ