Skip to content
Commit a79a908f authored by Aditya Kali's avatar Aditya Kali Committed by Tejun Heo
Browse files

cgroup: introduce cgroup namespaces



Introduce the ability to create new cgroup namespace. The newly created
cgroup namespace remembers the cgroup of the process at the point
of creation of the cgroup namespace (referred as cgroupns-root).
The main purpose of cgroup namespace is to virtualize the contents
of /proc/self/cgroup file. Processes inside a cgroup namespace
are only able to see paths relative to their namespace root
(unless they are moved outside of their cgroupns-root, at which point
 they will see a relative path from their cgroupns-root).
For a correctly setup container this enables container-tools
(like libcontainer, lxc, lmctfy, etc.) to create completely virtualized
containers without leaking system level cgroup hierarchy to the task.
This patch only implements the 'unshare' part of the cgroupns.

Signed-off-by: default avatarAditya Kali <adityakali@google.com>
Signed-off-by: default avatarSerge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 5e2bec7c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment