From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932642AbaIRSTV (ORCPT ); Thu, 18 Sep 2014 14:19:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45321 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932443AbaIRSTT (ORCPT ); Thu, 18 Sep 2014 14:19:19 -0400 Message-ID: <541B1624.80302@redhat.com> Date: Thu, 18 Sep 2014 19:28:04 +0200 From: Daniel Borkmann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Alexei Starovoitov CC: "David S. Miller" , Ingo Molnar , Linus Torvalds , Andy Lutomirski , Hannes Frederic Sowa , Chema Gonzalez , Eric Dumazet , Peter Zijlstra , Pablo Neira Ayuso , "H. Peter Anvin" , Andrew Morton , Kees Cook , Linux API , Network Development , LKML Subject: Re: [PATCH v13 net-next 07/11] bpf: verifier (add ability to receive verification log) References: <1410914370-29883-1-git-send-email-ast@plumgrid.com> <1410914370-29883-8-git-send-email-ast@plumgrid.com> <54192F66.8020200@redhat.com> <5419BED8.5020309@redhat.com> <5419DE51.1060904@redhat.com> <541A7F35.2010804@redhat.com> <541AF11C.9050405@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/18/2014 05:24 PM, Alexei Starovoitov wrote: ... > solve or not. If we decide to solve it, we need to have > a plan to solve it all the way. Partial fix for size of bpf_attr > is not a plan. It's something that is not addressing the problem > completely. Little bit of help is not useful for userspace. It > would need to deal with new types, verifier differences and > other things that I mentioned earlier. Hm, I don't think it would be a strict requirement to solve it all the way, and I think that perf_event_open() with perf_copy_attr() is not trying to do so either. It, however, is trying on a ``best effort basis'' to still load something if new features are unused by the binary (I guess you saw the comment in perf_copy_attr()). Iff, e.g. due to new types we fail at the verifier stage, sure, that's life since we only have backwards-compatible guarantee, but in case we tried to use features we support, we're still able to load the eBPF program while right now, we're rejecting it right up-front. That's just my $0.02 ...