Skip to content

Instantly share code, notes, and snippets.

@oluceps
Last active February 28, 2023 19:35
Show Gist options
  • Save oluceps/151bfbfad9491b14057160b1d06b2a7a to your computer and use it in GitHub Desktop.
Save oluceps/151bfbfad9491b14057160b1d06b2a7a to your computer and use it in GitHub Desktop.
ls ../aa/fentry-link/fentry-link.h && ../../compiler/workspace/bin/ecc ../aa/fentry-link/fentry-link.bpf.c ../aa/fentry-link/fentry-link.h \
|| ../../compiler/workspace/bin/ecc ../aa/fentry-link/fentry-link.bpf.c
ls: cannot access '../aa/fentry-link/fentry-link.h': No such file or directory
Compiling bpf object...
Packing ebpf object and config into ../aa/fentry-link/package.json...
sudo timeout --preserve-status -s 2 2 ./ecli run ../aa/fentry-link/package.json
arg: ../aa/fentry-link/package.json
libbpf: prog 'do_unlinkat': failed to attach: ERROR: strerror_r(-524)=22
libbpf: prog 'do_unlinkat': failed to auto-attach: -524
failed to attach skeleton
Error: BpfError("load and attach ebpf program failed")
make: *** [Makefile:27: fentry-link] Error 1
ls ../aa/lsm-connect/lsm-connect.h && ../../compiler/workspace/bin/ecc ../aa/lsm-connect/lsm-connect.bpf.c ../aa/lsm-connect/lsm-connect.h \
|| ../../compiler/workspace/bin/ecc ../aa/lsm-connect/lsm-connect.bpf.c
ls: cannot access '../aa/lsm-connect/lsm-connect.h': No such file or directory
Compiling bpf object...
Packing ebpf object and config into ../aa/lsm-connect/package.json...
sudo timeout --preserve-status -s 2 2 ./ecli run ../aa/lsm-connect/package.json
arg: ../aa/lsm-connect/package.json
unknown type: __u32
libbpf: prog 'restrict_connect': failed to find kernel BTF type ID of 'socket_connect': -3
libbpf: prog 'restrict_connect': failed to prepare load attributes: -3
libbpf: prog 'restrict_connect': failed to load: -3
libbpf: failed to load object 'lsm_connect_bpf'
libbpf: failed to load BPF skeleton 'lsm_connect_bpf': -3
failed to load skeleton
Error: BpfError("load and attach ebpf program failed")
make: *** [Makefile:27: lsm-connect] Error 1
Generating export types...
Packing ebpf object and config into ../aa/mdflush/package.json...
sudo timeout --preserve-status -s 2 2 ./ecli run ../aa/mdflush/package.json
arg: ../aa/mdflush/package.json
libbpf: prog 'md_flush_request': failed to attach: ERROR: strerror_r(-524)=22
libbpf: prog 'md_flush_request': failed to auto-attach: -524
failed to attach skeleton
Error: BpfError("load and attach ebpf program failed")
make: *** [Makefile:27: mdflush] Error 1
riro@opulr-a ~/t/e/e/b/opensnoop (master)> ../../../compiler/workspace/bin/ecc opensnoop.bpf.c opensnoop.h
Compiling bpf object...
warning: text is not json: Process ID to trace use it as a string
warning: text is not json: Thread ID to trace use it as a string
warning: text is not json: User ID to trace use it as a string
warning: text is not json: trace only failed events use it as a string
warning: text is not json: Trace open family syscalls. use it as a string
Generating export types...
Packing ebpf object and config into package.json...
riro@opulr-a ~/t/e/e/b/opensnoop (master)> mv bpftools/lsm-connect/ aa^C
riro@opulr-a ~/t/e/e/b/opensnoop (master)> sudo dnf search llvm^C
riro@opulr-a ~/t/e/e/b/opensnoop (master)> sudo ../../tests/ecli run package.json
arg: package.json
libbpf: failed to determine tracepoint 'syscalls/sys_enter_open' perf event ID: No such file or directory
libbpf: prog 'tracepoint__syscalls__sys_enter_open': failed to create tracepoint 'syscalls/sys_enter_open' perf event: No such file or directory
libbpf: prog 'tracepoint__syscalls__sys_enter_open': failed to auto-attach: -2
failed to attach skeleton
Error: BpfError("load and attach ebpf program failed")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment