• Donate
  • Log In
Home
  • About
    • About
      • About Us
      • Our Board of Directors
      • Board Meeting Minutes
      • Board Elections
      • Updates & Announcements
      • Our Staff
      • Governance & Financials
      • Lifetime Achievement Award
  • Events
    • Events
      • Upcoming
      • Past
      • Conference FAQ
      • Conference Policies
      • Code of Conduct
      • Calls for Papers
      • Author Resources
      • Grant Opportunities
      • Best Papers
      • Test of Time Awards
  • Join & Support
    • Join & Support
      • Become a Member
      • Ways to Give
      • Our Supporters
      • Student Opportunities
      • Sponsorship Opportunities
  • Archive
    • Archive
      • Proceedings
      • Multimedia
      • ;login: Archive
      • Short Topics in System Administration Series
      • Journal of Education in System Administration (JESA)
      • Journal of Election Technology and Systems (JETS)
      • Computing Systems Journal
  • Search
Join the conversation
Back to ;login: Online

An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise

July 1, 2024
Research
Authors: 
Hongyu Li, Liwei Guo, Yexuan Yang, Shangguang Wang, Mengwei Xu
Article shepherded by: 
Rik Farrow

Linux is the de facto foundation for today’s computing infrastructure, and Linux developers have never eliminated memory and concurrency bugs [35, 39, 49, 56], which have been plaguing systems software for years. Bugs keep emerging [9, 16, 17, 18] despite years of security hardening and engineering efforts from the Linux community [1, 12]. Rust seems to be a promising solution, which may finally resolve the aforementioned problems [8]. As an emerging, statically and strongly-typed systems programming language, Rust claims to deliver both safety and performance without runtime overhead [34]. Backing its claim is the ownership mechanism [31] for eliminating memory and concurrency bugs. Rust eliminates a heavyweight and costly memory checker [51, 55] as well as a garbage collector [48, 52], eschewing being interrupted and having unpredictable delays at run time.

These intriguing properties of Rust led to the advent of Rust-For-Linux (RFL), which began in 2013 as a hobbyist project [2]. As the first attempt to bring Rust into Linux, the project built a Rust object file against kernel headers and invoked one Rust function from the file in a loadable kernel module. In 2019, a proposal to write kernel modules fully in Rust emerged [4, 6] to lead Rust further into Linux. To achieve this goal, the proposal took a bold move by directly adding a thin Rust wrapping layer to kernel interfaces and data structures in upstream Linux. Only a year after the RFC, RFL was officially merged into upstream Linux v6.1 as an experimental kernel feature [13]. As RFL gradually improved in the journey of building a more robust Linux, there emerged numerous attempts to use RFL to write drivers in various areas, such as network [40], block device [45, 46], file system [20, 22], android [38], and GPU [44]. Among them, one network driver [24] first made it into the Linux mainline in v6.8 after 11 rounds’ co-review by the RFL and network community. This means RFL can receive feedback from users, which is a sign of RFL stepping into the real use cases from the experimental states. Despite still being in an early stage, RFL has become one of the most active kernel subsystems [30], on par with ebpf [41], and io_uring [43].

This article takes the first in-depth look into RFL and how a new programming language blends into a giant, old-school codebase which has been already shipped on billions of computing devices. We report our findings on two key research questions (RQs). First, what is the status quo of RFL? Second, does RFL live up to the hype?

For full details, please refer to our USENIX ATC’24 paper [58].

RQ1: What is the status quo of RFL
RFL development status

(1) Development progress. We first analyze the development progress of RFL. Overall, RFL is still at a very early stage in blending with the Linux kernel: in terms of LoC, the merged code (7.1%) only constitutes 0.125% of the kernel code, while the rest (92.9%) is still pending review or is staged for merging. We further break down the merged code by their respective kernel subsystems to understand individual status and show the results in Figure 1.

Figure 1: The progress of wrapping APIs.

Insight 1: drivers, netdev, and file systems are the long tail of RFL code.

We have observed a clear long tail: most Rust code resides in scheduling, memory management, and IRQ infrastructure. By contrast, drivers, file systems, netdev, and security subsystems which account for most kernel code (i.e., 78% in Linux v6.2) only have received little RFL code, constituting the “tail”. The results are sensible. As scheduling, memory management, and IRQ subsystems are most commonly used by all drivers, optimizing RFL development for them has a high value and priority. In comparison, drivers and file systems have more specific use cases (e.g., for a particular model of a device), which require more programming and reviewing effort. For instance, reviewers from netdev communities spent 6 months on 11 versions of draft patches, before settling one the final merged network PHY driver [29].

