-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow libbpf-tools to run on old kernels #4231
Comments
This is part of efforts towards iovisor#4231. Fallback to raw tracepoints if tp_btf is not available. With this patch, we also remove manual attach and merge the two irq_handler_entry handlers into one. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
This is part of efforts towards iovisor#4231. Fallback to raw tracepoints if tp_btf is not available. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
I wanted to give a shot at I suggest more using |
Using |
This is part of efforts towards #4231. Fallback to raw tracepoints if tp_btf is not available. With this patch, we also remove manual attach and merge the two irq_handler_entry handlers into one. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
This is part of efforts towards #4231. Fallback to raw tracepoints if tp_btf is not available. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Do we consider providing a cmd flag such as |
We have such support at build time. See #3889 . |
It seems to rely on the BTF hub and won't support self-built kernels or some old kernels which can't be found in the hub, eg: if (env.btf_path) {
LIBBPF_OPTS(bpf_object_open_opts, bpf_opts, .btf_custom_path = env.btf_path);
skel = xxx_bpf__open_opts(&bpf_opts);
} else {
skel = xxx_bpf__open();
} |
Instead of touching every tool, I'd suggest providing the BTF path through environment variable and teach ensure_core_btf() to recognize it. |
Thanks for explaining, I may try that. But I realize another problem with global values, only legacy codes are supported on old kernels like this. To support them, maybe we need some mechanisms to auto-generate legacy codes instead of global values? |
BTW, some tools such as softirqs seems not using |
Yes, |
Thanks, I want to try to teach some tools listed above to fall back to raw_tp or Kprobe, maybe start from |
No. |
Since |
We have a bunch of libbpf tools require features like
fentry
/tp_btf
which only available on kernel v5.5+.Running these tools on old kernels result in EINVAL. Instead of error out, we can fallback to kprobe.
Open this ticket to keep track of this process:
If you are interested, please feel free to pick it up.
The text was updated successfully, but these errors were encountered: