gojue/ebpfmanager

tests failed : examples/clone_vs_add_hook unsatisfied map reference

cfc4n opened this issue · 0 comments

cfc4n commented
cfc4n@vm-server:~/project/ebpfmanager/examples/clone_vs_add_hook$ make
mkdir -p ebpf/bin
clang -D__KERNEL__ -D__ASM_SYSREG_H \
	-Wno-unused-value \
	-Wno-pointer-sign \
	-Wno-compare-distinct-pointer-types \
	-Wunused \
	-Wall \
	-Werror \
	-I/lib/modules/$(uname -r)/build/include \
	-I/lib/modules/$(uname -r)/build/include/uapi \
	-I/lib/modules/$(uname -r)/build/include/generated/uapi \
	-I/lib/modules/$(uname -r)/build/arch/x86/include \
	-I/lib/modules/$(uname -r)/build/arch/x86/include/uapi \
	-I/lib/modules/$(uname -r)/build/arch/x86/include/generated \
	-O2 -emit-llvm \
	ebpf/main.c \
	-c -o - | llc -march=bpf -filetype=obj -o ebpf/bin/probe.o
go-bindata -pkg main -prefix "ebpf/bin" -o "probe.go" "ebpf/bin/probe.o"
go build -o bin/main .
sudo bin/main
INFO[0000] eBPF programs running, head over to /sys/kernel/debug/tracing/trace_pipe to see them in action.
INFO[0000] INITIAL PROGRAMS
INFO[0000] Generating events to trigger the probes ...
INFO[0000] creating /tmp/test_folder
INFO[0000] received: CPU:1 my_constant:100
INFO[0001] removing /tmp/test_folder
INFO[0001] CLONE DEMO
FATA[0002] error:error:cannot load program without loading its whole collection: instruction 27: map my_constants: unsatisfied map reference , couldn't load new probe {UID:MySeconHook, EbpfFuncName:kprobe_vfs_mkdir} , failed to initialize new probe {UID:MySeconHook, EbpfFuncName:kprobe_vfs_mkdir}