Fewer bugs: Maintainer Greg Kroah-Hartman pushes for Rust in the Linux kernel
At KubeCon, Greg Kroah-Hartman spoke out in favor of Rust in the Linux kernel. The programming language reduces the effort required to find errors in the code.
(Image: Erstellt mit KI in Bing Designer durch heise online / dmk)
- Dr. Udo Seidel
At KubeCon EU in London, Linux developer and maintainer Greg Kroah-Hartman spoke out in favor of using Rust in the Linux kernel. During his speech on the keynote stage, he explained how Rust could reduce the number of errors and code checks in kernel development. The kernel developers had previously discussed treating Rust and C equally in their mailing list. Rust is now easy to use and has tools, instructions and initial implementations.
Kroah-Hartman: The number of errors in the Linux kernel is alarming
Around 5000 developers work on the Linux kernel, producing a new version every eight to nine weeks. On average, there are more than eight changes per hour in the source code, which has grown to over 40 million lines of code. Errors also occur: according to Kroah-Hartman, there are 13 CVE reports per week. Due to the widespread use of Linux, this number is alarming. Although errors are human, they require the source code to be checked by other developers. However, the use of Rust could reduce this workload.
Errors such as those in the Xen hypervisor would have been detected by the Rust compiler and pointed out to the developers without human intervention or other tools. Rust is a safe way, as it enforces the use of lock rules, error handling and the validation of certain aspects of memory management and type safety. Thus, according to Linux developer Kroah-Hartman, the use of Rust in the Linux kernel can significantly reduce the workload of reviewing submitted changes. However, he also pointed out that it is also possible to write buggy software in Rust.
Videos by heise
With a ratio of around 1:1300, the proportion of Rust compared to C in the Linux kernel is still low. So there is still a long way to go before the programming language can establish itself in the Linux kernel. In addition, the integration of Rust requires a strict review of the C APIs. However, this additional work is important and necessary, said Kroah-Hartman. Next year, the Linux kernel will be 35 years old. It would therefore not be wrong to clean out the code base and re-examine parts of it.
(wpl)