From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: Potential issues (security and otherwise) with the current cgroup-bpf API Date: Tue, 17 Jan 2017 14:03:03 +0100 Message-ID: <20170117130303.GL19699@dhcp22.suse.cz> References: <20161219205631.GA31242@ast-mbp.thefacebook.com> <20161220000254.GA58895@ast-mbp.thefacebook.com> <2dbec775-6304-e44c-19c5-fbf07877e7b1@gmail.com> <20161220091150.GJ3124@twins.programming.kicks-ass.net> <20170103102559.GA30129@dhcp22.suse.cz> <20170116011901.GH14446@mtj.duckdns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20170116011901.GH14446@mtj.duckdns.org> Sender: linux-kernel-owner@vger.kernel.org To: Tejun Heo Cc: Peter Zijlstra , Andy Lutomirski , David Ahern , Alexei Starovoitov , Andy Lutomirski , Daniel Mack , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Kees Cook , Jann Horn , "David S. Miller" , Thomas Graf , Michael Kerrisk , Linux API , "linux-kernel@vger.kernel.org" , Network Development List-Id: linux-api@vger.kernel.org On Sun 15-01-17 20:19:01, Tejun Heo wrote: [...] > So, what's proposed is a proper part of bpf. In terms of > implementation, cgroup helps by hosting the pointers but that doesn't > necessarily affect the conceptual structure of it. Given that, I > don't think it'd be a good idea to add anything to cgroup interface > for this feature. Introspection is great to have but this should be > introspectable together with other bpf programs using the same > mechanism. That's where it belongs. If BPF only piggy backs on top of cgroup to iterate tasks shouldn't we at least enforce that the cgroup has to be a leaf one and no further children groups can be created once there is BPF program attached? This should break the existing usecases AFAIU and it would allow future changes without major API surprises. -- Michal Hocko SUSE Labs