(2) Patch distribution. To study how individual RFL components develop, we categorize the code into three types depending on their use cases, i.e. for building safe abstraction, the Kbuild system, and the Rust compiler. We show the results in Figure 2 and conclude the following insight:

Figure 2: RFL patch distribution over time. Rust, Kbuild, abstraction are patches for modifying Rust compiler, constructing KBuild system, and the safe abstraction, respectively.

Insight 2: RFL infrastructure has matured, with safe abstraction and drivers being the next focus.

We base the insight on two key pieces of evidence: 1) as time passes, Kbuild undergoes a clear recession in its portion of the RFL cake, indicating the foundation of RFL has been laid; 2) in the meantime, abstraction takes up more portion, e.g., from 20% to 60% in 18 months. Interestingly, a surge in the number of Rust commits appeared half a year after RFL started, as seen by the 23/4 timestamp of Figure 2. It belongs to a patch that directly modifies the RFL lib code for supporting a safe implementation of the Rust initializer for pinned objects; prior to the fix, early RFL has been using an unsafe initializer in gpio_pl061 and bcm2835_rng drivers.

(3) The trend. To understand how RFL development progresses with time, we project the commits and the email exchanges onto the timeline and highlight the reviewing time length of the PRs, as shown in Figure 3.

Figure 3: The trend of RFL commits and reviews over time.

Insight 3: RFL is bottlenecked by code review but not by code development.

From the slope changes in the lefthand graph of Figure 3, we are witnessing the committed/staged RFL code start to plateau after the initial steep slope when RFL first started. Yet, the number of email exchanges shows RFL is an increasingly active community. Besides, the PR reviewing becomes significantly slower as time goes by, e.g., the PRs between Jan. 2023 and Jul. 2023 take 280 hours to be reviewed on average, which is 200× as long as 3 years ago. This suggests the speed of producing RFL code is much faster than that of consumption, i.e., reviewing and eventually merging RFL code into the upstream kernel. This can also be confirmed by the huge imbalance between merged code versus the rest of the code, where the latter is 13× larger than the former and represents a huge bulk of the area.

An inspiring observation is that RFL is gradually being embraced by the kernel community, seeing the increasing engagement of traditional kernel developers. For example, the recently developed NVME, NULL block, V4L2, and e1000 drivers using RFL are all driven by the Linux community.

Rustify Linux with safe abstraction

Safe abstraction is the key ingredient towards rustifying Linux kernel and among the largest portions of RFL code. As the name itself implies, the layer extends C kernel features safely into Rust drivers: it abstracts kernel data structures and interfaces, so that upon invocation they may still ensure memory and thread safety.

Converting kernel data structures RFL leverages bindgen to automatically generate Rust bindings of C kernel struct prior to use. The generation is rule-based and syntax-directed, which translates the C types and symbols into their Rust counterparts. The translation is mechanical, following the rules in Table 1. For instance, uint32_t of C translates into c_uint in Rust namespace core::ffi, which aliases to the Rust primitive u32. However, not every C type translates into a corresponding Rust primitive. We have found such incompatibility exists especially in language features which kernel developers exploit for manually consolidating memory layout. We detail them as follows.

(1) Emulated bitfields and unions. The kernel extensively uses bitfields and unions for improving memory efficiency, e.g., the e1000 driver uses a single word to store 4 flags to indicate link states. Bit operations on struct members contradict Rust memory safety principle and hence do not have native Rust support. As a workaround, RFL emulates bitfields with a byte array, which implements bit operations as accessors to the array. Although Rust has a union primitive, it cannot provide ABI compatibility with C union. Thus RFL implements a struct called __BindgenUnionField with the same memory layout as the C interface. Both workarounds are based on the transmute operation, which reinterprets memory at run time, hence are implemented in unsafe blocks. The major overhead of the emulation code is the increase of binary size, which we will discuss in the "Does Rust incur any overhead?" section.

(2) Incomplete attribute support. The kernel often relies on packed and aligned attributes for better locality and memory efficiency, e.g., task_struct groups most frequently access scheduling data in one cache line. Despite the attributes that are supported by Rust repr(C), Rust may still mishandle them and cause bindgen to generate the wrong code [3, 5]. For attributes less commonly used, RFL does not support them, e.g., BTF tags [14]. Notably, RFL ignores the randomize_layout attribute, which kernel utilizes to mitigate memory bugs [37]. This is reasonable because Rust has already mitigated such vulnerabilities through ownership and boundary checks.

Despite the generated bindings having the identical data layout as their C counterpart, the safe abstraction layer still cannot directly expose them to drivers. This is because the bindings involve numerous raw pointers (i.e., *mut), which are prevalent in the kernel but are unsafe to use in Rust. To safely use them, Rust needs to manually reason about the pointer validity (i.e., not via borrow checker at compile time) and specify their ownership. To this end, RFL uses helper types to embed generated kernel data structure bindings and bakes Rust flavors into them.

Insight 4: The kernel’s initiative to control memory in fine granularity conflicts Rust philosophy, which incurs overhead for RFL.

Type C Rust
Primitive types foo core::ffi:c_foo
Typed pointers foo * *mut foo
Attributes aligned #repr(c)(with caveats [3, 5])
unused ignored
weak ignored
randomize_layout ignored
Function pointer fn option<fn>
Table 1: The translation rules from C to Rust in the rust-bindgen.
Incorporating kernel functions 

Following similar translation rules in converting the kernel data structures (Table 1), RFL generates FFI bindings of kernel functions. Then, RFL extensively leverages Rust traits to massage Rust features into them in the safe abstraction layer. We summarize three major measures.

(1) Functions as members of structs. RFL groups kernel functions related to a type and incorporates them as members of the type struct, following an OOP paradigm. For instance, it groups work queue related functions such as queue_work_on, __INIT_WORK_WITH_KEY under Rust struct Queue, the RFL helper type for kernel struct workqueue_struct. Doing so improves code readability and ensures the caller of these functions is never null, avoiding pointer validity checks inside the function body.

(2) Functions pointers as traits. Many kernel functions are dangling and used only as callbacks of kernel structs at run time. RFL incorporates them as traits of the helper type and specify bounds on them. The trait bounds specify the callback types and owner struct for the dangling kernel functions, preventing vulnerabilities caused by incorrect type casting [10].

(3) Wrapping inlined functions and macros. Inlined functions and macros provide important and handy utilities to kernel drivers, e.g., for_each_online_cpu to enumerate available CPUs. RFL wraps static inline functions with non-inlined Rust functions. This is because current Rust lacks a convenient mechanism for inlining Foreign Function Interfaces (FFIs) of C functions; while it is still possible to inline them, it takes lots of efforts and hence is not encouraged by the community [27]. For function-like macros, RFL prefers wrapping them with helper functions instead of rewriting them with Rust macros. The main reason is RFL inclines not to maintain two sets of kernel interfaces known to be unstable [50].

Insight 5: RFL uses helper types to delegate management of kernel data to Rust while leaving the operation to the kernel itself.

RQ2: Does RFL live up to the hype?
RFL makes Linux more “securable”

We first collect all bug reports and safety-related code reviews among the RFL abstractions and drivers. In total, we have found 25 bugs from merged and staged RFL code. Among them, 15 of them are in the Linux mainline and 10 of them are in the stage Rust branch. We list them in Table 2. Of the bugs within merged code, 11 are compilation bugs and the other 4 are related to safe abstraction. The compilation bugs do not introduce safety vulnerabilities; they are mostly caused by the misconfig of the kernel, incompatibility of various Clang toolchain versions and the mismatch between the Kbuild and rustc compiler [11]. Of the soundness bugs, 6 are in the safe abstraction layer and break memory safety and 3 break thread safety.

RFL safety hinges on the safety assurance of Rust language, which concretely relies on the elimination of all unsafe blocks in drivers and the safe abstraction APIs. Therefore, they are the entry point to RFL safety vulnerabilities, if any. We examine all existing RFL drivers and Rust kernel crates in the upstream repo [15] and analyze the usage of unsafe code blocks. We have not found any unsafe usage of RFL drivers in the Linux mainline, because no serious driver has made into the mainline except for one with around 130 lines of code [33]. However, we have found unsafe cases in the drivers that are proposed to the RFL mailing list. We show the results in Table 3.

Source Compilation bug Soundness bug
GitHub [15] 4(1/3) 7(3/4)
Intel LKP [26] 8(6/2) 0
Mailing List [28] 4(4/0) 2(1/1)
Table 2: The bugs we have found in RFL. (x/y): x and y stands for number of bugs from merged and staged code respectively. We have not found bugs from Syzbot [25] and KernelCI [23].
Driver Number of Unsafe usage
Driver logic Safety abstractions
GPU [44] 107 7
NVME [46] 44 16
Null block [45] 0 0
E1000 [40] 4 2
Binder [38] 45 9
Gpio_pl061 [42] 0 3
Semaphore [37] 0 4
Table 3: The unsafe usage in RFL drivers. The second and third columns show the number of unsafe usage due to 1) Driver logic is too complex for Rust safety rules, and 2) Safety abstractions are currently missing in RFL, respectively.

Post analysis We audit the bug reports and unsafe code to summarize our findings on RFL safety as follows.

Our verdict is reminiscent of that of the Multics security audit [54] and is based on the following facts.

(1) Rust safety mechanism constructs the pillar of kernel safety. The language-level support helps kernel drivers fix existing bugs and eschew potential memory/concurrency bugs. As a modern language with rich type specifiers, it facilitates more canonical safety checkers such as klint [19], and RustBelt [53] to further harden the kernel. Compared with C, RFL greatly reduces the vast attack space of kernel software caused by memory bugs. As a result, the developer has much less to reason about in terms of kernel security.

(2) unsafe is inevitable, though vulnerabilities are optional. In our audit, we have found unsafe code exist commonly in all major drivers and it is hard, if not impossible, to fully eliminate them. The reason is twofold. First, as the kernel asserts full control over memory and hardware, its operations need to bypass Rust ownership checks. For instance, kernel developers exploit inline assembly for managing TLB and issuing memory barrier [44], raw pointers for de-referencing MMIO registers, and unions/bitfields. Second, the community sometimes has to compromise on unsafe functions. This is because ownership sometimes introduces twisted implementation, which often requires long reviewing cycles. A notable example we have found is a memory initialization interface pin-init. After rounds of debates by seasoned developers [7, 36], has the interface been finally fixed in a recent patch [32].

(3) Bugs do not disappear; they only hide deeper. On the one hand, kernel functions invoked by the safe abstraction and Rust drivers may still contain bugs and be exploited. On the other hand, although Rust compile-time borrow checker detects memory bugs on the spot, it does not detect semantic bugs, which are often caused by subtle differences in Rust and kernel memory allocation methods. Such bugs may take a long to fix and can only be detected by experts who are familiar with both Rust and kernel. For example, the C binder driver has a use-after-free [21] bug. When being re-implemented in Rust, it will not cause the same symptom as in C. Instead, it incurs a mapping bug putting the memory into the wrong place which passes all the checks by the Rust compiler.

Insight 6: with RFL, Linux becomes more “securable” but still cannot be fully secure.

Does rust incur any overhead?

Setup We collect 4 drivers with serious use cases, which span diverse IO functions (e.g., network, storage). Notably, NVME and binder are considered the first batch of drivers to be merged in the Linux mainline. In addition, we include 2 more toy drivers (i.e., gpio and sem) from RFL Rust branch which are often used to explore the difference between Rust and C implementation. Among the 6 drivers tested, only binder and the 2 toy example drivers have faithfully implemented full features as C drivers do; while the rest of them have only implemented a subset of the features.

Binary size As illustrated in Figure 4, Rust drivers with fully implemented features are significantly larger than C: Since the text section is to be blamed for most of the increased binary size, we looked into it further and find that Rust generates extra code (99%) to support its unique features that C does not have: generic programming, boundary checks, lifecycle management, etc. Even for the gpio driver which simply wraps around five kernel APIs (i.e., probe, mask/unmask, irq_type, suspend and resume), Rust expands its size by 33%.

Figure 4: Comparison of Rust and C driver size. * indicates that the Rust driver has not implemented as full features as the C version.

Performance Mostly, Rust drivers show on par performance with C drivers within a 20% gap. Occasionally, Rust underperforms C significantly; in a few cases, Rust surprisingly outperforms C. Looking into individual drivers, we have found:

  1. For e1000, Rust driver is 11× slower than C driver for ping latency as presented in Figure 5. The reason we dug out is that the Rust driver has not yet implemented as many features that can accelerate data transmission as the C driver does, e.g., prefetch.
  2. For binder, the Rust driver shows similar performance with C, with only a 10% gap in ping latency.
  3. For storage devices (NVME and NULL block), Rust drivers lead to overall similar performance with C, with up to 61% degradation and 67% improvement in throughput, depending on the specific settings (e.g., job number and batch sizes) as shown in Figure 6 and Figure 7. We observe that Rust drivers favor smaller job numbers and blocksize, possibly because Rust often has smaller structs (reasons explained later) which are more likely to fit in the cache line.
Figure 5: The latencies between Rust and C drivers. Rust e1000 driver is significantly slower because it lacks advanced features such as prefetch.
Figure 6: The performance comparison of NULL block drivers. Green cell indicates the Rust driver performs better than the C driver in the configuration. Red means the Rust driver under-performs the C driver.
Figure 7: The performance comparison of NVME driver.
Why Rust drivers may perform poorly
  1. Locks in Rust drivers are coarse-grained. Despite Rust off-loading the duty of ensuring thread-safety to the language itself (i.e., via rules), it does not lift the burden of high-performance concurrency programming of a developer.
  2. Rust runtime checks in accessing arrays (e.g., boundary checks) introduce extra performance costs. The results are consistent with the prior study which reports Rust program overhead can be 2.49× larger than C program [57]. Rust performs poorly in memory-intensive workloads.
  3. Rust uses the emulated bit fields. As introduced earlier in "Rustify Linux with safe abstraction", bit field accesses are emulated via array accesses. It further gets exacerbated by the runtime boundary checks.
  4. Rust massively use pointers to share the ownership of objects, which results in a higher cache/TLB/branch miss rate.
Why Rust drivers may perform better
  1. The Rust struct has a smaller size compared with the C due to the usage of smart pointers instead of allocating item memory inside the struct. We use pahole to identify that Rust structs use fewer cache lines than their C counterpart.
  2. The Rust driver does not implement full features compared with C, thus some code paths may be omitted.

Insight 7: There is no free lunch for performance – it is the programmer that counts!

Conclusions

In this article, we thoroughly investigate RFL, the very first and increasingly popular project that aims to use Rust to enhance the Linux kernel. We first study the status quo of RFL by diving into the construction of the safe abstraction layer and Rust drivers, which reveals the tension between the language features of Rust and kernel programming. We then look into whether and to what extent RFL has delivered its promise in building a safer kernel with zero overhead. The results show RFL brings better safety but still has leaks which are stealthier and undetectable by the compiler, and that the overhead brought by the tension between Rust and Linux can not be totally erased. Last, we summarize key lessons learned in this study, hoping it may guide future development of RFL.

Appendix
References: 

[1] The static code analysis tool Coverity scan results for Linux. https://scan.coverity.com/projects/linux, 2006. 

[2] A minimal Linux kernel module written in Rust. https://github.com/tsgates/rust.ko, 2013. 

[3] Bindgen does not handle packed and aligned right. https://github.com/rust-lang/rust-bindgen/issues/1538, 2019. 

[4] Why write Linux Kernel Modules in Safe Rust. https://www.youtube.com/watch?v=RyY01fRyGhM, 2019. 

[5] Bindgen mishandles aligned typedefs. https://github.com/rust-lang/rust-bindgen/issues/1753, 2020. 

[6] Linux kernel modules in safe Rust. https://github.com/fishinabarrel/linux-kernel-module-rust, 2021. 

[7] The issue of ”Safe initialization of pinned structs” in github. https://github.com/Rust-for-Linux/linux/issues/290, 2021. 

[8] The RFC in the maillist for Rust support. https://lore.kernel.org/rust-for-linux/20210414184604.23473-1-ojeda@kern..., 2021. 

[9] A Linux CVE caused by data race. https://www.cvedetails.com/cve/CVE-2022-3566/, 2022. 

[10] A Linux CVE caused by incorrect type casting. https://www.cvedetails.com/cve/CVE-2018-5861, 2022. 

[11] A RFL bug due to the misconfig of Kbuild. https://github.com/Rust-for-Linux/linux/issues/735, 2022. 

[12] KMSAN is a dynamic error detector aimed at finding uses of uninitialized values. https://docs.kernel.org/dev-tools/kmsan.html, 2022. 

[13] Linux merges Rust into the mainline. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commi..., 2022. 

