paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Spinner: Detecting Locking Violations in the eBPF Runtime

Spinner:检测 eBPF 运行时中的锁违规
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 3/10 · 该论文是纯静态分析/抽象解释工具,用于检测 eBPF 内核运行时的锁违规,虽属程序分析且工程落地强,但不涉及 ML/Agent 静态分析、LLM 辅助分析、浮点程序分析或贝叶斯程序分析,与用户当前核心研究方向(PL 与 AI 交叉)匹配度低。引用 0 inbox
Priya Govindasamy, Joseph Bursey, Hsin-Wei Hung, Ardalan Amiri Sani
crossref: 2026-09-12

AI 速览

一句话:提出静态分析工具 Spinner,检测 eBPF 运行时中因上下文混淆与嵌套程序递归调用导致的锁违规。

eBPF 允许在不修改源码或加载内核模块的情况下扩展内核能力,但其内核级运行环境使锁使用错误可能导致死锁、系统挂起等严重后果。本文提出 Spinner,一个针对 eBPF 运行时的锁违规静态检测工具。Spinner 检测两类问题:(1) 上下文混淆,即 eBPF helper 函数在特定执行上下文下使用了不正确的加锁原语;(2) helper 函数中的锁可能被嵌套 eBPF 程序递归调用。两者均可能引发死锁。在 Linux eBPF 子系统的评估中,Spinner 共发现 34 个锁违规 bug,其中仅 5 个曾被 Syzbot 发现,表明其能有效补充现有动态测试手段。

问题
eBPF 在内核中运行,其锁使用不当会导致死锁与系统挂起,但目前缺乏针对 eBPF 运行时锁违规的检测手段。
方法
Spinner 使用静态分析检测两类锁违规:执行上下文与加锁原语不匹配导致的上下文混淆,以及可被嵌套 eBPF 程序递归调用的 helper 函数中的锁。
评估
在 Linux eBPF 子系统中,Spinner 发现 34 个锁违规 bug,其中只有 5 个是 Syzbot 此前已发现的。
原文摘要(Abstract)

The eBPF technology is widely used for many applications, including tracing, packet filtering, network usage monitoring, and so on. The versatility of eBPF allows the kernel’s capabilities to be extended without needing to modify source code or load kernel modules. However, the eBPF subsystem may introduce new bugs that could lead to crashes, data loss, and other issues that can negatively impact system stability, reliability, availability, security, and overall performance. Specifically, locking violations, which occur when locks are not used correctly, can lead to problems like deadlocks and system hangs. Since eBPF operates at the kernel level, errors here have far-reaching consequences.To tackle this issue, we present Spinner, a tool for detecting locking violations in the eBPF runtime. Spinner uses static analysis to (1) detect cases of context confusion where incorrect locking primitives are used in eBPF helper functions given their execution context, and (2) identify locks in helper functions that can be called recursively using nested eBPF programs. Both of these situations could result in deadlocks. So far, Spinner has identified 34 locking violation bugs in the eBPF subsystem in Linux, only 5 of which were previously found by Syzbot.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9358,
  title = {Spinner: Detecting Locking Violations in the eBPF Runtime},
  author = {Priya Govindasamy and Joseph Bursey and Hsin-Wei Hung and Ardalan Amiri Sani},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00180}
}