Open ghost opened 1 year ago
how to fix it ?
What's the result of cat /proc/kallsyms | grep sys_clone
?
Maybe it's happens cause you use python 2.7? @chenhengqi, what you can say about a compability with python 2.7?
cat /proc/kallsyms | grep sys_clone result:ffffff979b554cd0 t sys_clone
root@localhost:/bcc-master# execsnoop bpf: Failed to load program: Invalid argument
Traceback (most recent call last):
File "/usr/share/bcc/tools/execsnoop", line 172, in
i was compile android 12 ,android and open bpf kernel tracing, and run this demo is tip this text,pls brother help me
Does your kernel compiled with CONFIG_KPROBES enable? You can check that by zcat /proc/config.gz
(if /proc/config.gz exists) or grep KPROBE /boot/config-$(uname -r)
bpf: Failed to load program: Invalid argument
Traceback (most recent call last): File "examples/hello_world.py", line 12, in
BPF(text='int kprobesys_clone(void *ctx) { bpf_trace_printk("Hello, World!\n"); return 0; }').trace_print()
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 351, in init
self._trace_autoload()
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 1097, in _trace_autoload
fn = self.load_func(func_name, BPF.KPROBE)
File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 391, in load_func
(func_name, errstr))
Exception: Failed to load BPF program kprobesys_clone: Invalid argument