Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1166330

[PATCHSET cgroup/for-4.2] cgroup: require write perm on common ancestor for migration

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject [PATCHSET cgroup/for-4.2] cgroup: require write perm on common ancestor for migration
Date 2015-06-16 21:20 +0200
Message-ID <pC4yS-3dz-15@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCHSET cgroup/for-4.2] cgroup: require write perm on common ancestor for migration Tejun Heo <tj@kernel.org> - 2015-06-16 21:20 +0200
  [PATCH 3/4] cgroup: require write perm on common ancestor when moving processes on the default hierarchy Tejun Heo <tj@kernel.org> - 2015-06-16 21:20 +0200
  [PATCH 2/4] cgroup: separate out cgroup_procs_write_permission() from __cgroup_procs_write() Tejun Heo <tj@kernel.org> - 2015-06-16 21:20 +0200
  [PATCH 4/4] cgroup: add delegation section to unified hierarchy documentation Tejun Heo <tj@kernel.org> - 2015-06-16 21:20 +0200
    [PATCH v2 4/4] cgroup: add delegation section to unified hierarchy  documentation Tejun Heo <tj@kernel.org> - 2015-06-18 22:30 +0200
      Re: [PATCH v2 4/4] cgroup: add delegation section to unified  hierarchy documentation Johannes Weiner <hannes@cmpxchg.org> - 2015-06-18 22:50 +0200
  Re: [PATCHSET cgroup/for-4.2] cgroup: require write perm on common  ancestor for migration Tejun Heo <tj@kernel.org> - 2015-06-18 23:00 +0200

csiph-web