bpftools/linux-observability-with-bpf

Need GPL License

vanx7 opened this issue · 0 comments

vanx7 commented

As follow code/chapter-7/iproute2/ I got errors as below.

[root@fedora y]# vim xdp_drop_udp.c
[root@fedora y]# clang -g -c -O2 -target bpf -c xdp_drop_udp.c -o xdp_drop_udp.o
[root@fedora y]# ip link set dev enp0s7 xdp obj xdp_drop_udp.o sec mysection

Prog section 'mysection' rejected: Permission denied (13)!
 - Type:         6
 - Instructions: 6 (0 over limit)
 - License:

Verifier analysis:

0: (61) r1 = *(u32 *)(r1 +0)
1: (71) r1 = *(u8 *)(r1 +23)
invalid access to packet, off=23 size=1, R1(id=0,off=23,r=0)
R1 offset is outside of the packet
processed 2 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0

Error fetching program/map!
[root@fedora y]# uname -a
Linux fedora 5.15.12-200.fc35.x86_64 #1 SMP Wed Dec 29 15:03:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux