Skip to contentSkip to conversation

net: bpf: fix bpf syscall dependence on anon_inodes

PATCH Applied Alexei Starovoitov 2 participants 2 messages Oct 9, 2014 – Oct 10, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: bpf: fix bpf syscall dependence on anon_inodes

minimal configurations where EPOLL, PERF_EVENTS, etc are disabled, but NET is enabled, are failing to build with link error:
kernel/built-in.o: In function `bpf_prog_load':
syscall.c:(.text+0x3b728): undefined reference to `anon_inode_getfd'

fix it by selecting ANON_INODES when NET is enabled

---

I understand that 'select' is highly non-recommended for all good reasons, but here 'depends on' is very user unfriendly, since ANON_INODES is a hidden config that users cannot select directly.

 net/Kconfig |    1 +
 1 file changed, 1 insertion(+)
net/Kconfig +1 -0
index d6b138e..6272420 100644
@@ -6,6 +6,7 @@ menuconfig NET
 	bool "Networking support"
 	select NLATTR
 	select GENERIC_NET_UTILS
+	select ANON_INODES
 	---help---
 	  Unless you really know what you are doing, you should say Y here.
 	  The reason is that some programs need kernel networking support even
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw

From: Alexei Starovoitov <[email protected]>
Date: Thu, 9 Oct 2014 15:16:41 -0700

Quoted 7 lines

minimal configurations where EPOLL, PERF_EVENTS, etc are disabled, but NET is enabled, are failing to build with link error:
kernel/built-in.o: In function `bpf_prog_load':
syscall.c:(.text+0x3b728): undefined reference to `anon_inode_getfd'

fix it by selecting ANON_INODES when NET is enabled

Quoted 7 lines

---

I understand that 'select' is highly non-recommended for all good reasons, but here 'depends on' is very user unfriendly, since ANON_INODES is a hidden config that users cannot select directly.

Applied, thanks.