The upcoming Linux 7.2 kernel is set to receive a substantial infusion of Rust programming language support, with over 40,000 new lines of Rust code submitted for integration. According to a Phoronix report, veteran Rust-for-Linux maintainer Miguel Ojeda has already mailed the extensive changeset, which includes the introduction of the Rust Zerocopy library — a key component designed to reduce the use of unsafe code in the kernel.

A Major Milestone for Rust in the Kernel

The volume of new Rust code landing in a single kernel release marks one of the most significant steps forward since the language was first admitted into the Linux kernel tree. While Rust support has been progressively expanding through incremental contributions over recent kernel cycles, the scale of changes headed for version 7.2 suggests that the foundational infrastructure is maturing to the point where more substantial subsystem work can proceed.

The Zerocopy library, in particular, is a strategically important addition. In the context of the Linux kernel, unsafe blocks are segments of code where the compiler cannot guarantee memory safety — precisely the class of vulnerabilities, including buffer overflows and use-after-free errors, that Rust is designed to prevent. These memory corruption bugs have historically been among the most common and dangerous kernel security flaws.

By providing safe abstractions for operations that would otherwise require unsafe code — such as reading and writing raw byte buffers and performing type conversions — the Zerocopy library allows kernel developers to accomplish low-level tasks while staying within Rust's safe subset. This reduces the attack surface and the likelihood of introducing subtle memory bugs during development.

Why It Matters for the Broader Developer Community

For developers working on systems software, kernel modules, or security-sensitive infrastructure, the growing Rust footprint in the Linux kernel carries practical implications. As the kernel's Rust abstractions become more complete, the barrier to writing kernel-level code in Rust — rather than C — continues to lower. This is relevant for any organisation that develops custom kernel modules, contributes to kernel subsystems, or maintains security-critical Linux deployments.

The broader trend is clear: major infrastructure projects are increasingly turning to memory-safe languages to address a category of vulnerabilities that has proven stubbornly resistant to mitigation through code review and static analysis alone. The Linux kernel, as the backbone of everything from cloud servers to embedded devices, is arguably the highest-profile project pursuing this direction.

Looking Ahead

The Rust-for-Linux project remains a long-term effort. Much of the kernel is still written in C, and full parity with existing subsystems will take years of sustained development. However, each kernel cycle brings incremental progress, and the scale of changes in Linux 7.2 suggests that community and maintainer confidence in the approach is strengthening.

For IT professionals and developers in Hong Kong and across the Asia-Pacific region who work with Linux infrastructure — whether in cloud services, cybersecurity, or embedded systems — the trajectory of Rust adoption in the kernel is worth monitoring. Organisations that invest in Rust expertise now may find themselves better positioned as the language's role in foundational software continues to expand.

The final release of Linux 7.2 is expected in the coming weeks, following the project's standard merge window and release candidate cycle.


即將發布的 Linux 7.2 kernel 將獲得大量 Rust 程式語言支援,有超過 40,000 行新的 Rust 程式碼已提交並準備整合。根據 Phoronix 的報導,資深 Rust-for-Linux 維護者 Miguel Ojeda 已將這套龐大的變更集郵寄出來,其中包括引入 Rust Zerocopy library——這是一個旨在減少 kernel 中使用 unsafe 程式碼的關鍵元件。

Rust 在 Kernel 整合的重要里程碑

單次 kernel release 中湧入如此大量新的 Rust 程式碼,標誌著自該程式語言首次被納入 Linux kernel tree 以來,所邁出的最重大進展之一。儘管 Rust 支援在過去幾個 kernel 週期中透過漸進式貢獻不斷擴展,但即將到來的 7.2 版本的變更規模表明,基礎設施已趨成熟,足以支援更實質性的子系統開發工作。

其中,Zerocopy library 的加入具有重要的戰略意義。在 Linux kernel 的語境中,unsafe 區塊是 compiler 無法保證記憶體安全的程式碼段落——這正是 Rust 設計用來防範的一類漏洞,包括 buffer overflows 和 use-after-free 錯誤。這些記憶體損毀缺陷歷來是 kernel 中最常見且最危險的保安漏洞類別。

Zerocopy library 透過為原本需要 unsafe 程式碼的操作——例如讀取和寫入 raw byte buffers 以及執行 type conversions——提供安全的抽象化,讓 kernel 開發人員能在 Rust 的安全子集內完成低階任務。這減少了 attack surface,並降低了在開發過程中引入微妙記憶體錯誤的可能性。

對更廣泛開發者群體的重要性

對於從事系統軟件、kernel modules 或保安敏感基礎設施開發的開發人員而言,Rust 在 Linux kernel 中不斷增長的足跡具有實際影響。隨著 kernel 的 Rust 抽象層日益完善,使用 Rust 而非 C 編寫 kernel 級程式碼的門檻將持續降低。這對於任何開發自訂 kernel modules、貢獻 kernel 子系統或維護保安關鍵 Linux 部署的組織都至關重要。

更廣泛的趨勢顯而易見:主要的基礎設施項目正日益轉向採用記憶體安全的程式語言,以解決一類僅依靠 code review 和 static analysis 難以徹底緩解的漏洞。Linux kernel 作為從雲端伺服器到嵌入式設備等一切事物的骨幹,可以說是朝此方向發展的最高調項目。

展望未來

Rust-for-Linux 項目仍然是一項長期的工作。kernel 的大部分仍然以 C 語言編寫,與現有子系統實現完全對等將需要數年的持續開發。然而,每個 kernel 週期都帶來漸進的進步,而 Linux 7.2 的變更規模表明,社區和維護者對此方法的信心正在增強。

對於在香港及亞太區從事 Linux 基礎設施相關工作的資訊科技專業人員和開發人員——無論是在雲端服務、網絡保安還是嵌入式系統領域——監察 Rust 在 kernel 中的採用軌跡都值得關注。現在投資培養 Rust 專長的組織,可能會在該程式語言在基礎軟件中的角色持續擴展時,處於更有利的位置。

Linux 7.2 的最終版本預計將在未來幾週內發布,遵循項目的標準 merge window 和 release candidate 週期。

新聞來源 / Original News Source