From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751329AbdAQNY1 (ORCPT ); Tue, 17 Jan 2017 08:24:27 -0500 Received: from mx2.suse.de ([195.135.220.15]:33097 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751295AbdAQNYX (ORCPT ); Tue, 17 Jan 2017 08:24:23 -0500 Date: Tue, 17 Jan 2017 14:03:03 +0100 From: Michal Hocko 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 Subject: Re: Potential issues (security and otherwise) with the current cgroup-bpf API 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 Content-Disposition: inline In-Reply-To: <20170116011901.GH14446@mtj.duckdns.org> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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