Rust in the Linux kernel
summary
Rust code replaces the Android binder driver with a feature-par Rust implementation that passes Android tests and even boots a device, showing microbenchmarks with comparable performance. Binder historically shows a high vulnerability density (~3.1 per KLOC) and many exploits; moving new and churn-heavy code to Rust reduces memory-safety bugs. Work involves bgen-generated C bindings, a kernel crate of safe wrappers, a half-C binder_fs kept for compatibility, a forked alloc crate, pinning macros and a custom linter Kalin to catch atomic-context sleeps.
AI-written summary · about
chapters (13)
- 0:00Rust in Linux kernel intro
- 1:10Why Rust for Linux kernel
- 6:12Current Rust kernel projects
- 8:00Rewriting Android binder in Rust
- 12:23Rust binder driver progress
- 14:08Rust in kernel vs userspace
- 20:56Kernel memory allocation failures
- 25:21Atomic context and spin locks
- 30:26Linter for atomic safety
- 31:10Pinning in the kernel
- 33:15Unstable Rust features needed
- 36:30Contributing to embedded Rust
- 37:40Question and answer session
related talks
08mLinux is Getting Rusty (And So Is Android)
27mUsing Rust in the binder driver
18mKeynote: Rust and Linux: How the Rust Language is Going to Help Linux Succeed in the Future
37mRust for Linux
27mRust in the Linux kernel
14mKeynote: Rust in the Linux Kernel, Why?
40mKeynote: Kernel Developer Roundtable
46mRust for Linux
