netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "Serge E. Hallyn" <serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
Cc: "Andy Lutomirski" <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>,
	"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>
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 11:57:45 -0500	[thread overview]
Message-ID: <20161206165745.GB17648@mtj.duckdns.org> (raw)
In-Reply-To: <20161206020011.GA22261-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>

Hello, Serge.

On Mon, Dec 05, 2016 at 08:00:11PM -0600, Serge E. Hallyn wrote:
> > I really don't know.  The cgroupfs interface is a bit unfortunate in
> > that it doesn't really express the constraints.  To safely migrate a
> > task, ISTM you ought to have some form of privilege over the task
> > *and* some form of privilege over the cgroup.
> 
> Agreed.  The problem is that the privilege required should depend on
> the controller (I guess).  For memory and cpuset, CAP_SYS_NICE seems
> right.  Perhaps CAP_SYS_RESOURCE would be needed for some..  but then,
> as I look through the lists (capabilities(7) and the list of controllers),
> it seems like CAP_SYS_NICE works for everything.  What else would we need?
> Maybe CAP_NET_ADMIN for net_cls and net_prio?  CAP_SYS_RESOURCE|CAP_SYS_ADMIN
> for pids?

Please see my other reply but I don't think it's a good idea to have
these extra checks on the side when there already is hierarchical
delegation mechanism which should be able to handle both resource
control and process management delegation.

Thanks.

-- 
tejun

  parent reply	other threads:[~2016-12-06 16:57 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 [this message]
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
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=20161206165745.GB17648@mtj.duckdns.org \
    --to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=alexei.starovoitov-Re5JQEeQqe8AvxtiuMwx3w@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 \
    --cc=serge-A9i7LUbDfNHQT0dZR+AlfA@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).