Re: [PATCH net] bpf: Use mount_nodev not mount_ns to mount the bpf filesystem

2016-05-20 Thread David Miller
From: ebied...@xmission.com (Eric W. Biederman) Date: Fri, 20 May 2016 17:22:48 -0500 > > While reviewing the filesystems that set FS_USERNS_MOUNT I spotted the > bpf filesystem. Looking at the code I saw a broken usage of mount_ns > with current->nsproxy->mnt_ns. As the code does not acquire a

Re: [PATCH net] bpf: Use mount_nodev not mount_ns to mount the bpf filesystem

2016-05-20 Thread Hannes Frederic Sowa
On 21.05.2016 00:22, Eric W. Biederman wrote: > > While reviewing the filesystems that set FS_USERNS_MOUNT I spotted the > bpf filesystem. Looking at the code I saw a broken usage of mount_ns > with current->nsproxy->mnt_ns. As the code does not acquire a > reference to the mount namespace it can

Re: [RFC][PATCH net] bpf: Use mount_nodev not mount_ns to mount the bpf filesystem

2016-05-20 Thread Eric W. Biederman
Hannes Frederic Sowa writes: > On 18.05.2016 22:43, Daniel Borkmann wrote: >> Eric, please send the patch officially and feel free to add my Ack. Done. >> Given >> the circumstances, moving to mount_nodev() seems the best way forward. To >> also address above mentioned concern from Hannes, we n

[PATCH net] bpf: Use mount_nodev not mount_ns to mount the bpf filesystem

2016-05-20 Thread Eric W. Biederman
While reviewing the filesystems that set FS_USERNS_MOUNT I spotted the bpf filesystem. Looking at the code I saw a broken usage of mount_ns with current->nsproxy->mnt_ns. As the code does not acquire a reference to the mount namespace it can not possibly be correct to store the mount namespace on

Re: [RFC][PATCH net] bpf: Use mount_nodev not mount_ns to mount the bpf filesystem

2016-05-18 Thread Hannes Frederic Sowa
On 18.05.2016 22:43, Daniel Borkmann wrote: > On 05/18/2016 04:56 PM, Eric W. Biederman wrote: >> Hannes Frederic Sowa writes: >>> On 18.05.2016 01:12, Eric W. Biederman wrote: While reviewing the filesystems that set FS_USERNS_MOUNT I spotted the bpf filesystem. Looking at the cod

Re: [RFC][PATCH net] bpf: Use mount_nodev not mount_ns to mount the bpf filesystem

2016-05-18 Thread Daniel Borkmann
On 05/18/2016 04:56 PM, Eric W. Biederman wrote: Hannes Frederic Sowa writes: On 18.05.2016 01:12, Eric W. Biederman wrote: While reviewing the filesystems that set FS_USERNS_MOUNT I spotted the bpf filesystem. Looking at the code I saw a broken usage of mount_ns with current->nsproxy->mnt_n

Re: [RFC][PATCH net] bpf: Use mount_nodev not mount_ns to mount the bpf filesystem

2016-05-18 Thread Eric W. Biederman
Hannes Frederic Sowa writes: > On 18.05.2016 01:12, Eric W. Biederman wrote: >> >> While reviewing the filesystems that set FS_USERNS_MOUNT I spotted the >> bpf filesystem. Looking at the code I saw a broken usage of mount_ns >> with current->nsproxy->mnt_ns. As the code does not acquire a refe

Re: [RFC][PATCH net] bpf: Use mount_nodev not mount_ns to mount the bpf filesystem

2016-05-18 Thread Hannes Frederic Sowa
On 18.05.2016 01:12, Eric W. Biederman wrote: > > While reviewing the filesystems that set FS_USERNS_MOUNT I spotted the > bpf filesystem. Looking at the code I saw a broken usage of mount_ns > with current->nsproxy->mnt_ns. As the code does not acquire a reference > to the mount namespace it can