Honey Potion: An eBPF Backend for Elixir
The Extended Berkeley Packet Filter (eBPF) is a sandboxed virtual machine that runs on operating systems with kernel privileges. Currently, eBPF programs are either translated from a subset of C, called Restricted C, or from bindings available for languages such as Rust or Python. This paper describes Honey Potion, a compiler that compiles Elixir to eBPF binaries. Translation is challenging, for it must not only preserve semantics, but also satisfy the eBPF verifier, which requires proofs of in-bounds memory accesses and termination. The translator relies heavily on this last constraint---ensured termination---to implement different optimizations: constant propagation, type specialization and partial evaluation. Honey Potion is publicly available, and has been used in the development of many eBPF applications, such as packet routers, process monitors and event loggers. To the best of our knowledge, Honey Potion is the first translator of a functional programming language to eBPF.
Authors
- Vinícius Pacheco (ORCID: https://orcid.org/0000-0003-0117-7708)
- Marcos A. M. Vieira (ORCID: https://orcid.org/0000-0001-9152-4114)
- Rodrigo Ribeiro (ORCID: https://orcid.org/0000-0003-0131-5154)
- Fernando Magno Quintão Pereira (ORCID: https://orcid.org/0000-0002-0375-1657)
- Kael Soares Augusto
Institutions
- Universidade Federal de Ouro Preto (BR)
- Universidade Federal de Minas Gerais (BR)
Publication Details
- Published
- 2025-02-22
- DOI
- https://doi.org/10.1145/3696443.3708923
- Primary Topic
- Logic, programming, and type systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00