[14] RFL discards BTF TYPE TAG attribute. https://github.com/rust-lang/rust-bindgen/issues/2244, 2022. 

[15] The Rust-for-Linux project helping write drivers in Linux. https://github.com/Rust-for-Linux/linux/, 2022. 

[16] A Linux CVE caused by oob bugs. https://www.cvedetails.com/cve/CVE-2023-38429/, 2023. 

[17] A Linux CVE caused by use-after-free. https://www.cvedetails.com/cve/CVE-2023-33288/, 2023. 

[18] A Linux CVE caused by usedouble free. https://www.cvedetails.com/cve/CVE-2023-28464/, 2023. 

[19] Lints for kernel or embedded system development. https://github.com/Rust-for-Linux/klint, 2023. 

[20] PuzzleFS buiild on the top of vfs abstractions in RFL. https://lore.kernel.org/rust-for-linux/20230609063118.24852-1-amiculas@c..., 2023. 

[21] Rewriting drivers in RFL can still have bugs. https://lwn.net/Articles/953116/, 2023. 

[22] Tarfs build on the top of vfs abstractions in RFL. https://github.com/Rust-for-Linux/linux/pull/1037, 2023.

[23] The community-based distributed test automation system KernelCI. https://foundation.kernelci.org/, 2023. 

[24] The first rust driver merged into in the Linux mainline. https://lore.kernel.org/rust-for-linux/20231213004211.1625780-1-fujita.t..., 2023. 

[25] The google Syzbot kernel fuzzer project. https://syzkaller.appspot.com/upstream, 2023. 

[26] The intel Linux Kernel Performance(LKP) project. https://www.intel.com/content/www/us/en/developer/topic-technology/open/..., 2023. 

[27] The LTO optimization for Rust kernel modules. https://kangrejos.com/2023/Inlining%20and%20LTO%20for%20Rust%20Kernel%20...

[28] The mailing list of Rust-for-Linux project. https://lore.kernel.org/rust-for-linux/, 2023. 

[29] The network PHY driver abstraction is merged. https://lore.kernel.org/rust-for-linux/170263322444.1975.172349296093680..., 2023. 

[30] The official statistics about the RFL community size. https://kangrejos.com/2023/, 2023. 

[31] The ownership mechanism of the Rust. https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html, 2023. 

[32] The patch of pin-init API. https://github.com/Rust-for-Linux/linux/commit/90e53c5e70a69159ec255fec3..., 2023. 

[33] The Rust implementation of drivers/net/phy/ax88796b.c. https://lore.kernel.org/rust-for-linux/20231213004211.1625780-5-fujita.t..., 2023. 

[34] The Rust Programming Language. https://www.rust-lang.org/, 2023. 

[35] Kernel Self Protection Project. https://kernsec.org/wiki/index.php/Kernel Self Protection Project, 2024. 

[36] The 7 pin-init patches proposed in Github. https://lore.kernel.org/all/?q=Rust+pin-init+API+for+pinned+initializati....

[37] The Address space layout randomization wiki. https://en.wikipedia.org/wiki/Address space layout randomization, 2024.

[38] The Android binder driver in Rust. https://github.com/Darksonn/linux, 2024. 

[39] The documentation about how Linux handles bugs. https://docs.kernel.org/process/index.html#dealing-with-bugs, 2024. 

[40] The e1000 NIC driver in Rust. https://github.com/fujita/rust-e1000, 2024. 

[41] The ebpf project. https://ebpf.io/, 2024. 

[42] The gpio driver written in Rust. https://github.com/Rust-for-Linux/linux/blob/rust/drivers/gpio/gpio pl061 rust.rs, 2024. 

[43] The io uring project. https://github.com/axboe/liburing, 2024. 

[44] The Mac GPU driver in Rust. https://github.com/AsahiLinux/linux/tree/gpu/rust-wip, 2024. 

[45] The NULL block driver written in Rust. https://lore.kernel.org/rust-for-linux/20230503090708.2524310-1-nmi@meta..., 2024. 

[46] The NVME device driver written in Rust. https://github.com/metaspace/linux/tree/nvme, 2024. 

[47] The semaphore driver written in Rust. https://github.com/Rust-for-Linux/linux/blob/rust/samples/rust/rust semaphore.rs, 2024. 

