Lune

EuroSys2022顶会

Verified programs can party: optimizing kernel extensions via post-verification merging

Hsuan-Chi Kuo, Kai-Hsun Chen, Yicheng Lu, Dan Williams, Sibin Mohan, Tianyin Xu

摘要

Operating system (OS) extensions are more popular than ever. For example, Linux BPF is marketed as a "superpower" that allows user programs to be downloaded into the kernel, verified to be safe and executed at kernel hook points. So, BPF extensions have high performance and are often placed at performance-critical paths for tracing and filtering.

However, although BPF extension programs execute in a shared kernel environment and are already individually verified, they are often executed independently in chains. We observe that the chain pattern has large performance overhead, due to indirect jumps penalized by security mitigations (e.g., Spectre), loops, and memory accesses.

In this paper, we argue for a separation of concerns. We propose to decouple the execution of BPF extensions from their verification requirements-BPF extension programs can be collectively optimized, after each BPF extension program is individually verified and loaded into the shared kernel.

We present KFuse, a framework that dynamically and automatically merges chains of BPF programs by transforming indirect jumps into direct jumps, unrolling loops, and saving memory accesses, without loss of security or flexibility. KFuse can merge BPF programs that are (1) installed by multiple principals, (2) maintained to be modular and

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • NetEdit: An Orchestration Platform for eBPF Network Functions at Scale 引用了 Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
  • Finding Correctness Bugs in eBPF Verifier with Structured and Sanitized Program 引用了 SANRAZOR: Reducing Redundant Sanitizer Checks in C/C++ Programs
  • Finding Correctness Bugs in eBPF Verifier with Structured and Sanitized Program 引用了 Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
  • Meltdown: Reading Kernel Memory from User Space 引用了 Spectre Attacks: Exploiting Speculative Execution
  • Revealing the Unstable Foundations of eBPF-Based Kernel Extensions 引用了 Merlin: Multi-tier Optimization of eBPF Code for Performance and Compactness
  • Revealing the Unstable Foundations of eBPF-Based Kernel Extensions 引用了 Finding Correctness Bugs in eBPF Verifier with Structured and Sanitized Program
  • Revealing the Unstable Foundations of eBPF-Based Kernel Extensions 引用了 Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel
  • Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernel 引用了 Spectre Attacks: Exploiting Speculative Execution
  • eNetSTL: Towards an In-kernel Library for High-Performance eBPF-based Network Functions 引用了 Merlin: Multi-tier Optimization of eBPF Code for Performance and Compactness
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper9

  1. Finding Correctness Bugs in eBPF Verifier with Structured and Sanitized ProgramHao Sun, Yiru Xu, Jianzhong Liu, Yuheng Shen 等EuroSys 2024 · 24 次引用
  2. Merlin: Multi-tier Optimization of eBPF Code for Performance and CompactnessJinsong Mao, Hailun Ding, Juan Zhai, Shiqing MaASPLOS 2024 · 15 次引用
  3. NetEdit: An Orchestration Platform for eBPF Network Functions at ScaleTheophilus A. Benson, Prashanth Kannan, Prankur Gupta, Balasubramanian Madhavan 等SIGCOMM 2024 · 11 次引用
  4. eNetSTL: Towards an In-kernel Library for High-Performance eBPF-based Network FunctionsBin Yang, Dian Shen, Junxue Zhang, Hanlin Yang 等EuroSys 2025 · 9 次引用
  5. Revealing the Unstable Foundations of eBPF-Based Kernel ExtensionsShawn Wanxiang Zhong, Jing Liu, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-DusseauEuroSys 2025 · 4 次引用

它引用的 Paper11

  1. Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
  2. Meltdown: Reading Kernel Memory from User SpaceMoritz Lipp, Michael Schwarz, Daniel Gruss, Thomas Prescher 等USENIX Security 2018 · 1,456 次引用
  3. Twine: A Unified Cluster Management System for Shared InfrastructureChunqiang Tang, Kenny Yu, Kaushik Veeraraghavan, Jonathan Kaldor 等OSDI 2020 · 107 次引用
  4. Specification and verification in the field: Applying formal methods to BPF just-in-time compilers in the Linux kernelLuke Nelson, Jacob Van Geffen, Emina Torlak, Xi WangOSDI 2020 · 72 次引用
  5. SANRAZOR: Reducing Redundant Sanitizer Checks in C/C++ ProgramsJiang Zhang, Shuai Wang, Manuel Rigger, Pinjia He 等OSDI 2021 · 38 次引用

相关 Paper

  1. Fast, Flexible, and Practical Kernel ExtensionsKumar Kartikeya Dwivedi, Rishabh R. Iyer, Sanidhya KashyapSOSP 2024 · 7 次引用
  2. Synthesizing safe and efficient kernel extensions for packet processingQiongwen Xu, Michael D. Wong, Tanvi Wagle, Srinivas Narayana 等SIGCOMM 2021 · 30 次引用
  3. VEP: A Two-stage Verification Toolchain for Full eBPF ProgrammabilityXiwei Wu, Yueyang Feng, Tianyi Huang, Xiaoyang Lu 等NSDI 2025 · 8 次引用
  4. Approximation Enforced Execution of Untrusted Linux Kernel ExtensionsHao Sun, Zhendong SuUSENIX Security 2025
  5. BeeBox: Hardening BPF against Transient Execution AttacksDi Jin, Alexander J. Gaidis, Vasileios P. KemerlisUSENIX Security 2024 · 10 次引用
黄昏的海面,两侧是细线勾勒的悬崖