Lune

SOSP2024Top-tier venue

Fast, Flexible, and Practical Kernel Extensions

Kumar Kartikeya Dwivedi, Rishabh R. Iyer, Sanidhya Kashyap

Abstract

The ability to safely extend OS kernel functionality is a longstanding goal in OS design, with the widespread use of the eBPF framework in Linux and Windows demonstrating the benefits of such extensibility. However, existing solutions for kernel extensibility (including eBPF) are limited and constrain users either in the extent of functionality that they can offload to the kernel or the performance overheads incurred by their extensions.

We present KFlex: a new approach to kernel extensibility that strikes an improved balance between the expressivity and performance of kernel extensions. To do so, KFlex separates the safety of kernel-owned resources (e.g., kernel memory) from the safety of extension-specific resources (e.g., extension memory). This separation enables KFlex to use distinct, bespoke mechanisms to enforce each safety property-automated verification and lightweight runtime checks, respectively-which enables the offload of diverse functionality while incurring low runtime overheads.

We realize KFlex in the context of Linux. We demonstrate that KFlex enables users to offload functionality that cannot be offloaded today and provides significant end-to-end performance benefits for applications. Several of KFlex's proposed mechanisms have been upstreamed into the Linux kernel mainline, with efforts ongoing for full integration.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

10 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • DINT: Fast In-Kernel Distributed Transactions with eBPF cites BMC: Accelerating Memcached using Safe In-kernel Caching and Pre-stack Processing
  • DINT: Fast In-Kernel Distributed Transactions with eBPF cites Electrode: Accelerating Distributed Protocols with eBPF
  • SoK: Challenges and Paths Toward Memory Safety for eBPF cites BMC: Accelerating Memcached using Safe In-kernel Caching and Pre-stack Processing
  • Electrode: Accelerating Distributed Protocols with eBPF cites BMC: Accelerating Memcached using Safe In-kernel Caching and Pre-stack Processing
  • eTran: Extensible Kernel Transport with eBPF cites DINT: Fast In-Kernel Distributed Transactions with eBPF
  • eTran: Extensible Kernel Transport with eBPF cites BMC: Accelerating Memcached using Safe In-kernel Caching and Pre-stack Processing
  • eTran: Extensible Kernel Transport with eBPF cites Electrode: Accelerating Distributed Protocols with eBPF
  • Revealing the Unstable Foundations of eBPF-Based Kernel Extensions cites DINT: Fast In-Kernel Distributed Transactions with eBPF
  • Revealing the Unstable Foundations of eBPF-Based Kernel Extensions cites BMC: Accelerating Memcached using Safe In-kernel Caching and Pre-stack Processing
  • Revealing the Unstable Foundations of eBPF-Based Kernel Extensions cites Electrode: Accelerating Distributed Protocols with eBPF
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers10

  1. eTran: Extensible Kernel Transport with eBPFZhongjie Chen, Qingkai Meng, ChonLam Lao, Yifan Liu et al.NSDI 2025 · 17 citations
  2. VEP: A Two-stage Verification Toolchain for Full eBPF ProgrammabilityXiwei Wu, Yueyang Feng, Tianyi Huang, Xiaoyang Lu et al.NSDI 2025 · 8 citations
  3. Extending Applications Safely and EfficientlyYusheng Zheng, Tong Yu, Yiwei Yang, Yanpeng Hu et al.OSDI 2025 · 7 citations
  4. Revealing the Unstable Foundations of eBPF-Based Kernel ExtensionsShawn Wanxiang Zhong, Jing Liu, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-DusseauEuroSys 2025 · 4 citations
  5. SoK: Challenges and Paths Toward Memory Safety for eBPFKaiming Huang, Mathias Payer, Zhiyun Qian, Jack Sampson et al.S&P 2025

Builds on10

  1. A large scale analysis of hundreds of in-memory cache clusters at TwitterJuncheng Yang, Yao Yue, K. V. RashmiOSDI 2020 · 245 citations
  2. BMC: Accelerating Memcached using Safe In-kernel Caching and Pre-stack ProcessingYoann Ghigoff, Julien Sopena, Kahina Lazri, Antoine Blin et al.NSDI 2021 · 79 citations
  3. Electrode: Accelerating Distributed Protocols with eBPFYang Zhou, Zezhou Wang, Sowmya Dharanipragada, Minlan YuNSDI 2023 · 78 citations
  4. DINT: Fast In-Kernel Distributed Transactions with eBPFYang Zhou, Xingyu Xiang, Matthew Kiley, Sowmya Dharanipragada et al.NSDI 2024 · 40 citations
  5. High Velocity Kernel File Systems with BentoSamantha Miller, Kaiyuan Zhang, Mengqi Chen, Ryan Jennings et al.FAST 2021 · 28 citations

Related papers

  1. Prove It to the Kernel: Precise Extension Analysis via Proof-Guided Abstraction RefinementHao Sun, Zhendong SuSOSP 2025
  2. Verified programs can party: optimizing kernel extensions via post-verification mergingHsuan-Chi Kuo, Kai-Hsun Chen, Yicheng Lu, Dan Williams et al.EuroSys 2022 · 17 citations
  3. Rex: Closing the language-verifier gap with safe and usable kernel extensionsJinghao Jia, Ruowen Qin, Milo Craun, Egor Lukiyanov et al.USENIX ATC 2025 · 11 citations
  4. Approximation Enforced Execution of Untrusted Linux Kernel ExtensionsHao Sun, Zhendong SuUSENIX Security 2025
  5. FlexOS: towards flexible OS isolationHugo Lefeuvre, Vlad-Andrei Badoiu, Alexander Jung, Stefan Lucian Teodorescu et al.ASPLOS 2022 · 36 citations
Dusk over the sea between two cliffs drawn in fine vertical lines