Linus Torvalds is van plan om wijzigingen met betrekking tot Rust buiten de maintainer om op te nemen

Christoph Hellwig, maintainer of the DMA, KVM, Slab Allocator subsystems and the PowerPC architecture in the Linux kernel, has fundamentally refused to accept Rust bindings for the DMA subsystem into the kernel and has joined the discussion on the rules for supporting Rust within the kernel, published by the Rust for Linux project. According to Christoph, such rules are useless until they are agreed upon by the community and included in the kernel documentation.

Christoph also pointed out that the rules contain incorrect information regarding maintainers potentially making decisions on including Rust-related code in their subsystems. Christoph stated that in a private conversation, Linus Torvalds firmly declared his intention to integrate Rust code into the kernel, despite maintainers' objections. Thus, developers and maintainers of the kernel will now have to deal with Rust, whether they want to or not.

Christoph also reiterated the comparison of the spread of Rust bindings to a cancerous tumor that will spread to all subsystems of the kernel and lead to fragmentation. From a cohesive whole, the kernel is turning into a project written in multiple languages, without a clear definition of when which language should be used. According to Christoph, working with such a mixed codebase has become his worst nightmare, as constant rewriting of code from one language to another and then back occurs in such conditions.

At the same time, Christoph is asking for clarification on the purpose of introducing Rust into the kernel. If the goal is to address security issues arising from low-level memory handling, then modernization of the existing code is primarily required. Considering that maintainers react painfully even to trivial things, such as checks for integer overflow, it is unclear how a gap between one part of the kernel, which does not accept even simple security rules, and another part, which adheres to strict compliance, can be bridged. If the goal is to simplify driver development, then introducing support for yet another language will only add more work and increase the burden on already overloaded people maintaining the kernel infrastructure.

Wat betreft de voorstanders van de integratie van Rust in de kernel, worden de volgende doelen genoemd:

  • Het schrijven van nieuwe code in de programmeertaal Rust zal het risico op fouten bij geheugenbeheer en racecondities verminderen, evenals bepaalde logische fouten uitsluiten.
  • Voor de maintainers zal het gemakkelijker zijn om wijzigingen te beoordelen en modules te refactoren, rekening houdend met de garanties die de programmeertaal Rust biedt.
  • De aanwezigheid van abstracties die gebruikmaken van de geavanceerde mogelijkheden van de programmeertaal Rust zal het creĆ«ren van nieuwe stuurprogramma's en modules vereenvoudigen.
  • Ondersteuning van een moderne programmeertaal zal nieuwe deelnemers aantrekken voor de ontwikkeling van de kernel.
  • Het toepassen van de mogelijkheden van de Rust-toolset zal het voldoen aan de documentatie-eisen voor code vergemakkelijken. Bijvoorbeeld, in het project Rust for Linux is een vereiste voor verplichte documentatie van publieke API's, veiligheidsvoorwaarden, unsafe-blokken en type-invarianten ingevoerd.

Bron: opennet.ru

Koop betrouwbare webhosting met bescherming tegen DDoS, VPS VDS servers šŸ”„ Koop betrouwbare webhosting met bescherming tegen DDoS, VPS VDS servers | ProHoster