Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-12 Thread Aditya Kali
I agree with what Andy and Serge has to say. The ability to mount cgroupfs inside userns also seems consistent with other kernel interfaces like sysfs, procfs, etc. Though it would be great if we can atleast merge the rest of the patches first while we address the mounting part. Thanks for your

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-12 Thread Aditya Kali
I agree with what Andy and Serge has to say. The ability to mount cgroupfs inside userns also seems consistent with other kernel interfaces like sysfs, procfs, etc. Though it would be great if we can atleast merge the rest of the patches first while we address the mounting part. Thanks for your

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-06 Thread Aditya Kali
On Tue, Nov 4, 2014 at 5:57 AM, Tejun Heo wrote: > Hello, Aditya. > > On Mon, Nov 03, 2014 at 03:12:28PM -0800, Aditya Kali wrote: >> I think the sane-behavior flag is only temporary and will be removed >> anyways, right? So I didn't bother asking user to supply it. But I can >> make the change

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-06 Thread Aditya Kali
On Tue, Nov 4, 2014 at 5:57 AM, Tejun Heo t...@kernel.org wrote: Hello, Aditya. On Mon, Nov 03, 2014 at 03:12:28PM -0800, Aditya Kali wrote: I think the sane-behavior flag is only temporary and will be removed anyways, right? So I didn't bother asking user to supply it. But I can make the

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-04 Thread Serge E. Hallyn
Quoting Andy Lutomirski (l...@amacapital.net): > On Tue, Nov 4, 2014 at 5:46 AM, Tejun Heo wrote: > > Hello, Aditya. > > > > On Mon, Nov 03, 2014 at 02:43:47PM -0800, Aditya Kali wrote: > >> I agree that this is effectively bind-mounting, but doing this in kernel > >> makes it really convenient

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-04 Thread Andy Lutomirski
On Tue, Nov 4, 2014 at 5:46 AM, Tejun Heo wrote: > Hello, Aditya. > > On Mon, Nov 03, 2014 at 02:43:47PM -0800, Aditya Kali wrote: >> I agree that this is effectively bind-mounting, but doing this in kernel >> makes it really convenient for the userspace. The process that sets up the >> container

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-04 Thread Tejun Heo
Hello, Aditya. On Mon, Nov 03, 2014 at 03:12:28PM -0800, Aditya Kali wrote: > I think the sane-behavior flag is only temporary and will be removed > anyways, right? So I didn't bother asking user to supply it. But I can > make the change as you suggested. We just have to make sure that tasks >

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-04 Thread Tejun Heo
Hello, Aditya. On Mon, Nov 03, 2014 at 02:43:47PM -0800, Aditya Kali wrote: > I agree that this is effectively bind-mounting, but doing this in kernel > makes it really convenient for the userspace. The process that sets up the > container doesn't need to care whether it should bind-mount

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-04 Thread Tejun Heo
Hello, Aditya. On Mon, Nov 03, 2014 at 02:43:47PM -0800, Aditya Kali wrote: I agree that this is effectively bind-mounting, but doing this in kernel makes it really convenient for the userspace. The process that sets up the container doesn't need to care whether it should bind-mount cgroupfs

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-04 Thread Tejun Heo
Hello, Aditya. On Mon, Nov 03, 2014 at 03:12:28PM -0800, Aditya Kali wrote: I think the sane-behavior flag is only temporary and will be removed anyways, right? So I didn't bother asking user to supply it. But I can make the change as you suggested. We just have to make sure that tasks inside

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-04 Thread Andy Lutomirski
On Tue, Nov 4, 2014 at 5:46 AM, Tejun Heo t...@kernel.org wrote: Hello, Aditya. On Mon, Nov 03, 2014 at 02:43:47PM -0800, Aditya Kali wrote: I agree that this is effectively bind-mounting, but doing this in kernel makes it really convenient for the userspace. The process that sets up the

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-04 Thread Serge E. Hallyn
Quoting Andy Lutomirski (l...@amacapital.net): On Tue, Nov 4, 2014 at 5:46 AM, Tejun Heo t...@kernel.org wrote: Hello, Aditya. On Mon, Nov 03, 2014 at 02:43:47PM -0800, Aditya Kali wrote: I agree that this is effectively bind-mounting, but doing this in kernel makes it really convenient

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
This patch enables cgroup mounting inside userns when a process as appropriate privileges. The cgroup filesystem mounted is rooted at the cgroupns-root. Thus, in a container-setup, only the hierarchy under the cgroupns-root is exposed inside the container. This allows container management tools

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
On Mon, Nov 3, 2014 at 4:17 PM, Andy Lutomirski wrote: > On Mon, Nov 3, 2014 at 4:12 PM, Aditya Kali wrote: >> On Mon, Nov 3, 2014 at 3:48 PM, Andy Lutomirski wrote: >>> On Mon, Nov 3, 2014 at 3:23 PM, Aditya Kali wrote: On Mon, Nov 3, 2014 at 3:15 PM, Andy Lutomirski wrote: >

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Andy Lutomirski
On Mon, Nov 3, 2014 at 4:12 PM, Aditya Kali wrote: > On Mon, Nov 3, 2014 at 3:48 PM, Andy Lutomirski wrote: >> On Mon, Nov 3, 2014 at 3:23 PM, Aditya Kali wrote: >>> On Mon, Nov 3, 2014 at 3:15 PM, Andy Lutomirski wrote: On Mon, Nov 3, 2014 at 3:12 PM, Aditya Kali wrote: > On Fri,

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
On Mon, Nov 3, 2014 at 3:48 PM, Andy Lutomirski wrote: > On Mon, Nov 3, 2014 at 3:23 PM, Aditya Kali wrote: >> On Mon, Nov 3, 2014 at 3:15 PM, Andy Lutomirski wrote: >>> On Mon, Nov 3, 2014 at 3:12 PM, Aditya Kali wrote: On Fri, Oct 31, 2014 at 5:07 PM, Andy Lutomirski wrote: >

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Andy Lutomirski
On Mon, Nov 3, 2014 at 3:23 PM, Aditya Kali wrote: > On Mon, Nov 3, 2014 at 3:15 PM, Andy Lutomirski wrote: >> On Mon, Nov 3, 2014 at 3:12 PM, Aditya Kali wrote: >>> On Fri, Oct 31, 2014 at 5:07 PM, Andy Lutomirski >>> wrote: On Fri, Oct 31, 2014 at 12:19 PM, Aditya Kali wrote:

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
On Mon, Nov 3, 2014 at 3:15 PM, Andy Lutomirski wrote: > On Mon, Nov 3, 2014 at 3:12 PM, Aditya Kali wrote: >> On Fri, Oct 31, 2014 at 5:07 PM, Andy Lutomirski wrote: >>> On Fri, Oct 31, 2014 at 12:19 PM, Aditya Kali wrote: This patch enables cgroup mounting inside userns when a process

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Andy Lutomirski
On Mon, Nov 3, 2014 at 3:12 PM, Aditya Kali wrote: > On Fri, Oct 31, 2014 at 5:07 PM, Andy Lutomirski wrote: >> On Fri, Oct 31, 2014 at 12:19 PM, Aditya Kali wrote: >>> This patch enables cgroup mounting inside userns when a process >>> as appropriate privileges. The cgroup filesystem mounted

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
On Fri, Oct 31, 2014 at 5:07 PM, Andy Lutomirski wrote: > On Fri, Oct 31, 2014 at 12:19 PM, Aditya Kali wrote: >> This patch enables cgroup mounting inside userns when a process >> as appropriate privileges. The cgroup filesystem mounted is >> rooted at the cgroupns-root. Thus, in a

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Andy Lutomirski
On Mon, Nov 3, 2014 at 2:43 PM, Aditya Kali wrote: > > > On Fri, Oct 31, 2014 at 6:09 PM, Eric W. Biederman > wrote: >> >> Aditya Kali writes: >> >> > This patch enables cgroup mounting inside userns when a process >> > as appropriate privileges. The cgroup filesystem mounted is >> > rooted at

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
(sorry for accidental non-plain-text response earlier). On Fri, Oct 31, 2014 at 6:09 PM, Eric W. Biederman wrote: > Aditya Kali writes: > >> This patch enables cgroup mounting inside userns when a process >> as appropriate privileges. The cgroup filesystem mounted is >> rooted at the

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
(sorry for accidental non-plain-text response earlier). On Fri, Oct 31, 2014 at 6:09 PM, Eric W. Biederman ebied...@xmission.com wrote: Aditya Kali adityak...@google.com writes: This patch enables cgroup mounting inside userns when a process as appropriate privileges. The cgroup filesystem

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Andy Lutomirski
On Mon, Nov 3, 2014 at 2:43 PM, Aditya Kali adityak...@google.com wrote: On Fri, Oct 31, 2014 at 6:09 PM, Eric W. Biederman ebied...@xmission.com wrote: Aditya Kali adityak...@google.com writes: This patch enables cgroup mounting inside userns when a process as appropriate privileges.

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
On Fri, Oct 31, 2014 at 5:07 PM, Andy Lutomirski l...@amacapital.net wrote: On Fri, Oct 31, 2014 at 12:19 PM, Aditya Kali adityak...@google.com wrote: This patch enables cgroup mounting inside userns when a process as appropriate privileges. The cgroup filesystem mounted is rooted at the

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Andy Lutomirski
On Mon, Nov 3, 2014 at 3:12 PM, Aditya Kali adityak...@google.com wrote: On Fri, Oct 31, 2014 at 5:07 PM, Andy Lutomirski l...@amacapital.net wrote: On Fri, Oct 31, 2014 at 12:19 PM, Aditya Kali adityak...@google.com wrote: This patch enables cgroup mounting inside userns when a process as

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
On Mon, Nov 3, 2014 at 3:15 PM, Andy Lutomirski l...@amacapital.net wrote: On Mon, Nov 3, 2014 at 3:12 PM, Aditya Kali adityak...@google.com wrote: On Fri, Oct 31, 2014 at 5:07 PM, Andy Lutomirski l...@amacapital.net wrote: On Fri, Oct 31, 2014 at 12:19 PM, Aditya Kali adityak...@google.com

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Andy Lutomirski
On Mon, Nov 3, 2014 at 3:23 PM, Aditya Kali adityak...@google.com wrote: On Mon, Nov 3, 2014 at 3:15 PM, Andy Lutomirski l...@amacapital.net wrote: On Mon, Nov 3, 2014 at 3:12 PM, Aditya Kali adityak...@google.com wrote: On Fri, Oct 31, 2014 at 5:07 PM, Andy Lutomirski l...@amacapital.net

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
On Mon, Nov 3, 2014 at 3:48 PM, Andy Lutomirski l...@amacapital.net wrote: On Mon, Nov 3, 2014 at 3:23 PM, Aditya Kali adityak...@google.com wrote: On Mon, Nov 3, 2014 at 3:15 PM, Andy Lutomirski l...@amacapital.net wrote: On Mon, Nov 3, 2014 at 3:12 PM, Aditya Kali adityak...@google.com wrote:

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Andy Lutomirski
On Mon, Nov 3, 2014 at 4:12 PM, Aditya Kali adityak...@google.com wrote: On Mon, Nov 3, 2014 at 3:48 PM, Andy Lutomirski l...@amacapital.net wrote: On Mon, Nov 3, 2014 at 3:23 PM, Aditya Kali adityak...@google.com wrote: On Mon, Nov 3, 2014 at 3:15 PM, Andy Lutomirski l...@amacapital.net wrote:

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
On Mon, Nov 3, 2014 at 4:17 PM, Andy Lutomirski l...@amacapital.net wrote: On Mon, Nov 3, 2014 at 4:12 PM, Aditya Kali adityak...@google.com wrote: On Mon, Nov 3, 2014 at 3:48 PM, Andy Lutomirski l...@amacapital.net wrote: On Mon, Nov 3, 2014 at 3:23 PM, Aditya Kali adityak...@google.com wrote:

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-11-03 Thread Aditya Kali
This patch enables cgroup mounting inside userns when a process as appropriate privileges. The cgroup filesystem mounted is rooted at the cgroupns-root. Thus, in a container-setup, only the hierarchy under the cgroupns-root is exposed inside the container. This allows container management tools

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-10-31 Thread Andy Lutomirski
On Fri, Oct 31, 2014 at 7:59 PM, Eric W. Biederman wrote: > Andy Lutomirski writes: >>> @@ -1862,6 +1904,7 @@ static struct file_system_type cgroup_fs_type = { >>> .name = "cgroup", >>> .mount = cgroup_mount, >>> .kill_sb = cgroup_kill_sb, >>> + .fs_flags =

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-10-31 Thread Eric W. Biederman
Andy Lutomirski writes: >> @@ -1862,6 +1904,7 @@ static struct file_system_type cgroup_fs_type = { >> .name = "cgroup", >> .mount = cgroup_mount, >> .kill_sb = cgroup_kill_sb, >> + .fs_flags = FS_USERNS_MOUNT, > > Aargh, another one! Eric, can you either ack or nack

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-10-31 Thread Eric W. Biederman
Aditya Kali writes: > This patch enables cgroup mounting inside userns when a process > as appropriate privileges. The cgroup filesystem mounted is > rooted at the cgroupns-root. Thus, in a container-setup, only > the hierarchy under the cgroupns-root is exposed inside the container. > This

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-10-31 Thread Andy Lutomirski
On Fri, Oct 31, 2014 at 12:19 PM, Aditya Kali wrote: > This patch enables cgroup mounting inside userns when a process > as appropriate privileges. The cgroup filesystem mounted is > rooted at the cgroupns-root. Thus, in a container-setup, only > the hierarchy under the cgroupns-root is exposed

[PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-10-31 Thread Aditya Kali
This patch enables cgroup mounting inside userns when a process as appropriate privileges. The cgroup filesystem mounted is rooted at the cgroupns-root. Thus, in a container-setup, only the hierarchy under the cgroupns-root is exposed inside the container. This allows container management tools to

[PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-10-31 Thread Aditya Kali
This patch enables cgroup mounting inside userns when a process as appropriate privileges. The cgroup filesystem mounted is rooted at the cgroupns-root. Thus, in a container-setup, only the hierarchy under the cgroupns-root is exposed inside the container. This allows container management tools to

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-10-31 Thread Andy Lutomirski
On Fri, Oct 31, 2014 at 12:19 PM, Aditya Kali adityak...@google.com wrote: This patch enables cgroup mounting inside userns when a process as appropriate privileges. The cgroup filesystem mounted is rooted at the cgroupns-root. Thus, in a container-setup, only the hierarchy under the

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-10-31 Thread Eric W. Biederman
Aditya Kali adityak...@google.com writes: This patch enables cgroup mounting inside userns when a process as appropriate privileges. The cgroup filesystem mounted is rooted at the cgroupns-root. Thus, in a container-setup, only the hierarchy under the cgroupns-root is exposed inside the

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-10-31 Thread Eric W. Biederman
Andy Lutomirski l...@amacapital.net writes: @@ -1862,6 +1904,7 @@ static struct file_system_type cgroup_fs_type = { .name = cgroup, .mount = cgroup_mount, .kill_sb = cgroup_kill_sb, + .fs_flags = FS_USERNS_MOUNT, Aargh, another one! Eric, can you either ack or

Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns

2014-10-31 Thread Andy Lutomirski
On Fri, Oct 31, 2014 at 7:59 PM, Eric W. Biederman ebied...@xmission.com wrote: Andy Lutomirski l...@amacapital.net writes: @@ -1862,6 +1904,7 @@ static struct file_system_type cgroup_fs_type = { .name = cgroup, .mount = cgroup_mount, .kill_sb = cgroup_kill_sb, +