linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Casey Schaufler <casey@schaufler-ca.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>,
	lkml <linux-kernel@vger.kernel.org>, Tejun Heo <tj@kernel.org>,
	Li Zefan <lizefan@huawei.com>, Jonathan Corbet <corbet@lwn.net>,
	"open list:CONTROL GROUP (CGROUP)" <cgroups@vger.kernel.org>,
	Android Kernel Team <kernel-team@android.com>,
	Rom Lemarchand <romlem@android.com>,
	Colin Cross <ccross@android.com>,
	Dmitry Shmidt <dimitrysh@google.com>,
	Todd Kjos <tkjos@google.com>,
	Christian Poetzsch <christian.potzsch@imgtec.com>,
	Amit Pundir <amit.pundir@linaro.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Kees Cook <keescook@chromium.org>,
	"Serge E . Hallyn" <serge@hallyn.com>,
	Andy Lutomirski <luto@amacapital.net>,
	Linux API <linux-api@vger.kernel.org>
Subject: Re: [PATCH v5] cgroup: Add new capability to allow a process to migrate other tasks between cgroups
Date: Tue, 13 Dec 2016 09:24:37 -0800	[thread overview]
Message-ID: <CALAqxLUgmeNxt5B5k720YRM=pUh=a-b2cg+mCM1n1QG-un2ofQ@mail.gmail.com> (raw)
In-Reply-To: <f7ccb39f-bad8-4a78-c796-90927b839494@schaufler-ca.com>

On Tue, Dec 13, 2016 at 9:17 AM, Casey Schaufler <casey@schaufler-ca.com> wrote:
> On 12/13/2016 8:49 AM, John Stultz wrote:
>> On Tue, Dec 13, 2016 at 8:39 AM, Casey Schaufler <casey@schaufler-ca.com> wrote:
>>> On 12/13/2016 1:47 AM, Michael Kerrisk (man-pages) wrote:
>>>> How about CAP_CGROUP_CONTROL or some such, with the idea that this
>>>> might be a capability that allows the holder to step outside usual
>>>> cgroup rules? At the moment, that capability would allow only one such
>>>> step, but maybe there would be others in the future.
>>> I agree, but want to put it more strongly. The granularity of
>>> capabilities can never be fine enough for some people, and this
>>> is an example of a case where you're going a bit too far. If the
>>> use case is Android as you say, you don't need this. As my friends
>>> on the far side of the aisle would say, "just write SELinux policy"
>>> to correctly control access as required.
>> So.. The trouble is that while selinux is good for restricting
>> permissions, the in-kernel permission checks here are already too
>> restrictive.
>
> Why did the original authors of cgroups make it that restrictive?
> If there isn't a good reason, loosen it up. If there is a good
> reason, then pay heed to it.

That's what this patch is proposing. And I agree with Michael that the
newly proposed cap was a bit to narrowly focused on my immediate use
case, and broadening it to CGROUP_CONTROL is smart. Then that
capability could be further restricted w/ selinux policy, as you
suggest.

thanks
-john

  reply	other threads:[~2016-12-13 17:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13  1:39 [PATCH v5] cgroup: Add new capability to allow a process to migrate other tasks between cgroups John Stultz
2016-12-13  1:40 ` John Stultz
2016-12-13  9:47 ` Michael Kerrisk (man-pages)
2016-12-13 16:08   ` John Stultz
2016-12-13 18:40     ` Tejun Heo
2016-12-13 18:47       ` John Stultz
2016-12-13 18:53         ` Tejun Heo
2016-12-13 16:39   ` Casey Schaufler
2016-12-13 16:49     ` John Stultz
2016-12-13 17:17       ` Casey Schaufler
2016-12-13 17:24         ` John Stultz [this message]
2016-12-13 17:48           ` Casey Schaufler
2016-12-13 18:13             ` John Stultz
2016-12-13 18:32               ` Casey Schaufler
2016-12-13 18:47                 ` 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='CALAqxLUgmeNxt5B5k720YRM=pUh=a-b2cg+mCM1n1QG-un2ofQ@mail.gmail.com' \
    --to=john.stultz@linaro.org \
    --cc=amit.pundir@linaro.org \
    --cc=casey@schaufler-ca.com \
    --cc=ccross@android.com \
    --cc=cgroups@vger.kernel.org \
    --cc=christian.potzsch@imgtec.com \
    --cc=corbet@lwn.net \
    --cc=dimitrysh@google.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=keescook@chromium.org \
    --cc=kernel-team@android.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=luto@amacapital.net \
    --cc=mtk.manpages@gmail.com \
    --cc=romlem@android.com \
    --cc=serge@hallyn.com \
    --cc=tj@kernel.org \
    --cc=tkjos@google.com \
    /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).