All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>
Cc: "David Ahern" <dsahern-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Alexei Starovoitov"
	<alexei.starovoitov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Andy Lutomirski" <luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"Daniel Mack" <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org>,
	"Mickaël Salaün" <mic-WFhQfpSGs3bR7s880joybQ@public.gmane.org>,
	"Kees Cook" <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	"Jann Horn" <jann-XZ1E9jl8jIdeoWH0uzbU5w@public.gmane.org>,
	"Tejun Heo" <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	"Thomas Graf" <tgraf-G/eBtMaohhA@public.gmane.org>,
	"Michael Kerrisk"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Linux API" <linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Network Development"
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Potential issues (security and otherwise) with the current cgroup-bpf API
Date: Tue, 20 Dec 2016 10:11:50 +0100	[thread overview]
Message-ID: <20161220091150.GJ3124@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CALCETrUW2jEYmjSsOrPj+MAjkDGGUCw_rdxQh+5Er0r4ReGLnA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, Dec 19, 2016 at 05:56:24PM -0800, Andy Lutomirski wrote:
> >> Huh?  My example in the original email attaches a program in a
> >> sub-hierarchy.  Are you saying that 4.11 could make that example stop
> >> working?
> >
> > Are you suggesting sub-cgroups should not be allowed to override the filter of a parent cgroup?
> 
> Yes, exactly.  I think there are two sensible behaviors:
> 
> a) sub-cgroups cannot have a filter at all of the parent has a filter.
> (This is the "punt" approach -- it lets different semantics be
> assigned later without breaking userspace.)
> 
> b) sub-cgroups can have a filter if a parent does, too.  The semantics
> are that the sub-cgroup filter runs first and all side-effects occur.
> If that filter says "reject" then ancestor filters are skipped.  If
> that filter says "accept", then the ancestor filter is run and its
> side-effects happen as well.  (And so on, all the way up to the root.)

So from what I understand the proposed cgroup is not in fact
hierarchical at all.

@TJ, I thought you were enforcing all new cgroups to be properly
hierarchical, that would very much include this one.

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "David Ahern" <dsahern@gmail.com>,
	"Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Daniel Mack" <daniel@zonque.org>,
	"Mickaël Salaün" <mic@digikod.net>,
	"Kees Cook" <keescook@chromium.org>, "Jann Horn" <jann@thejh.net>,
	"Tejun Heo" <tj@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Thomas Graf" <tgraf@suug.ch>,
	"Michael Kerrisk" <mtk.manpages@gmail.com>,
	"Linux API" <linux-api@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Network Development" <netdev@vger.kernel.org>
Subject: Re: Potential issues (security and otherwise) with the current cgroup-bpf API
Date: Tue, 20 Dec 2016 10:11:50 +0100	[thread overview]
Message-ID: <20161220091150.GJ3124@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CALCETrUW2jEYmjSsOrPj+MAjkDGGUCw_rdxQh+5Er0r4ReGLnA@mail.gmail.com>

On Mon, Dec 19, 2016 at 05:56:24PM -0800, Andy Lutomirski wrote:
> >> Huh?  My example in the original email attaches a program in a
> >> sub-hierarchy.  Are you saying that 4.11 could make that example stop
> >> working?
> >
> > Are you suggesting sub-cgroups should not be allowed to override the filter of a parent cgroup?
> 
> Yes, exactly.  I think there are two sensible behaviors:
> 
> a) sub-cgroups cannot have a filter at all of the parent has a filter.
> (This is the "punt" approach -- it lets different semantics be
> assigned later without breaking userspace.)
> 
> b) sub-cgroups can have a filter if a parent does, too.  The semantics
> are that the sub-cgroup filter runs first and all side-effects occur.
> If that filter says "reject" then ancestor filters are skipped.  If
> that filter says "accept", then the ancestor filter is run and its
> side-effects happen as well.  (And so on, all the way up to the root.)

So from what I understand the proposed cgroup is not in fact
hierarchical at all.

