From: Joe Stringer <hidden> Date: 2018-10-03 12:19:22
Stephen Rothwell reports the following link failure with IPv6 as module:
x86_64-linux-gnu-ld: net/core/filter.o: in function `sk_lookup':
(.text+0x19219): undefined reference to `__udp6_lib_lookup'
Fix the build by only enabling the IPv6 socket lookup if IPv6 support is
compiled into the kernel.
Signed-off-by: Joe Stringer <redacted>
---
net/core/filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Daniel Borkmann <daniel@iogearbox.net> Date: 2018-10-04 15:40:49
On 10/03/2018 07:32 AM, Joe Stringer wrote:
quoted hunk
Stephen Rothwell reports the following link failure with IPv6 as module:
x86_64-linux-gnu-ld: net/core/filter.o: in function `sk_lookup':
(.text+0x19219): undefined reference to `__udp6_lib_lookup'
Fix the build by only enabling the IPv6 socket lookup if IPv6 support is
compiled into the kernel.
Signed-off-by: Joe Stringer <redacted>
---
net/core/filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Applied as a quick fix, thanks Joe, but ideally this should also work when ipv6
is compiled as a module. There's the ipv6_bpf_stub, which does that job for other
helpers that would call into v6 code out of the builtin filter.c, so I think we
should follow the same approach here as well. See commit d74bad4e74ee ("bpf:
Hooks for sys_connect").
Thanks,
Daniel
From: Joe Stringer <hidden> Date: 2018-10-05 01:28:00
On Thu, 4 Oct 2018 at 01:48, Daniel Borkmann [off-list ref] wrote:
On 10/03/2018 07:32 AM, Joe Stringer wrote:
quoted
Stephen Rothwell reports the following link failure with IPv6 as module:
x86_64-linux-gnu-ld: net/core/filter.o: in function `sk_lookup':
(.text+0x19219): undefined reference to `__udp6_lib_lookup'
Fix the build by only enabling the IPv6 socket lookup if IPv6 support is
compiled into the kernel.
Signed-off-by: Joe Stringer <redacted>
---
net/core/filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Applied as a quick fix, thanks Joe, but ideally this should also work when ipv6
is compiled as a module. There's the ipv6_bpf_stub, which does that job for other
helpers that would call into v6 code out of the builtin filter.c, so I think we
should follow the same approach here as well. See commit d74bad4e74ee ("bpf:
Hooks for sys_connect").
Thanks for the pointers, I'll look into that.
To confirm my understanding, is it possible to unload the IPv6 module?
I don't see any code that uninitializes "ipv6_bpf_stub". Seems like a
simple conditional check on that variable should be enough to gate its
usage from packet paths where sk_lookup could be invoked (Given that
the system could receive any packets, including IPv6 when the module
is not loaded).
Cheers,
Joe
From: Daniel Borkmann <daniel@iogearbox.net> Date: 2018-10-05 01:41:30
On 10/04/2018 08:33 PM, Joe Stringer wrote:
On Thu, 4 Oct 2018 at 01:48, Daniel Borkmann [off-list ref] wrote:
quoted
On 10/03/2018 07:32 AM, Joe Stringer wrote:
quoted
Stephen Rothwell reports the following link failure with IPv6 as module:
x86_64-linux-gnu-ld: net/core/filter.o: in function `sk_lookup':
(.text+0x19219): undefined reference to `__udp6_lib_lookup'
Fix the build by only enabling the IPv6 socket lookup if IPv6 support is
compiled into the kernel.
Signed-off-by: Joe Stringer <redacted>
---
net/core/filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Applied as a quick fix, thanks Joe, but ideally this should also work when ipv6
is compiled as a module. There's the ipv6_bpf_stub, which does that job for other
helpers that would call into v6 code out of the builtin filter.c, so I think we
should follow the same approach here as well. See commit d74bad4e74ee ("bpf:
Hooks for sys_connect").
Thanks for the pointers, I'll look into that.
To confirm my understanding, is it possible to unload the IPv6 module?
I don't see any code that uninitializes "ipv6_bpf_stub". Seems like a
simple conditional check on that variable should be enough to gate its
usage from packet paths where sk_lookup could be invoked (Given that
the system could receive any packets, including IPv6 when the module
is not loaded).
No unload, this has been removed via 8ce440610357 ("ipv6: do not allow
ipv6 module to be removed").
Thanks,
Daniel