From: Tejun Heo <tj@kernel.org>
To: Aleksa Sarai <asarai@suse.de>
Cc: Li Zefan <lizefan@huawei.com>,
Johannes Weiner <hannes@cmpxchg.org>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
dev@opencontainers.org, Aleksa Sarai <cyphar@cyphar.com>
Subject: Re: [PATCH v3 1/2] cgroup: apply common ancestor cgroup.procs restriction in cgroupv1
Date: Mon, 2 May 2016 12:03:32 -0400 [thread overview]
Message-ID: <20160502160332.GQ7822@mtj.duckdns.org> (raw)
In-Reply-To: <1462197681-6879-2-git-send-email-asarai@suse.de>
On Tue, May 03, 2016 at 12:01:20AM +1000, Aleksa Sarai wrote:
> The common ancestor restriction for moving tasks between cgroups (the
> process moving the task must have the right to write to cgroup.procs in
> both the destination and common ancestor cgroup) only applied for
> cgroupv2 (cgroups in the default hierarchy). This meant that there was a
> different policy for unprivileged users in the different cgroup
> hierarchies.
>
> Update cgroup_procs_write_permission() to apply the cgroup.procs
> restriction regardless of the cgroup root of the destination cgroup.
> However, if the task doesn't have any association with the destination
> hierarchy, there's no permission check to be done. In addition, if the
> destination cgroup is a descendant of the task's current cgroup then
> there are no further permission checks. This is important for
> unprivileged processes creating subtrees.
So, you can't apply a new restriction like this retro-actively to
cgroup v1 hierarchies.
Thanks.
--
tejun
next prev parent reply other threads:[~2016-05-02 16:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 14:01 [PATCH v3 0/2] cgroup: allow management of subtrees by new cgroup namespaces Aleksa Sarai
2016-05-02 14:01 ` [PATCH v3 1/2] cgroup: apply common ancestor cgroup.procs restriction in cgroupv1 Aleksa Sarai
2016-05-02 16:03 ` Tejun Heo [this message]
2016-05-03 1:44 ` Aleksa Sarai
2016-05-02 14:01 ` [PATCH v3 2/2] cgroup: allow management of subtrees by new cgroup namespaces Aleksa Sarai
2016-05-02 16:06 ` Tejun Heo
2016-05-03 1:52 ` Aleksa Sarai
2016-05-03 15:55 ` Tejun Heo
2016-05-04 9:58 ` Aleksa Sarai
2016-05-09 14:04 ` Aleksa Sarai
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=20160502160332.GQ7822@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=asarai@suse.de \
--cc=cgroups@vger.kernel.org \
--cc=cyphar@cyphar.com \
--cc=dev@opencontainers.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.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
all inboxes | Powered by JetHome®