From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Olsa Subject: Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload Date: Mon, 8 Oct 2018 13:57:40 +0200 Message-ID: <20181008115740.GA17355@krava> References: <20181004135038.2876-1-daniel@iogearbox.net> <20181004171141.tsggdqnh65x2si4d@ast-mbp.dhcp.thefacebook.com> <20181004203949.388e9a38@redhat.com> <36266cde-3aa0-aeb4-9888-5e3f0e4d1911@iogearbox.net> <20181004222231.2edd5add@redhat.com> <20181004221013.o3c5junwfyaasuxo@ast-mbp.dhcp.thefacebook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jesper Dangaard Brouer , Daniel Borkmann , ast@kernel.org, netdev@vger.kernel.org, Jiri Olsa , acme@kernel.org To: Alexei Starovoitov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47054 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726656AbeJHTJI (ORCPT ); Mon, 8 Oct 2018 15:09:08 -0400 Content-Disposition: inline In-Reply-To: <20181004221013.o3c5junwfyaasuxo@ast-mbp.dhcp.thefacebook.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Oct 04, 2018 at 03:10:15PM -0700, Alexei Starovoitov wrote: > On Thu, Oct 04, 2018 at 10:22:31PM +0200, Jesper Dangaard Brouer wrote: > > On Thu, 4 Oct 2018 21:41:17 +0200 Daniel Borkmann wrote: > > > > > On 10/04/2018 08:39 PM, Jesper Dangaard Brouer wrote: > > > > On Thu, 4 Oct 2018 10:11:43 -0700 Alexei Starovoitov wrote: > > > >> On Thu, Oct 04, 2018 at 03:50:38PM +0200, Daniel Borkmann wrote: > > [...] > > > >> > > > >> If the purpose of the patch is to give user space visibility into > > > >> bpf prog load/unload as a notification, then I completely agree that > > > >> some notification mechanism is necessary. > > > > > > Yeah, I did only regard it as only that, nothing more. Some means > > > of timeline and notification that can be kept in a record in user > > > space and later retrieved e.g. for introspection on what has been > > > loaded. > > > > > > >> I've started working on such mechanism via perf ring buffer which is > > > >> the fastest mechanism we have in the kernel so far. > > > >> See long discussion here: https://patchwork.ozlabs.org/patch/971970/ I check that discussion and it's related only to bpf program load/unload, is there any plan to also notify about bpf program attachment? in the step 2 you described: step 2 (future work) single event for bpf prog_load with prog_id only. Either via perf ring buffer or ftrace or tracepoints or some other notification mechanism. would you see this to be feasible also for bpf prog attachment notification? thanks, jirka