Re: linux-3.4.109 arm compile error: implicit declaration of function ???bpf_jit_binary_free???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]