Re: [PATCH bpf 2/4] nsfs: add an ioctl to discover the network namespace cookie

2021-03-02 Thread Christian Brauner
On Tue, Mar 02, 2021 at 09:47:10AM +, Lorenz Bauer wrote: > On Mon, 1 Mar 2021 at 10:04, Christian Brauner > wrote: > > > > Hey Lorenz, > > > > Just to make sure: is it intentional that any user can retrieve the > > cookie associated with any network namespace, i.e. you don't require any > >

Re: [PATCH bpf 2/4] nsfs: add an ioctl to discover the network namespace cookie

2021-03-02 Thread Lorenz Bauer
On Mon, 1 Mar 2021 at 10:04, Christian Brauner wrote: > > Hey Lorenz, > > Just to make sure: is it intentional that any user can retrieve the > cookie associated with any network namespace, i.e. you don't require any > form of permission checking in the owning user namespace of the network >

Re: [PATCH bpf 2/4] nsfs: add an ioctl to discover the network namespace cookie

2021-03-01 Thread Christian Brauner
On Wed, Feb 10, 2021 at 12:04:23PM +, Lorenz Bauer wrote: > Network namespaces have a globally unique non-zero identifier aka a > cookie, in line with socket cookies. Add an ioctl to retrieve the > cookie from user space without going via BPF. > > Cc: linux-...@vger.kernel.org >

[PATCH bpf 2/4] nsfs: add an ioctl to discover the network namespace cookie

2021-02-10 Thread Lorenz Bauer
Network namespaces have a globally unique non-zero identifier aka a cookie, in line with socket cookies. Add an ioctl to retrieve the cookie from user space without going via BPF. Cc: linux-...@vger.kernel.org Signed-off-by: Lorenz Bauer --- fs/nsfs.c | 9 +