HaveProgramType may need BTF but does not allow providing a `*btf.Cache`
Author: brycekahleCreated Sep 23, 2026Updated Sep 25, 2026
Labelsbug
Describe the bug
HaveProgramType type may require BTF in order to load certain program types. There is no way to provide a *btf.Cache to HaveProgramType, so it will always read and parse new kernel BTF.
This may affect other feature detection functions as well.
How to reproduce
features.HaveProgramType(ebpf.Tracing)
Version information
github.com/cilium/ebpf v0.22.1-0.20260708150823-a5b2e206f9ed
Source: cilium/ebpf