From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>
Cc: "John Stultz"
<john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"Alexei Starovoitov"
<alexei.starovoitov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Andy Lutomirski" <luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Mickaël Salaün" <mic-WFhQfpSGs3bR7s880joybQ@public.gmane.org>,
"Daniel Mack" <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
kafai-b10kYP2dOMg@public.gmane.org,
"Florian Westphal" <fw-HFFVJYpyMKqzQB+pC5nmwQ@public.gmane.org>,
"Harald Hoyer" <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"Network Development"
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Sargun Dhillon" <sargun-GaZTRHToo+CzQB+pC5nmwQ@public.gmane.org>,
"Pablo Neira Ayuso"
<pablo-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org>,
lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Li Zefan" <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
"Jonathan Corbet" <corbet-T1hC0tSOHrs@public.gmane.org>,
"open list:CONTROL GROUP (CGROUP)"
<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: Re: [RESEND][PATCH v4] cgroup: Use CAP_SYS_RESOURCE to allow a process to migrate other tasks between cgroups
Date: Tue, 6 Dec 2016 13:12:21 -0500 [thread overview]
Message-ID: <20161206181221.GA2625@mtj.duckdns.org> (raw)
In-Reply-To: <CALCETrV3Yrq1hRcoGCTU_z-T-6hmq-gY-HytR2HGkvnRK-W1SQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hello,
On Tue, Dec 06, 2016 at 09:01:17AM -0800, Andy Lutomirski wrote:
> How would one be granted the right to move processes around in one's
> own subtree?
Through expicit delegation - chowning of the directory and
cgroup.procs file.
> Are you imagining that, if you're in /a/b and you want to move a
> process that's currently in /a/b/c to /a/b/d then you're allowed to
> because the target process is in your tree? If so, I doubt this has
> the security properties you want -- namely, if you can cooperate with
> anyone in /, even if they're unprivileged, you can break it.
Delegation is an explicit operation and reflected in the ownership of
the subdirectories and cgroup interface files in them. The
subhierarchy containment is achieved by requiring the user who's
trying to migrate a process to have write perm on cgroup.procs on the
common ancestor of the source and target in addition to the target.
So, a user who has a subhierarchy delegated to it can move processes
around inside but not out of or into it. Also, if there are multiple
delegated disjoint subhierarchies, processes can't be moved across
them by the delegatee either.
Thanks.
--
tejun
next prev parent reply other threads:[~2016-12-06 18:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1478647728-30357-1-git-send-email-john.stultz@linaro.org>
2016-11-08 23:51 ` [RESEND][PATCH v4] cgroup: Use CAP_SYS_RESOURCE to allow a process to migrate other tasks between cgroups Andy Lutomirski
2016-11-09 0:03 ` Alexei Starovoitov
2016-11-09 0:12 ` Andy Lutomirski
2016-11-23 0:57 ` John Stultz
2016-12-06 0:28 ` John Stultz
[not found] ` <CALAqxLW-mq4Lnudtn5KMBPdzBTg5bhTXV9QmUC2vfabVru+fUA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-06 0:36 ` Andy Lutomirski
2016-12-06 2:00 ` Serge E. Hallyn
[not found] ` <20161206020011.GA22261-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2016-12-06 16:57 ` Tejun Heo
2016-12-06 16:55 ` Tejun Heo
[not found] ` <20161206165519.GA17648-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-12-06 17:01 ` Andy Lutomirski
[not found] ` <CALCETrV3Yrq1hRcoGCTU_z-T-6hmq-gY-HytR2HGkvnRK-W1SQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-06 18:12 ` Tejun Heo [this message]
2016-12-06 18:13 ` Andy Lutomirski
2016-12-06 18:23 ` Tejun Heo
[not found] ` <20161206182315.GB2625-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-12-09 5:39 ` John Stultz
2016-12-09 13:27 ` 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=20161206181221.GA2625@mtj.duckdns.org \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=alexei.starovoitov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=corbet-T1hC0tSOHrs@public.gmane.org \
--cc=daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=fw-HFFVJYpyMKqzQB+pC5nmwQ@public.gmane.org \
--cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=kafai-b10kYP2dOMg@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=luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
--cc=mic-WFhQfpSGs3bR7s880joybQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pablo-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org \
--cc=romlem-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=sargun-GaZTRHToo+CzQB+pC5nmwQ@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).