Repository navigation
Commit f76895d
committed
ebpftracer: report missing BPF tracing program types clearly
On kernels built without CONFIG_BPF_EVENTS (e.g. NVIDIA JetPack 5 / L4T
5.10 with CONFIG_KPROBES=n), BPF_PROG_TYPE_TRACEPOINT and
BPF_PROG_TYPE_KPROBE are compiled out and bpf(BPF_PROG_LOAD) fails with a
bare EINVAL. The agent then exits with
failed to load collection: program sched_process_exit: load program: invalid argument
where the program name is whichever program happened to load first, and
nothing points at the kernel configuration.
Probe TracePoint and Kprobe support with cilium/ebpf/features before
loading the collection and fail with an error naming the missing kernel
option. Only a conclusive ebpf.ErrNotSupported is reported; any other
probe result falls through to the real collection load so existing error
paths are unchanged.
Document the CONFIG_BPF_EVENTS requirement in the README.1 parent 0fa2ee7 commit f76895d
2 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
297 | 303 | | |
298 | 304 | | |
299 | 305 | | |
| |||
0 commit comments