BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpf: fix link failure with NETFILTER=y INET=n
       [not found] <202304220903.fRZTJtxe-lkp@intel.com>
@ 2023-04-22  7:35 ` Florian Westphal
  2023-04-22 15:24   ` Alexei Starovoitov
  2023-04-22 15:30   ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Florian Westphal @ 2023-04-22  7:35 UTC (permalink / raw)
  To: bpf; +Cc: Alexei Starovoitov

Explicitly check if NETFILTER_BPF_LINK is enabled, else configs
that have NETFILTER=y but CONFIG_INET=n fail to link:

> kernel/bpf/syscall.o: undefined reference to `netfilter_prog_ops'
> kernel/bpf/verifier.o: undefined reference to `netfilter_verifier_ops'

Fixes: fd9c663b9ad6 ("bpf: minimal support for programs hooked into netfilter framework")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202304220903.fRZTJtxe-lkp@intel.com/
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 checked that my 'goodconfig' still yields a kernel that accepts bpf-nf progs.

 include/linux/bpf_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/bpf_types.h b/include/linux/bpf_types.h
index 39a999abb0ce..fc0d6f32c687 100644
--- a/include/linux/bpf_types.h
+++ b/include/linux/bpf_types.h
@@ -79,7 +79,7 @@ BPF_PROG_TYPE(BPF_PROG_TYPE_LSM, lsm,
 #endif
 BPF_PROG_TYPE(BPF_PROG_TYPE_SYSCALL, bpf_syscall,
 	      void *, void *)
-#ifdef CONFIG_NETFILTER
+#ifdef CONFIG_NETFILTER_BPF_LINK
 BPF_PROG_TYPE(BPF_PROG_TYPE_NETFILTER, netfilter,
 	      struct bpf_nf_ctx, struct bpf_nf_ctx)
 #endif
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next] bpf: fix link failure with NETFILTER=y INET=n
  2023-04-22  7:35 ` [PATCH bpf-next] bpf: fix link failure with NETFILTER=y INET=n Florian Westphal
@ 2023-04-22 15:24   ` Alexei Starovoitov
  2023-04-22 15:30   ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2023-04-22 15:24 UTC (permalink / raw)
  To: Florian Westphal; +Cc: bpf, Alexei Starovoitov

On Sat, Apr 22, 2023 at 12:35 AM Florian Westphal <fw@strlen.de> wrote:
>
> Explicitly check if NETFILTER_BPF_LINK is enabled, else configs
> that have NETFILTER=y but CONFIG_INET=n fail to link:

netfilter=y and inet=n ? wow. Didn't realize such a config is possible.
Thanks for the quick fix.
Applied.

> > kernel/bpf/syscall.o: undefined reference to `netfilter_prog_ops'
> > kernel/bpf/verifier.o: undefined reference to `netfilter_verifier_ops'

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next] bpf: fix link failure with NETFILTER=y INET=n
  2023-04-22  7:35 ` [PATCH bpf-next] bpf: fix link failure with NETFILTER=y INET=n Florian Westphal
  2023-04-22 15:24   ` Alexei Starovoitov
@ 2023-04-22 15:30   ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-22 15:30 UTC (permalink / raw)
  To: Florian Westphal; +Cc: bpf, ast

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Sat, 22 Apr 2023 09:35:44 +0200 you wrote:
> Explicitly check if NETFILTER_BPF_LINK is enabled, else configs
> that have NETFILTER=y but CONFIG_INET=n fail to link:
> 
> > kernel/bpf/syscall.o: undefined reference to `netfilter_prog_ops'
> > kernel/bpf/verifier.o: undefined reference to `netfilter_verifier_ops'
> 
> Fixes: fd9c663b9ad6 ("bpf: minimal support for programs hooked into netfilter framework")
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202304220903.fRZTJtxe-lkp@intel.com/
> Signed-off-by: Florian Westphal <fw@strlen.de>
> 
> [...]

Here is the summary with links:
  - [bpf-next] bpf: fix link failure with NETFILTER=y INET=n
    https://git.kernel.org/bpf/bpf-next/c/6d26d985eeda

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-22 15:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202304220903.fRZTJtxe-lkp@intel.com>
2023-04-22  7:35 ` [PATCH bpf-next] bpf: fix link failure with NETFILTER=y INET=n Florian Westphal
2023-04-22 15:24   ` Alexei Starovoitov
2023-04-22 15:30   ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox