Miguel Ojeda sent a Rust pull request for Linux 7.2 with the zerocopy crate, AutoFDO support, software tag-based KASAN, and Rust 1.98 support, giving kernel builders fewer unsafe conversions and a path to faster Rust Binder code.
Michael Larabel at Phoronix reported June 15, 2026, that Miguel Ojeda submitted a large Rust update for the Linux 7.2 merge window. The headline change pulls the zerocopy Rust library into the kernel tree so Rust-for-Linux maintainers can remove more unsafe conversion code.
{{IMAGE:2}}
Product
Linux 7.2 gains a Rust update with more than 40,000 new lines of Rust code. Zerocopy accounts for most of that growth, with about 39,000 lines added, or about 32,000 lines if you exclude benches/ documentation material.
Kernel developers use zerocopy for byte-to-type conversion patterns that need tight code generation and stronger compile-time checks. The crate offers derivable traits such as FromBytes and macros such as transmute!, which help developers express layout constraints without hand-writing the same unsafe blocks across drivers and subsystems.
The import also keeps licensing straightforward for kernel use. Zerocopy uses BSD-2-Clause OR Apache-2.0 OR MIT, and the kernel-side import needed minor adaptation plus SPDX identifiers. Upstream zerocopy has since taken matching SPDX work, which should reduce future kernel-vendor drift.

Performance data
Ojeda said he checked code generation for an isolated example similar to the Nova patch in the series and found matching output. In that case, the zerocopy version also removed remaining panic paths under debug-assertions, because the compiler could prove the relevant undefined-behavior checks at compile time.
The same pull request adds Rust support for AutoFDO, or Automatic Feedback Directed Optimization. Kernel builders can feed profile data back into the compiler so it makes better layout and branch decisions for hot paths.
| Linux 7.2 Rust change | Build or runtime effect |
|---|---|
| zerocopy import | Removes some unsafe conversion code and keeps byte layout checks in Rust types and macros |
| AutoFDO for Rust | Lets compiler profiles tune Rust kernel code paths |
| Rust Binder AutoFDO data | Shows about a 13% performance difference in the cited test case |
| Software tag-based KASAN | Extends Rust coverage for memory error detection |
| Rust 1.98 support | Prepares the kernel Rust code for the next compiler release |
The 13% Rust Binder figure deserves attention for Android and IPC-heavy workloads. Binder latency and throughput affect service calls, process communication, and app framework behavior. A double-digit shift from compiler feedback can matter on small cores, thermally constrained phones, and virtualized Android test rigs.
Power consumption will depend on workload. AutoFDO can cut wasted cycles when it improves instruction cache locality and branch behavior, but it can also expose new hot spots if a workload changes after profiling. Kernel builders who care about watts should test before and after with the same profile source, CPU governor, and thermal limits.
Build recommendations
Kernel builders should treat this as a Rust toolchain and validation update, not a drop-in performance win for every machine. Use the compiler version that Linux 7.2 documents for the merge window, confirm Rust 1.98 readiness if your distro toolchain moves fast, and keep KASAN builds separate from production performance tests.
Homelab and workstation builders should benchmark three cases: baseline Linux 7.2 without Rust AutoFDO, Linux 7.2 with Rust AutoFDO, and a debug or sanitizer build for fault testing. Keep the kernel config fixed across runs. Measure wall power at the outlet if you care about efficiency, because a faster benchmark with higher package power may still raise total energy use.
Driver authors and subsystem maintainers should look for byte parsing, packet layout, register block, and firmware table code that carries small unsafe conversion blocks. Zerocopy will help most where the type layout contract matters and the compiler can verify the shape at build time.
Developers can track the broader Rust-for-Linux effort at Rust for Linux and review zerocopy’s API surface through its crate documentation. Linux 7.2 now gives kernel Rust code a larger standard toolbox for memory layout work, profiling, and sanitizer coverage.

Comments
Please log in or register to join the discussion