Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to compile or run a BPF program that invokes task_struct in an environment without BTF support #283

Open
Pyrokine opened this issue Jul 31, 2024 · 1 comment

Comments

@Pyrokine
Copy link

My environment does not support BTF and CO-RE (cannot enable CONFIG_DEBUG_INFO_BTF), but I need task_struct to get some task info. What's the best way to implement the code?

libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was CONFIG_DEBUG_INFO_BTF enabled?
libbpf: failed to find valid kernel BTF
libbpf: Error loading vmlinux BTF: -3
libbpf: failed to load object 'bootstrap_bpf'
libbpf: failed to load BPF skeleton 'bootstrap_bpf': -3
Failed to load and verify BPF skeleton
@anakryiko
Copy link
Member

You'll have to use kernel headers, which I believe are packaged as a separate package on some distros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants