Open taoky opened 1 year ago
This is expected behaviour, aya-ebpf (the kernel side crate) does not support CORE relocations yet
This is expected behaviour, aya-ebpf (the kernel side crate) does not support CORE relocations yet
Thanks for your reply. I'm still curious that how aya supports CO-RE now. Would it work if I don't recompile and just copy eBPF binary compiled from Linux 6.4 to machines running Linux 6.1 in this case?
I have read https://facebookmicrosites.github.io/bpf/blog/2020/02/19/bpf-portability-and-co-re.html#reading-kernel-structures-fields again and it looks like some special functions like bpf_core_read()
are required to utilize CO-RE when reading kernel structure’s fields...
Environment: Arch Linux, Linux 6.4.7
MRE:
__x64_sys_execve
aya-tool
to generate vmlinux:aya-tool generate task_struct > aya-co-re-issue-ebpf/src/vmlinux.rs
By debugging it seems that the error is caused by:
Is it an expected behavior, or some bugs when generating vmlinux?