paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Formalizing the Linux eBPF Core ISA: A Mechanized Operational Semantics and Its Real-World Applications

形式化 Linux eBPF 核心 ISA:机器化操作语义及其真实世界应用
OOPSLA 10(OOPSLA2)2026匹配度 5/10 · 论文是形式化语义与静态分析(eBPF 验证器抽象域可靠性)在工业系统上的扎实工作,兼具理论形式化与落地,符合对理论+工程、工业案例的偏好;但其核心不涉及 LLM/Agent 与 PL 的交叉,也不涉及浮点程序分析或贝叶斯程序分析,与当前追踪问题仅有间接关系。引用 0 inbox
Shenghao Yuan, Yazhou Tang, Tianci Cao, Frédéric Besson, Jean-Pierre Talpin, Mingshuai Chen
crossref: 2026-10-02

AI 速览

一句话:在 Rocq 中形式化 eBPF 核心 ISA 的全部 153 条指令,并据此验证 eBPF 验证器抽象域的可靠性、发现内核缺陷。

本文为 Linux eBPF 指令集架构(ISA)建立了机器化的形式语义。作者在 Rocq 中以小步语义刻画了全部 153 条内核顺序指令,该语义完全可执行,并用 Linux 官方 eBPF 测试套件加以验证;这一大规模测试暴露出原始形式化中的不一致之处。基于该语义,作者设计、实现并证明了 Linux eBPF 验证器所采用的位级抽象域(bit-level abstract domain)的可靠性。该工作还为现有 eBPF 文档提供了严格的形式规约补充。在形式化过程中,作者发现了内核实现中此前未知的缺陷,并提出新的验证器优化,相应的内核补丁已被上游合并。

问题
Linux eBPF 指令集缺乏严格的机器化形式语义,其内核验证器所使用的位级抽象域也缺少可靠性保证。
方法
在 Rocq 中定义覆盖全部 153 条顺序指令的可执行小步操作语义,用官方测试套件检验语义与实现的一致性,并基于该语义形式化与证明验证器抽象域的可靠性。
评估
以 Linux 官方 eBPF 测试套件验证语义的正确性,并通过被上游合并的内核补丁确认所发现的实现缺陷与新增的验证器优化。
原文摘要(Abstract)

This paper presents a mechanized formal semantics for the Linux eBPF instruction set architecture (ISA). We develop a small-step semantics in Rocq that faithfully formalizes all 153 sequential in-kernel instructions of the eBPF ISA. The semantics is fully executable and has been validated against the official Linux eBPF test suite. This extensive testing revealed inconsistencies in our original formalization. Using this semantics, we have designed, implemented, and verified the soundness of the bit-level abstract domain employed by the Linux eBPF verifier. Our semantics also complements the existing Linux eBPF documentation by providing a rigorous formal specification. During the formalization process, we have discovered previously unknown bugs in the Linux eBPF implementation, and developed new verifier optimizations; the corresponding kernel patches have been upstreamed.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot12074,
  title = {Formalizing the Linux eBPF Core ISA: A Mechanized Operational Semantics and Its Real-World Applications},
  author = {Shenghao Yuan and Yazhou Tang and Tianci Cao and Frédéric Besson and Jean-Pierre Talpin and Mingshuai Chen},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839449}
}