Files
kernel/include/linux
Willem de Bruijn 2dfd184abd flow_dissector: fix build failure without CONFIG_NET
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: d58e468b11 ("flow_dissector: implements flow dissector BPF hook")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-09-19 23:46:44 +02:00
..
2018-08-09 14:05:30 -07:00
2018-07-24 14:43:26 -06:00
2018-08-22 10:52:48 -07:00
2018-07-24 19:11:26 +02:00
2018-07-27 09:57:23 +10:00
2018-09-05 10:09:50 +02:00
2018-08-08 11:06:20 +02:00
2018-08-22 10:52:45 -07:00
2018-07-25 13:41:22 -07:00
2018-08-22 10:52:46 -07:00
2018-08-02 17:33:06 -04:00
2018-08-02 17:16:05 +02:00
2018-08-16 12:14:42 -07:00