Closed Larry-shuo closed 1 year ago
When I load the eBPF program hello.bpf.o into the kernel, An error occurred:
$ sudo bpftool prog load hello-func.bpf.o /sys/fs/bpf/hello libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1 libbpf: failed to guess program type from ELF section 'raw_tp' libbpf: supported section(type) names are: socket sk_reuseport/migrate sk_reuseport kprobe/ uprobe/ kretprobe/ uretprobe/ classifier action tracepoint/ tp/ raw_tracepoint/ raw_tp/ tp_btf/ fentry/ fmod_ret/ fexit/ fentry.s/ fmod_ret.s/ fexit.s/ freplace/ lsm/ lsm.s/ iter/ syscall xdp_devmap/ xdp_cpumap/ xdp perf_event lwt_in lwt_out lwt_xmit lwt_seg6local cgroup_skb/ingress cgroup_skb/egress cgroup/skb cgroup/sock_create cgroup/sock_release cgroup/sock cgroup/post_bind4 cgroup/post_bind6 cgroup/dev sockops sk_skb/stream_parser sk_skb/stream_verdict sk_skb sk_msg lirc_mode2 flow_dissector cgroup/bind4 cgroup/bind6 cgroup/connect4 cgroup/connect6 cgroup/sendmsg4 cgroup/sendmsg6 cgroup/recvmsg4 cgroup/recvmsg6 cgroup/getpeername4 cgroup/getpeername6 cgroup/getsockname4 cgroup/getsockname6 cgroup/sysctl cgroup/getsockopt cgroup/setsockopt struct_ops sk_lookup/
maybe SEC("raw_tp") should changed to SEC("raw_tp/")
SEC("raw_tp")
SEC("raw_tp/")
Indeed, I noticed the same behavior. Commented in this other issue: https://github.com/lizrice/learning-ebpf/issues/24#issuecomment-1613891081
When I load the eBPF program hello.bpf.o into the kernel, An error occurred:
maybe
SEC("raw_tp")
should changed toSEC("raw_tp/")