From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ns.iliad.fr ([212.27.33.1]:37451 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755648AbbIWRNu (ORCPT ); Wed, 23 Sep 2015 13:13:50 -0400 Subject: Re: linux-3.4.109 arm compile error: implicit declaration of function ???bpf_jit_binary_free??? To: stable@vger.kernel.org, Jim Faulkner , Willy Tarreau References: <20150922181927.GA31339@alumni-linux.ccs.neu.edu> <20150922202842.GA24038@1wt.eu> From: Nicolas Schichan Message-ID: <5602DDCC.2020406@freebox.fr> Date: Wed, 23 Sep 2015 19:13:48 +0200 MIME-Version: 1.0 In-Reply-To: <20150922202842.GA24038@1wt.eu> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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