All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schichan <nschichan@freebox.fr>
To: stable@vger.kernel.org, Jim Faulkner <jfaulkne@ccs.neu.edu>,
	Willy Tarreau <w@1wt.eu>
Subject: Re: linux-3.4.109 arm compile error: implicit declaration of function ???bpf_jit_binary_free???
Date: Wed, 23 Sep 2015 19:13:48 +0200	[thread overview]
Message-ID: <5602DDCC.2020406@freebox.fr> (raw)
In-Reply-To: <20150922202842.GA24038@1wt.eu>

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


  reply	other threads:[~2015-09-23 17:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 18:19 linux-3.4.109 arm compile error: implicit declaration of function ‘bpf_jit_binary_free’ Jim Faulkner
2015-09-22 20:28 ` linux-3.4.109 arm compile error: implicit declaration of function ???bpf_jit_binary_free??? Willy Tarreau
2015-09-23 17:13   ` Nicolas Schichan [this message]
2015-10-04  4:23     ` Jim Faulkner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5602DDCC.2020406@freebox.fr \
    --to=nschichan@freebox.fr \
    --cc=jfaulkne@ccs.neu.edu \
    --cc=stable@vger.kernel.org \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.