Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1321593
| From | serge.hallyn@ubuntu.com |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 8/8] Add FS_USERNS_FLAG to cgroup fs |
| Date | 2016-01-29 10:00 +0100 |
| Message-ID | <qWd4m-cs-21@gated-at.bofh.it> (permalink) |
| References | <qWd4l-cs-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Serge Hallyn <serge.hallyn@ubuntu.com>
allowing root in a non-init user namespace to mount it. This should
now be safe, because
1. non-init-root cannot mount a previously unbound subsystem
2. the task doing the mount must be privileged with respect to the
user namespace owning the cgroup namespace
3. the mounted subsystem will have its current cgroup as the root dentry.
the permissions will be unchanged, so tasks will receive no new
privilege over the cgroups which they did not have on the original
mounts.
Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
---
kernel/cgroup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 3e04df0..7a58749 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2216,12 +2216,14 @@ static struct file_system_type cgroup_fs_type = {
.name = "cgroup",
.mount = cgroup_mount,
.kill_sb = cgroup_kill_sb,
+ .fs_flags = FS_USERNS_MOUNT,
};
static struct file_system_type cgroup2_fs_type = {
.name = "cgroup2",
.mount = cgroup_mount,
.kill_sb = cgroup_kill_sb,
+ .fs_flags = FS_USERNS_MOUNT,
};
static char *
--
1.7.9.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
CGroup Namespaces (v10) serge.hallyn@ubuntu.com - 2016-01-29 10:00 +0100 [PATCH 6/8] cgroup: mount cgroupns-root when inside non-init cgroupns serge.hallyn@ubuntu.com - 2016-01-29 10:00 +0100 [PATCH 7/8] cgroup: Add documentation for cgroup namespaces serge.hallyn@ubuntu.com - 2016-01-29 10:00 +0100 [PATCH 5/8] kernfs: define kernfs_node_dentry serge.hallyn@ubuntu.com - 2016-01-29 10:00 +0100 [PATCH 8/8] Add FS_USERNS_FLAG to cgroup fs serge.hallyn@ubuntu.com - 2016-01-29 10:00 +0100 [PATCH] selftests/cgroupns: new test for cgroup namespaces Alban Crequy <alban.crequy@gmail.com> - 2016-01-31 18:50 +0100
csiph-web