From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-team-b10kYP2dOMg@public.gmane.org
Subject: [PATCHSET cgroup/for-4.2] cgroup: require write perm on common ancestor for migration
Date: Tue, 16 Jun 2015 15:10:13 -0400 [thread overview]
Message-ID: <1434481817-32001-1-git-send-email-tj@kernel.org> (raw)
Hello,
On traditional hierarchies, if a task has write access to "tasks" or
"cgroup.procs" file of a cgroup and its euid agrees with the target,
it can move the target to the cgroup; however, this allows a delegatee
to smuggle processes across disjoint sub-hierarchies violating the
organizational structure and resource restrictions imposed from higher
up.
To prevent these breaches, this patchset makes unified hierarchy
require write access to cgroup.procs of the common ancestor of the
source and destination cgroups. It also adds documentation on how
delegation of sub-hierarchies should be done on unified hierarchy.
This patchset contains the following four patches.
0001-kernfs-make-kernfs_get_inode-public.patch
0002-cgroup-separate-out-cgroup_procs_write_permission-fr.patch
0003-cgroup-require-write-perm-on-common-ancestor-when-mo.patch
0004-cgroup-add-delegation-section-to-unified-hierarchy-d.patch
0001-0002 are prep patches. 0003 implements the common ancestor rule
and 0004 documents delegation on unified hierarchy.
This patchset is on top of cgroup/for-4.2 4d205676c102 ("MAINTAINERS:
add a cgroup core co-maintainer") and available in the following git
branch.
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup-delegation
diffstat follows. Thanks.
Documentation/cgroups/unified-hierarchy.txt | 102 +++++++++++++++++++++++-----
fs/kernfs/kernfs-internal.h | 1
include/linux/cgroup-defs.h | 1
include/linux/kernfs.h | 5 +
kernel/cgroup.c | 64 +++++++++++++----
5 files changed, 139 insertions(+), 34 deletions(-)
--
tejun
next reply other threads:[~2015-06-16 19:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 19:10 Tejun Heo [this message]
[not found] ` <1434481817-32001-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-06-16 19:10 ` [PATCH 1/4] kernfs: make kernfs_get_inode() public Tejun Heo
[not found] ` <1434481817-32001-2-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-06-16 20:58 ` Greg Kroah-Hartman
2015-06-16 19:10 ` [PATCH 2/4] cgroup: separate out cgroup_procs_write_permission() from __cgroup_procs_write() Tejun Heo
2015-06-16 19:10 ` [PATCH 3/4] cgroup: require write perm on common ancestor when moving processes on the default hierarchy Tejun Heo
[not found] ` <1434481817-32001-4-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-06-18 3:14 ` Zefan Li
2015-06-18 17:59 ` Tejun Heo
2015-06-18 17:59 ` [PATCH v2 " Tejun Heo
[not found] ` <20150618175927.GD12934-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-06-18 19:04 ` Johannes Weiner
2015-06-16 19:10 ` [PATCH 4/4] cgroup: add delegation section to unified hierarchy documentation Tejun Heo
[not found] ` <1434481817-32001-5-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-06-18 19:01 ` Johannes Weiner
2015-06-18 20:23 ` [PATCH v2 " Tejun Heo
[not found] ` <20150618202327.GG12934-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-06-18 20:46 ` Johannes Weiner
2015-06-18 20:55 ` [PATCHSET cgroup/for-4.2] cgroup: require write perm on common ancestor for migration Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434481817-32001-1-git-send-email-tj@kernel.org \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=kernel-team-b10kYP2dOMg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).