USENIX ATC2024顶会
An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise
Hongyu Li, Liwei Guo, Yexuan Yang, Shangguang Wang, Mengwei Xu
摘要
Developed for over 30 years, Linux has already become the computing foundation for today's digital world; from gigantic, complex mainframes (e.g., supercomputers) to cheap, wimpy embedded devices (e.g., IoTs), countless applications are built on top of it. Yet, such an infrastructure has been plagued by numerous memory and concurrency bugs since the day it was born, due to many rogue memory operations are permitted by C language. A recent project Rust-for-Linux (RFL) has the potential to address Linux's safety concerns once and for all -by embracing Rust's static ownership and type checkers into the kernel code, the kernel may finally be free from memory and concurrency bugs without hurting its performance.
While it has been gradually matured and even merged into Linux mainline, however, RFL is rarely studied and still remains unclear whether it has indeed reconciled the safety and performance dilemma for the kernel.
To this end, we conduct the first empirical study on RFL to understand its status quo and benefits, especially on how Rust fuses with Linux and whether the fusion assures driver safety without overhead. We collect and analyze 6 key RFL drivers, which involve hundreds of issues and PRs, thousands of Github commits and mail exchanges of the Linux mailing list, as well as over 12K discussions on Zulip. We have found while Rust mitigates kernel vulnerabilities, it is beyond Rust's capability to fully eliminate them; what is more, if not handled properly, its safety assurance even costs the developers dearly in terms of both runtime overhead and development efforts.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Evaluating and Improving Automated Repository-Level Rust Issue Resolution with LLM-based Agents 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- MirChecker: Detecting Bugs in Rust Programs via Static Analysis 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- Rudra: Finding Memory Safety Bugs in Rust at the Ecosystem Scale 引用了 RedLeaf: Isolation and Communication in a Safe Operating System
- Rudra: Finding Memory Safety Bugs in Rust at the Ecosystem Scale 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- Rudra: Finding Memory Safety Bugs in Rust at the Ecosystem Scale 引用了 How do programmers use unsafe rust?
- How do programmers use unsafe rust? 引用了 Understanding memory and thread safety practices and issues in real-world Rust programs
- ASTERINAS: A Linux ABI-Compatible, Rust-Based Framekernel OS with a Small and Sound TCB 引用了 RedLeaf: Isolation and Communication in a Safe Operating System
- ASTERINAS: A Linux ABI-Compatible, Rust-Based Framekernel OS with a Small and Sound TCB 引用了 How do programmers use unsafe rust?
引用它的顶会 Paper6
- ASTERINAS: A Linux ABI-Compatible, Rust-Based Framekernel OS with a Small and Sound TCBYuke Peng, Hongliang Tian, Junyang Zhang, Ruihan Li 等USENIX ATC 2025 · 16 次引用
- Finding Compiler Bugs through Cross-Language Code Generator and Differential TestingQiong Feng, Xiaotian Ma, Ziyuan Feng, Marat Akhin 等OOPSLA 2025 · 2 次引用
- Oxidizer: Toward Concise and High-fidelity Rust DecompilationYibo Liu, Zion Leonahenahe Basque, Arvind S. Raj, Chavin Udomwongsa 等S&P 2026 · 1 次引用
- Cpp2Rust: Automatic Translation of C++ to Safe RustLucian Popescu, Francisco Gouveia, Henrique Preto, João Silveira 等PLDI 2026 · 1 次引用
- Evaluating and Improving Automated Repository-Level Rust Issue Resolution with LLM-based AgentsJiahong Xiang, Wenxiao He, Xihua Wang, Hongliang Tian 等ICSE 2026
它引用的 Paper12
- Understanding memory and thread safety practices and issues in real-world Rust programsBoqin Qin, Yilun Chen, Zeming Yu, Linhai Song 等PLDI 2020 · 112 次引用
- RedLeaf: Isolation and Communication in a Safe Operating SystemVikram Narayanan, Tianjiao Huang, David Detweiler, Dan Appel 等OSDI 2020 · 86 次引用
- How do programmers use unsafe rust?Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller 等OOPSLA 2020 · 78 次引用
- MirChecker: Detecting Bugs in Rust Programs via Static AnalysisZhuohua Li, Jincheng Wang, Mingshen Sun, John C. S. LuiCCS 2021 · 63 次引用
- Rudra: Finding Memory Safety Bugs in Rust at the Ecosystem ScaleYechan Bae, Youngsuk Kim, Ammar Askar, Jungwon Lim 等SOSP 2021 · 61 次引用
相关 Paper
- Rust for Embedded Systems: Current State and Open ProblemsAyushi Sharma, Shashank Sharma, Sai Ritvik Tanksalkar, Santiago Torres-Arias 等CCS 2024 · 12 次引用
- Is rust used safely by software developers?Ana Nora Evans, Bradford Campbell, Mary Lou SoffaICSE 2020 · 57 次引用
- Translating C to safer RustMehmet Emre, Ryan Schroeder, Kyle Dewey, Ben HardekopfOOPSLA 2021 · 60 次引用
- Learning and Programming Challenges of Rust: A Mixed-Methods StudyShuofei Zhu, Ziyi Zhang, Boqin Qin, Aiping Xiong 等ICSE 2022 · 27 次引用
- "I wouldn't want my unsafe code to run my pacemaker": An Interview Study on the Use, Comprehension, and Perceived Risks of Unsafe RustSandra Höltervennhoff, Philip Klostermeyer, Noah Wöhler, Yasemin Acar 等USENIX Security 2023
