Skip to content

RFC Android style loosening of cgroup attach permissions

John Stultz cgroups lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cgroup: Add generic cgroup subsystem permission checksDocumentation/cgroups/cgroups.txt include/linux/cgroup.h kernel/cgroup.c+47 -30 replies
2/2cgroup: Add a memcg and cpu cg allow_attach policy for Androidinclude/linux/cgroup.h init/Kconfig kernel/Makefile +3 more+55 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/2] Android style loosening of cgroup attach permissions

As a heads up, this is just a first RFC and not a submission.

Android currently loosens the cgroup attchment permissions, allowing tasks with CAP_SYS_NICE to be able to allow tasks to move arbitrary tasks across cgroups.

At first glance, overloading CAP_SYS_NICE seems a bit hackish, but this shows that there is a active and widely deployed use for different cgroup attachment rules then what is currently available.

I've tried to rework the patches so this attachment policy is build time configurable, and wanted to send them out for review so folks might give their thoughts on this implementation and what they might see as a better way to go about achieving the same goal.

Thoughts and feedback would be appriciated!

thanks
-john

Cc Tejun Heo <[email protected]>
Cc Li Zefan <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Android Kernel Team <[email protected]>
Cc Rom Lemarchand <[email protected]>
Cc Colin Cross <[email protected]>

Colin Cross (1):
cgroup: Add generic cgroup subsystem permission checks

Rom Lemarchand (1):
cgroup: Add a memcg and cpu cg allow_attach policy for Android

 Documentation/cgroups/cgroups.txt |  9 +++++++++
 include/linux/cgroup.h            | 14 ++++++++++++++
 init/Kconfig                      |  7 +++++++
 kernel/Makefile                   |  1 +
 kernel/cgroup.c                   | 39 ++++++++++++++++++++++++++++++++++++---
 kernel/cgroup_nice_attach.c       | 29 +++++++++++++++++++++++++++++
 kernel/sched/core.c               |  3 +++
 mm/memcontrol.c                   |  3 +++
 8 files changed, 102 insertions(+), 3 deletions(-)
 create mode 100644 kernel/cgroup_nice_attach.c
Signature · 1 line
1.9.1