[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH3MdRUdXwJiKOVa_CpOaA0BeO8rrjwGv6nM6XqGhK+rb0qWdQ@mail.gmail.com>
Date: Tue, 18 Sep 2018 16:59:35 -0700
From: Y Song <ys114321@...il.com>
To: willemdebruijn.kernel@...il.com
Cc: netdev <netdev@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, rdunlap@...radead.org,
willemb@...gle.com
Subject: Re: [PATCH bpf-next] flow_dissector: fix build failure without CONFIG_NET
On Tue, Sep 18, 2018 at 1:20 PM Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
>
> From: Willem de Bruijn <willemb@...gle.com>
>
> If boolean CONFIG_BPF_SYSCALL is enabled, kernel/bpf/syscall.c will
> call flow_dissector functions from net/core/flow_dissector.c.
>
> This causes this build failure if CONFIG_NET is disabled:
>
> kernel/bpf/syscall.o: In function `__x64_sys_bpf':
> syscall.c:(.text+0x3278): undefined reference to
> `skb_flow_dissector_bpf_prog_attach'
> syscall.c:(.text+0x3310): undefined reference to
> `skb_flow_dissector_bpf_prog_detach'
> kernel/bpf/syscall.o:(.rodata+0x3f0): undefined reference to
> `flow_dissector_prog_ops'
> kernel/bpf/verifier.o:(.rodata+0x250): undefined reference to
> `flow_dissector_verifier_ops'
>
> Analogous to other optional BPF program types in syscall.c, add stubs
> if the relevant functions are not compiled and move the BPF_PROG_TYPE
> definition in the #ifdef CONFIG_NET block.
>
> Fixes: d58e468b1112 ("flow_dissector: implements flow dissector BPF hook")
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
Acked-by: Yonghong Song <yhs@...com>
Powered by blists - more mailing lists