cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Stultz <john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: John Stultz <john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	Jonathan Corbet <corbet-T1hC0tSOHrs@public.gmane.org>,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Android Kernel Team
	<kernel-team-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
	Rom Lemarchand <romlem-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
	Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
Subject: [RFC][PATCH 0/2] Android style loosening of cgroup attach permissions
Date: Wed, 20 May 2015 20:41:12 -0700	[thread overview]
Message-ID: <1432179674-19154-1-git-send-email-john.stultz@linaro.org> (raw)

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 <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: Jonathan Corbet <corbet-T1hC0tSOHrs@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Android Kernel Team <kernel-team-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
Cc: Rom Lemarchand <romlem-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
Cc: Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>

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

-- 
1.9.1

             reply	other threads:[~2015-05-21  3:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21  3:41 John Stultz [this message]
2015-05-21  3:41 ` [RFC][PATCH 1/2] cgroup: Add generic cgroup subsystem permission checks John Stultz
2015-05-21  3:41 ` [RFC][PATCH 2/2] cgroup: Add a memcg and cpu cg allow_attach policy for Android John Stultz
     [not found] ` <1432179674-19154-1-git-send-email-john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-06-02 19:07   ` [RFC][PATCH 0/2] Android style loosening of cgroup attach permissions John Stultz
2015-06-03  5:50     ` Tejun Heo
     [not found]       ` <20150603055057.GE20091-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-06-04 17:11         ` John Stultz
     [not found]           ` <CALAqxLWkXTgKzq68H6TvPc6Wgbn5_jwVoW5Q9onnHnvQ0bTNiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-04 18:36             ` Johannes Weiner
     [not found]               ` <20150604183658.GA5682-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2015-06-05 21:28                 ` John Stultz
2015-06-05 21:33                 ` John Stultz
2015-06-04 18:52           ` 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=1432179674-19154-1-git-send-email-john.stultz@linaro.org \
    --to=john.stultz-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=corbet-T1hC0tSOHrs@public.gmane.org \
    --cc=kernel-team-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=romlem-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@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).