From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756728AbaIQWAf (ORCPT ); Wed, 17 Sep 2014 18:00:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34769 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755815AbaIQWAd (ORCPT ); Wed, 17 Sep 2014 18:00:33 -0400 Message-ID: <541A045E.3030206@redhat.com> Date: Wed, 17 Sep 2014 23:59:58 +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 , Steven Rostedt , 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 v11 net-next 12/12] bpf: mini eBPF library, test stubs and verifier testsuite References: <1410325808-3657-1-git-send-email-ast@plumgrid.com> <1410325808-3657-13-git-send-email-ast@plumgrid.com> <54103776.3080706@redhat.com> <54193542.6080101@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/17/2014 06:17 PM, Alexei Starovoitov wrote: > On Wed, Sep 17, 2014 at 12:16 AM, Daniel Borkmann wrote: >> >> That actually still doesn't answer my question why the test stub >> cannot live in lib/test_bpf where we have our actual testing >> framework for eBPF/BPF, also since you exactly only build test_stub.c >> when TEST_BPF is enabled which is the Kconfig for lib/test_bpf. > > multiple reasons: > 1. > lib/test_bpf.c is a module, whereas test_stub.c is kernel builtin. > > 2. > I wasn't sure that reusing CONFIG_TEST_BPF for this > purpose was a good idea. May be it's better to introduce > CONFIG_BPF_VERIFIER_TEST_STUBS or something. > > 3. > kernel/bpf/test_stubs.c can be removed once real tracing > or socket use case is in. Yes, please, lets go for point 3 at the very least. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [PATCH v11 net-next 12/12] bpf: mini eBPF library, test stubs and verifier testsuite Date: Wed, 17 Sep 2014 23:59:58 +0200 Message-ID: <541A045E.3030206@redhat.com> References: <1410325808-3657-1-git-send-email-ast@plumgrid.com> <1410325808-3657-13-git-send-email-ast@plumgrid.com> <54103776.3080706@redhat.com> <54193542.6080101@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Ingo Molnar , Linus Torvalds , Andy Lutomirski , Steven Rostedt , Hannes Frederic Sowa , Chema Gonzalez , Eric Dumazet , Peter Zijlstra , Pablo Neira Ayuso , "H. Peter Anvin" , Andrew Morton , Kees Cook , Linux API , Network Development , LKML To: Alexei Starovoitov Return-path: In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On 09/17/2014 06:17 PM, Alexei Starovoitov wrote: > On Wed, Sep 17, 2014 at 12:16 AM, Daniel Borkmann wrote: >> >> That actually still doesn't answer my question why the test stub >> cannot live in lib/test_bpf where we have our actual testing >> framework for eBPF/BPF, also since you exactly only build test_stub.c >> when TEST_BPF is enabled which is the Kconfig for lib/test_bpf. > > multiple reasons: > 1. > lib/test_bpf.c is a module, whereas test_stub.c is kernel builtin. > > 2. > I wasn't sure that reusing CONFIG_TEST_BPF for this > purpose was a good idea. May be it's better to introduce > CONFIG_BPF_VERIFIER_TEST_STUBS or something. > > 3. > kernel/bpf/test_stubs.c can be removed once real tracing > or socket use case is in. Yes, please, lets go for point 3 at the very least.