✅ Good next steps — let’s:
Your project goal (as I understood from earlier conversations) is:
To build a reliable, data-driven eBPF program compatibility matrix across multiple Linux kernels, identify which kernels are best suited for deployment, and detect potential verifier/feature incompatibilities for AI-assisted tooling.
| Kernel | Success Rate | Notes |
|---|---|---|
| 4.18 | ~23% | Expected: very old, no BTF/CO-RE support |
| 5.4 | 100% | Great stability, first LTS with BTF/CO-RE |
| 5.15 | ~6.9% | Known verifier regressions |
| 6.1 | 100% | Excellent: modern, LTS |
| 6.8 | 100% | Excellent: most recent |
- You can now clearly recommend kernels 5.4, 6.1, and 6.8 for best compatibility.
- You can use the collected
.jsondata as a knowledge base for AI agents to understand per-program issues and suggest fixes. - The analyzer’s ability to compile with correct kernel headers is crucial for realistic verification.
Here’s a draft README.md snippet you can drop in or append:
This project collects, analyzes, and reports compatibility of eBPF programs across multiple Linux kernel versions. It helps identify which kernels provide the best support for modern eBPF features like BTF and CO-RE.
- Python ≥3.8
- Clang/LLVM (with BPF target)
bpftool- Git
- A Linux host with
/sys/fs/bpfmounted.
Run the collector to clone the kernels and extract programs:
python3 -m pipeline.multi_kernelThis will:
✅ Clone Linux sources (only if missing)
✅ Extract samples/bpf/*.c from each supported kernel
✅ Parse and save JSON metadata into data/kernel-<version>/programs/*.json
Run the analyzer to evaluate program compatibility per kernel:
python3 -m analysis.enhanced_analyzerThis will:
✅ Read the programs/*.json
✅ Attempt recompilation using the matching kernel headers
✅ Check verifier logs and parse errors
✅ Produce:
- Detailed per-program JSON results
data/detailed_compatibility_report.json- Summary & recommendations printed to console
data/kernel-<version>/programs/*.json: per-program metadatadata/detailed_compatibility_report.json: full reportdata/compatibility_matrix.json: (optional) success matrix
- Deploy on kernels: 5.4, 6.1, or 6.8 (best compatibility)
- Avoid 4.18 and 5.15 for CO-RE/BTF programs
To remove downloaded sources and data:
rm -rf sources/ data/If you’d like I can also:
✅ Write a Makefile with make collect, make analyze, make clean
✅ Add a CLI wrapper script (bin/ebpf-mcp-analyze)
✅ Generate an HTML/CSV summary report for sharing
Just say the word! 🚀