@TJ, I thought you were enforcing all new cgroups to be properly
hierarchical, that would very much include this one.

  parent reply	other threads:[~2016-12-20  9:11 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-17 18:18 Potential issues (security and otherwise) with the current cgroup-bpf API Andy Lutomirski
2016-12-17 18:18 ` Andy Lutomirski
2016-12-17 19:26 ` Mickaël Salaün
2016-12-17 20:02   ` Andy Lutomirski
2016-12-19 20:56 ` Alexei Starovoitov
2016-12-19 21:23   ` Andy Lutomirski
2016-12-20  0:02     ` Alexei Starovoitov
     [not found]       ` <20161220000254.GA58895-+o4/htvd0TDFYCXBM6kdu7fOX0fSgVTm@public.gmane.org>
2016-12-20  0:25         ` Andy Lutomirski
2016-12-20  0:25           ` Andy Lutomirski
2016-12-20  1:43           ` Andy Lutomirski
     [not found]           ` <CALCETrU1_bDVLfokQ7zasHVmeq7S-R+603GEw59V_wuj4eE1hw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  1:44             ` David Ahern
2016-12-20  1:44               ` David Ahern
     [not found]               ` <2dbec775-6304-e44c-19c5-fbf07877e7b1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-12-20  1:56                 ` Andy Lutomirski
2016-12-20  1:56                   ` Andy Lutomirski
     [not found]                   ` <CALCETrUW2jEYmjSsOrPj+MAjkDGGUCw_rdxQh+5Er0r4ReGLnA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  2:52                     ` David Ahern
2016-12-20  2:52                       ` David Ahern
2016-12-20  3:12                       ` Andy Lutomirski
2016-12-20  4:44                         ` Alexei Starovoitov
     [not found]                           ` <20161220044440.GB86803-+o4/htvd0TDFYCXBM6kdu7fOX0fSgVTm@public.gmane.org>
2016-12-20  5:27                             ` Andy Lutomirski
2016-12-20  5:27                               ` Andy Lutomirski
     [not found]                               ` <CALCETrVxkdZA3SsRv0KKhBz9YvNMsnmHSjS8HN1GHrgWRYNM1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20  5:32                                 ` Alexei Starovoitov
2016-12-20  5:32                                   ` Alexei Starovoitov
2016-12-20  9:11                     ` Peter Zijlstra [this message]
2016-12-20  9:11                       ` Peter Zijlstra
     [not found]                       ` <20161220091150.GJ3124-ndre7Fmf5hadTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2017-01-03 10:25                         ` Michal Hocko
2017-01-03 10:25                           ` Michal Hocko
     [not found]                           ` <20170103102559.GA30129-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-01-16  1:19                             ` Tejun Heo
2017-01-16  1:19                               ` Tejun Heo
2017-01-17 13:03                               ` Michal Hocko
2017-01-17 13:32                                 ` Peter Zijlstra
2017-01-17 13:58                                   ` Michal Hocko
     [not found]                                     ` <20170117135830.GO19699-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2017-01-17 20:23                                       ` Andy Lutomirski
2017-01-17 20:23                                         ` Andy Lutomirski
2017-01-18 22:18                                     ` Tejun Heo
2017-01-19  9:00                                       ` Michal Hocko
2016-12-20  3:18             ` Alexei Starovoitov
2016-12-20  3:18               ` Alexei Starovoitov
     [not found]               ` <20161220031802.GA77838-+o4/htvd0TDFYCXBM6kdu7fOX0fSgVTm@public.gmane.org>
2016-12-20  3:50                 ` Andy Lutomirski
2016-12-20  3:50                   ` Andy Lutomirski
2016-12-20  4:41                   ` Alexei Starovoitov
     [not found]                   ` <CALCETrXymvAo-9zhQe=amToz_fs9XGniK2KLZv5Fxc66qcUx6A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20 10:21                     ` Daniel Mack
2016-12-20 10:21                       ` Daniel Mack
2016-12-20 17:23                       ` Andy Lutomirski
     [not found]                         ` <CALCETrXyp2ddf4HRsEoN=qEwTBaezOUX2XWj6nxPcbc4t13svw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-20 18:36                           ` Daniel Mack
2016-12-20 18:36                             ` Daniel Mack
2016-12-20 18:49                             ` Andy Lutomirski
2016-12-21  4:01                               ` Alexei Starovoitov
2016-12-20  1:34         ` David Miller
2016-12-20  1:34           ` David Miller
     [not found]           ` <20161219.203422.500916400463091702.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2016-12-20  1:40             ` Andy Lutomirski
2016-12-20  1:40               ` Andy Lutomirski
2016-12-20  4:51               ` Alexei Starovoitov
2016-12-20  5:26                 ` Andy Lutomirski
  -- strict thread matches above, loose matches on Subject: below --
2017-01-17  5:18 (unknown), Andy Lutomirski
     [not found] ` <CALCETrW+ZQ1xMEfdEOzx6RK9ZoCvQiqQSnOyhDJ=-FZMwUbucg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-18 22:41   ` Potential issues (security and otherwise) with the current cgroup-bpf API Tejun Heo
2017-01-18 22:41     ` Tejun Heo
     [not found]     ` <20170118224120.GG9171-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2017-01-19  0:18       ` Andy Lutomirski
2017-01-19  0:18         ` Andy Lutomirski
     [not found]         ` <CALCETrXv3k+=C=9D5YGypzPk8_f4yo8ShQ3tM2fOo++gJFBM4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-19  0:59           ` Tejun Heo
2017-01-19  0:59             ` Tejun Heo
2017-01-19  2:29             ` Andy Lutomirski
     [not found]               ` <CALCETrVrEnL4cvkdDu2LUhxmeOZ+SMEmF=yKKsm9OYoW2y1Kpg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-20  2:39                 ` Alexei Starovoitov
2017-01-20  2:39                   ` Alexei Starovoitov
2017-01-20  4:04                   ` Andy Lutomirski
2017-01-23  4:31                     ` Alexei Starovoitov
     [not found]                       ` <20170123043154.GA93519-+o4/htvd0TDFYCXBM6kdu7fOX0fSgVTm@public.gmane.org>
2017-01-23 20:20                         ` Andy Lutomirski
2017-01-23 20:20                           ` Andy Lutomirski
     [not found]                           ` <CALCETrXK65itdDqYTdhB-Td8d-Hzj00dcDScUOUh9psCZN_cLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-03 21:07                             ` Andy Lutomirski
2017-02-03 21:07                               ` Andy Lutomirski
2017-02-03 23:21                               ` Alexei Starovoitov
     [not found]                                 ` <20170203232154.GA30114-+o4/htvd0TDFYCXBM6kdu7fOX0fSgVTm@public.gmane.org>
2017-02-04 17:10                                   ` Andy Lutomirski
2017-02-04 17:10                                     ` Andy Lutomirski
2017-01-19  1:01           ` Mickaël Salaün
2017-01-19  1:01             ` Mickaël Salaün

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=20161220091150.GJ3124@twins.programming.kicks-ass.net \
    --to=peterz-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
    --cc=alexei.starovoitov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=dsahern-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jann-XZ1E9jl8jIdeoWH0uzbU5w@public.gmane.org \
    --cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
    --cc=mic-WFhQfpSGs3bR7s880joybQ@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tgraf-G/eBtMaohhA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.