[48] Stephen M Blackburn, Perry Cheng, and Kathryn S McKinley. Oil and water? high performance garbage collection in java with mmtk. In Proceedings. 26th International Conference on Software Engineering, pages 137–146. IEEE, 2004. 

[49] Sishuai Gong, Deniz Altinb¨uken, Pedro Fonseca, and Petros Maniatis. Snowboard: Finding kernel concurrency bugs through systematic interthread communication analysis. In Proceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles, pages 66–83, 2021. 

[50] Liwei Guo, Shuang Zhai, Yi Qiao, and Felix Xiaozhu Lin. Transkernel: bridging monolithic kernels to peripheral cores. In 2019 USENIX Annual Technical Conference (USENIX ATC 19), pages 675–692, 2019. https://www.usenix.org/conference/atc19/presentation/guo 

[51] Thuan Quang Huynh and Abhik Roychoudhury. A memory model sensitive checker for c#. In International Symposium on Formal Methods, pages 476–491. Springer, 2006. 

[52] Mohamed Ismail and G Edward Suh. Quantitative overhead analysis for python. In 2018 IEEE International Symposium on Workload Characterization (IISWC), pages 36–47. IEEE, 2018.

[53] Ralf Jung, Jacques-Henri Jourdan, Robbert Krebbers, and Derek Dreyer. Rustbelt: Securing the foundations of the rust programming language. Proc. ACM Program. Lang., 2(POPL), dec 2017.

[54] Paul A Karger and Roger R Schell. Multics security evaluation: Vulnerability analysis. In 18th Annual Computer Security Applications Conference, 2002. Proceedings., pages 127–146. IEEE, 2002.

[55] Michalis Kokologiannakis and Viktor Vafeiadis. Genmc: A model checker for weak memory models. In International Conference on Computer Aided Verification, pages 427–440. Springer, 2021.

[56] Duo Zhang, Om Rameshwar Gatla, Wei Xu, and Mai Zheng. A study of persistent memory bugs in the linux kernel. In Proceedings of the 14th ACM International Conference on Systems and Storage, SYSTOR ’21, New York, NY, USA, 2021. Association for Computing Machinery.

[57] Yuchen Zhang, Yunhang Zhang, Georgios Portokalidis, and Jun Xu. Towards understanding the runtime performance of rust. In Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering, ASE ’22, New York, NY, USA, 2023. Association for Computing Machinery.

[58] Hongyu Li, Liwei Guo, Yexuan Yang, Shangguang Wang, and Mengwei Xu. An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise. In 2024 USENIX Annual Technical Conference (ATC'24). https://www.usenix.org/conference/atc24/presentation/li-hongyu

Article Categories: 
Security
Operating Systems
Programming
Linux
Last updated July 3, 2024
Authors: 

Hongyu Li (co-primary author) is a PhD candidate in the Computer Science Department at the Beijing University of Posts and Telecommunications(BUPT). He is interested in using Rust to enhance the safety of the Operating system.

[email protected]

Liwei Guo (co-primary author) is a tenure-track assistant professor at the School of Computer Science and Engineering (School of Cyber Security) of University of Electronic Science and Technology of China (UESTC). He received his doctoral degree from the University of Virginia supervised by Prof. Felix Xiaozhu Lin, where he worked on OS kernels and TEEs. His current research interest is in improving the efficiency and security of systems software for emerging computing scenarios.   

 

[email protected]

Yexuan Yang is a postgraduate student at Beijing University of Posts and Telecommunications, and his main research focus is on operating systems.

 

[email protected]

Shangguang Wang is a professor at the School of Computer Science, Beijing University of Posts and Telecommunications, China. He is the founder & chief scientist of Tiansuan Constellation.  His research interests include service computing, mobile edge computing, cloud computing, and satellite computing. 

[email protected]

Mengwei Xu is an associate professor at the School of Computer Science, Beijing University of Posts and Telecommunications, China. His research interests focuses on improving system software for emerging workloads such as machine learning and satellite computing.

[email protected]
  • Log in to post comments
USENIX logo
  • Contact USENIX
  • Privacy Policy

© USENIX 2025
EIN 13-3055038

Website designed and built by Giant Rabbit LLC
Powered by Backdrop CMS

We need contributions from individuals like you.

USENIX conferences directly influence the development of computing systems and products used worldwide. Contribute today to support this vital work for the next 50 years.

Secure the Future of USENIX

Donate
Close