Offloading the Tedious Task of Writing eBPF Programs
eBPF offers a lightweight method to extend the Linux kernel without modifying the source code in existing modules. However, writing correct and efficient eBPF programs is hard due to its unique verifier constraints and cumbersome debugging processes specific to the kernel execution environment. To tackle such an obstacle, we present a system, SimpleBPF, aiming at offloading the tedious eBPF development task. Developers only need to express their intent in a high-level domain-specific language, while the underlying eBPF code generation is handled automatically. SimpleBPF integrates four key components: a concise DSL, an LLM-based generator, a semantic checker, and an LLM-based optimizer. We use few-shot prompting to build both the code generator and optimizer in SimpleBPF, and evaluate the system on programs written in a representative DSL. The preliminary evaluation result shows that SimpleBPF can generate valid eBPF programs that pass the kernel verifier and exhibit competitive runtime performance. We also outline future directions based on current findings.
Authors
- Ratul Mahajan (ORCID: https://orcid.org/0009-0005-8005-6948)
- Xiangfeng Zhu (ORCID: https://orcid.org/0009-0009-7557-2090)
- Bhavana Vannarth Shobhana (ORCID: https://orcid.org/0000-0001-9130-5501)
- Xiangyu Gao (ORCID: https://orcid.org/0000-0002-1038-6539)
- Arvind Krishnamurthy (ORCID: https://orcid.org/0000-0002-9505-9528)
- Yiwei Yang (ORCID: https://orcid.org/0000-0001-8011-5868)
Institutions
- University of California, Santa Cruz (US)
- University of Washington (US)
- Rutgers Sexual and Reproductive Health and Rights (NL)
Publication Details
- Published
- 2025-08-19
- DOI
- https://doi.org/10.1145/3748355.3748369
- Citations
- 1
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 3.25