Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sameehj/ebpf-mcp-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1 Commit

Repository files navigation

βœ… Good next steps β€” let’s:


πŸ“Š Analysis of the Current Results vs Project Needs

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.

πŸ” What the data shows:

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

βœ… Meets Needs?

  • You can now clearly recommend kernels 5.4, 6.1, and 6.8 for best compatibility.
  • You can use the collected .json data 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.

πŸ“ README Update: Usage Instructions

Here’s a draft README.md snippet you can drop in or append:


eBPF-MCP Docs: Multi-Kernel Analyzer

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.


πŸš€ Quickstart

πŸ“¦ Prerequisites

  • Python β‰₯3.8
  • Clang/LLVM (with BPF target)
  • bpftool
  • Git
  • A Linux host with /sys/fs/bpf mounted.

πŸ”„ Collect kernel sources & programs

Run the collector to clone the kernels and extract programs:

python3 -m pipeline.multi_kernel

This 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

Run the analyzer to evaluate program compatibility per kernel:

python3 -m analysis.enhanced_analyzer

This 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

πŸ“ˆ Output

  • data/kernel-<version>/programs/*.json: per-program metadata
  • data/detailed_compatibility_report.json: full report
  • data/compatibility_matrix.json: (optional) success matrix

πŸ’‘ Recommendations

  • Deploy on kernels: 5.4, 6.1, or 6.8 (best compatibility)
  • Avoid 4.18 and 5.15 for CO-RE/BTF programs

🧹 Cleanup

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! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /