eBPF Verifier Repair
Ripara i rifiuti del verificatore eBPF dal log di caricamento verboso grezzo, proof-first
Promosso
Cosa fa
Un repair workflow per programmi eBPF che il kernel verifier si rifiuta di load: it reads the verbose verifier log, maps the rejected instruction back to the value that lost the required proof, and makes the smallest source change that restores it without altering program semantics. Copre packet bounds, nullable pointers, uninitialized stack, reference lifetime, scalar range e pointer provenance across libbpf C, Rust/Aya, libbpf-rs e BCC. Si attiva su verifier errors, -EACCES load failures, BPFix diagnostics e CI load logs.
Rapporto di test
Testato contro il repo's own benchmark case packet_checked_wrong_base_001, reading only the buggy source and the verifier log. Without the skill the obvious repair is to widen the guard from data+14 to data+15, which silences the error and keeps the wrong-header read; the case README calls that out as the wrong answer and the bundled test would fail its 14-byte-frame check. Following the skill's raw-log-triage and Bounds rules produced the maintainer's fixed.bpf.c almost verbatim - typed ethhdr base, guard on the same pointer that is later used - and passed all three of the bench oracle's source predicates that the baseline failed 0-for-3. The bundled extract_verifier_failure.py also ran clean on a real 3.2KB log, slicing the libbpf preamble down to the actual PROG LOAD region. The bpfix binary itself is optional and never needed for this path, but the clone pulls about 200MB.
Testato il: 2026-07-30 · Claude Code 2.x (agent harness)
Installazione
git clone --depth 1 https://github.com/eunomia-bpf/bpfix.git mkdir -p ~/.claude/skills cd bpfix && cp -r skills/ebpf-verifier-repair ~/.claude/skills/ebpf-verifier-repair
Comandi e prompt di esempio
/ebpf-verifier-repairRipara i rifiuti del verificatore eBPF dal log di caricamento verboso grezzo, proof-first
Gli skill si attivano con richieste in linguaggio naturale, senza comandi da ricordare. Dopo l'installazione, prompt come questi lo attivano (in inglese):
My XDP program won't load, verifier says R1 offset is outside of the packetlibbpf gives -EACCES on prog load, here's the verbose verifier log, fix itAya program rejected with "Unreleased reference id=2", help me repair it