The tenth version of patches for the Linux kernel with support for the Rust language

Miguel Ojeda, the author of the Rust-for-Linux project, has proposed for consideration by Linux kernel developers the release of v10 components for developing device drivers in Rust. This is the eleventh edition of the patches taking into account the first version, published without a version number. The inclusion of Rust support has been approved by Linus Torvalds for inclusion in the Linux 6.1 kernel, provided no unforeseen issues arise. The development is funded by Google and the ISRG (Internet Security Research Group), which is the founder of the Let's Encrypt project and promotes HTTPS and the development of technologies to enhance internet security.

Like the previous patch release, v10 has been trimmed down to the essential minimum necessary for building a simple kernel module written in Rust. The differences from the previous version consist of minor adjustments, replacing sizeof with ARRAY_SIZE in kallsyms.c, and adapting the patches to the v6.0-rc7 kernel. It is expected that the minimal patch, reduced from 40,000 to 13,000 lines of code, will simplify the acceptance of Rust support into the main core. After establishing minimal support, there are plans to gradually enhance existing functionality by transferring other changes from the Rust-for-Linux branch.

The proposed changes enable the use of Rust as a secondary language for developing drivers and kernel modules. Rust support is presented as an optional feature, not active by default, and does not result in Rust being included among the mandatory build dependencies for the kernel. Using Rust for driver development will allow for the creation of safe and higher-quality drivers with minimal effort, eliminating issues such as accessing memory after it has been freed, dereferencing null pointers, and buffer overflows.

Safe memory handling in Rust is ensured at compile time through reference checking, ownership tracking of objects, and considerations of object lifetimes (scope), as well as runtime checks for correctness in memory access. Rust also provides protections against integer overflows, requires variables to be initialized before use, manages errors more effectively in the standard library, employs immutability by default for references and variables, and offers strong static typing to minimize logical errors.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster