-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Environment: ubuntu 21.04 kernel 5.11.0
- It fails to load epf-lsm program.
Error: the BPF_PROG_LOAD syscall failed. Verifier output: func#0 @0 number of funcs in func_info doesn't match number of subprogs verification time 13 usec stack depth 0 processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
Here is the log used by strace
bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_LSM, insn_cnt=192, insns=0x561ac794b510, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(5, 11, 0), prog_flags=0, prog_name="sb_mount", prog_ifindex=0, expected_attach_type=BPF_LSM_MAC, prog_btf_fd=10, func_info_rec_size=8, func_info=0x561ac77b82f0, func_info_cnt=2, line_info_rec_size=16, line_info=0x561ac77b87f0, line_info_cnt=69, attach_btf_id=32269, attach_prog_fd=0}, 144) = -1 EINVAL (Invalid argument)
I searched the linux kernel 5.11.0 and found the error is raising when eBPF verifier trying to compare attr->func_info_cnt and env->subprog_cnt but I don't understand why.
- I also want to know which library is used to load ebpf program
Metadata
Metadata
Assignees
Labels
No labels