In file included from ./include/linux/bpf_verifier.h:11:0,
from kernel/bpf/verifier.c:17:
kernel/bpf/verifier.c: In function 'fixup_bpf_calls':
kernel/bpf/verifier.c:6131:36: error: 'BPF_JMP32' undeclared (first use in this function); did you mean 'BPF_JMP_A'?
BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) |
^
./include/linux/filter.h:317:12: note: in definition of macro 'BPF_RAW_INSN'
.code = CODE, \
^~~~
kernel/bpf/verifier.c:6131:36: note: each undeclared identifier is reported only once for each function it appears in
BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) |
^
./include/linux/filter.h:317:12: note: in definition of macro 'BPF_RAW_INSN'
.code = CODE, \
^~~~
kernel/bpf/verifier.c:6140:34: warning: pointer/integer type mismatch in conditional expression
error, forbidden warning:verifier.c:6140
BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) |
^
./include/linux/filter.h:317:12: note: in definition of macro 'BPF_RAW_INSN'
.code = CODE, \
^~~~
kernel/bpf/verifier.c:6140:47: error: invalid operands to binary | (have 'struct bpf_insn *' and 'int')
BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) |
./include/linux/filter.h:317:12: note: in definition of macro 'BPF_RAW_INSN'
.code = CODE, \
^~~~
kernel/bpf/verifier.c:6141:19: error: invalid operands to binary | (have 'struct bpf_insn *' and 'int')
BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) |
~
BPF_JEQ | BPF_K, insn->src_reg,
^
./include/linux/filter.h:317:12: note: in definition of macro 'BPF_RAW_INSN'
.code = CODE, \
^~~~
kernel/bpf/verifier.c:6140:18: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
error, forbidden warning:verifier.c:6140
BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) |
^
./include/linux/filter.h:317:12: note: in definition of macro 'BPF_RAW_INSN'
.code = CODE, \
^~~~
kernel/bpf/verifier.c:6140:18: note: (near initialization for '(anonymous).code')
BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) |
^
./include/linux/filter.h:317:12: note: in definition of macro 'BPF_RAW_INSN'
.code = CODE, \
^~~~
CC kernel/locking/mutex.o
CC fs/configfs/file.o
make[2]: *** [scripts/Makefile.build:334: kernel/bpf/verifier.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CC kernel/bpf/helpers.o
CC mm/fadvise.o
CC fs/configfs/dir.o
Please help.
I was trying to enable config for bpf in tinker_def_config.
Bpf config
CONFIG_BPF=y CONFIG_BPF_SYSCALL=y CONFIG_BPF_JIT=y CONFIG_NET_CLS_BPF=y CONFIG_NET_CLS_ACT=y CONFIG_NET_SCH_INGRESS=y CONFIG_CRYPTO_SHA1=y
But came up with these errors:
In file included from ./include/linux/bpf_verifier.h:11:0, from kernel/bpf/verifier.c:17: kernel/bpf/verifier.c: In function 'fixup_bpf_calls': kernel/bpf/verifier.c:6131:36: error: 'BPF_JMP32' undeclared (first use in this function); did you mean 'BPF_JMP_A'? BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) | ^ ./include/linux/filter.h:317:12: note: in definition of macro 'BPF_RAW_INSN' .code = CODE, \ ^~~~ kernel/bpf/verifier.c:6131:36: note: each undeclared identifier is reported only once for each function it appears in BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) | ^ ./include/linux/filter.h:317:12: note: in definition of macro 'BPF_RAW_INSN' .code = CODE, \ ^~~~ kernel/bpf/verifier.c:6140:34: warning: pointer/integer type mismatch in conditional expression error, forbidden warning:verifier.c:6140 BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) | ^ ./include/linux/filter.h:317:12: note: in definition of macro 'BPF_RAW_INSN' .code = CODE, \ ^~~~ kernel/bpf/verifier.c:6140:47: error: invalid operands to binary | (have 'struct bpf_insn *' and 'int') BPF_RAW_INSN((is64 ? BPF_JMP : BPF_JMP32) |