Return-Path: Received: from amber.ccs.neu.edu ([129.10.116.51]:51362 "EHLO amber.ccs.neu.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750896AbbJDEXp (ORCPT ); Sun, 4 Oct 2015 00:23:45 -0400 Date: Sun, 4 Oct 2015 00:23:43 -0400 From: Jim Faulkner To: Nicolas Schichan Cc: stable@vger.kernel.org, Willy Tarreau Subject: Re: linux-3.4.109 arm compile error: implicit declaration of function ???bpf_jit_binary_free??? Message-ID: <20151004042341.GA23879@alumni-linux.ccs.neu.edu> References: <20150922181927.GA31339@alumni-linux.ccs.neu.edu> <20150922202842.GA24038@1wt.eu> <5602DDCC.2020406@freebox.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5602DDCC.2020406@freebox.fr> Sender: stable-owner@vger.kernel.org List-ID: The kernel builds and runs fine with Nicolas's patch. Thanks! On Wed, Sep 23, 2015 at 07:13:48PM +0200, Nicolas Schichan wrote: > On 09/22/2015 10:28 PM, Willy Tarreau wrote: > > Hello Willy, > > > Ccing the patch's author (Nicolas Schidan), maybe part of the patch was > > not appropriate for 3.4. The patch in question was 94/146 : > > > > [PATCH 3.4 094/146] ARM: net: delegate filter to kernel interpreter when imm_offset() return value can't fit into 12bits. > > > > And the relevant part : > > > > @@ -876,7 +894,14 @@ void bpf_jit_compile(struct sk_filter *fp) > > > > ctx.idx = 0; > > build_prologue(&ctx); > > - build_body(&ctx); > > + if (build_body(&ctx) < 0) { > > +#if __LINUX_ARM_ARCH__ < 7 > > + if (ctx.imm_count) > > + kfree(ctx.imms); > > +#endif > > + bpf_jit_binary_free(header); > > Indeed, bpf_jit_binary_free() was added circa Linux 3.18 and is not available > in earlier kernels. > > Does the patch below help ? > > ----8<----8<---- > diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c > index ad94145..77026415 100644 > --- a/arch/arm/net/bpf_jit_32.c > +++ b/arch/arm/net/bpf_jit_32.c > @@ -899,7 +899,7 @@ void bpf_jit_compile(struct sk_filter *fp) > if (ctx.imm_count) > kfree(ctx.imms); > #endif > - bpf_jit_binary_free(header); > + module_free(NULL, ctx.target); > goto out; > } > build_epilogue(&ctx); > ----8<----8<---- > > Regards, > > -- > Nicolas Schichan >