Kristof Helwig, main maintainer of the DMA subsystem, KVM, Slab Allocator, and PowerPC architecture in the Linux kernel, who once served on the technical steering committee of the Linux Foundation and acted as a plaintiff in a GPL-related lawsuit against VMware, refused to approve patches related to driver development support in Rust. The proposed patches added wrappers over several functions of the DMA subsystem, allowing the use of DMA in drivers written in Rust.
The reason for the refusal mentioned was the complexity of maintaining code with wrappers in other languages, along with a desire to keep the programming interfaces to DMA in a readable form in C, without spreading over unclear wrappers. Kristof suggested directly accessing the original C API of DMA in each Rust driver to avoid creating additional abstractions that kernel maintainers would have to depend on.
The patch developers stated that they would take on all the work related to maintaining Rust code, that they were ready to maintain these patches themselves, and moved the wrappers to a separate subdirectory (rust/kernel/dma.rs). In response, Kristof vetoed ("Nacked-by") the acceptance of Rust-related patches and indicated that he did not need another maintainer. Kristof stated that if the wrapper developers want to create an unmaintainable Linux due to the mixing of several languages in one codebase, they should do it in their driver, rather than spreading this cancerous growth to the core subsystems.
At the same time, Kristof clarified that he has nothing against Rust and considers it one of the best new languages, but he is against mixing code in different languages. According to Kristof, he is in favor of creating new projects in Rust but opposes mixing Rust into large C codebases, as such mixing significantly reduces the maintainability of the kernel as an integrated project.
Bistvo težav s spremljanjem je v tem, da Rust-vrvice postavljajo spremljevalce v odvisnost od kode v jeziku Rust. Na prvi pogled se zdi, da so vrvice le nadgradnje C-struktur in funkcij, ki na noben način ne vplivajo na razvoj in spremljanje C-kode. A to ni tako. V prisotnosti takšnih vrvic morajo razvijalci podsystems, napisanih v C, upoštevati vpliv njihovih sprememb na nadaljnje delovanje vrvic. Vsaka sprememba podatkovnih struktur ali notranjih funkcij v C lahko privede do potrebe po spremembi kode vrvic, zato je treba spremembe v C-kode, ki vplivajo na vrvice, spremljati in sinhronizirati s kodo v Rustu. Mnogi spremljevalci niso pripravljeni prevzeti dodatne odgovornosti za odpravo težav, ki nastanejo v kodi v Rustu, in nočejo porabiti svojega časa za spremljanje stanja Rust-vrvic.
Situacija z zapletanjem spremljanja ni zgolj teoretična. V razpravo se je vključil Jason Gunthorpe, vzdrževalec TPM, VFIO in Infiniband pri podjetju NVIDIA, ki je navedel primer zavrnitve pull-zahteve Linusa Torvalds s spremembami v podsklopu za upravljanje pomnilnika, ker je ta sprememba privedla do napake pri poskusu sestave jedra z vključeno podporo za Rust. Napaka se je pojavila, ker vzdrževalci kode v Rustu niso dodali potrebnih sprememb v generator vrvic (bindgen). Tako so v vzdrževanju podsklopu za upravljanje pomnilnika ob napredovanju spremembe, ki je bila povsem korektna z vidika C-kode in jedra na splošno, postali odvisni od neobvezne tuje kode v jedru, za katero so odgovorni drugi ljudje.
Zavrnitev sprejetja kode vrvic nad klici DMA je razvijalce projekta Rust for Linux postavila v slepo ulico, saj brez takšnih vrvic razvoj popolnih gonilnikov v jeziku Rust ne bo mogoč. Hector Martin, vzdrževalec kode za podporo ARM čipov Apple in vodja projekta Ashai Linux, je kot možnost rešitve konflikta predlagal, da se vrvico sprejme neposredno preko Linusa Torvaldsa, obhajajoč vzdrževalca podsklopu DMA. Če Linus soglaša s takšno kršitvijo subordinacije in ustaljene prakse, bi to lahko privedlo do kriznega upravljanja razvoja jedra; če pa odkloni, bo ustavil napredovanje Rust-a v jedro.
Hector mentioned possibly holding Christoph accountable for violating the code of conduct due to a comment where Christoph compared Rust to a tumor. Moreover, Hector expressed that he was tired of all the bureaucratic red tape, unwilling to simply trust established processes, and hinted at involving social media. Dave Airlie, the maintainer of the DRM subsystem, advised against escalating the conflict and emphasized that toxic behavior is unacceptable from both sides, regardless of who is right or wrong in the discussion.
Linus Torvalds joined the discussion, pointing out that the issue may lie with Hector himself and his overconfidence in knowing better than others, rather than with the current kernel development process, which is working. The kernel development process has its problems, but that's a reality—nothing in life is perfect. Attempts to pressure through social media deter Linus from wanting anything to do with Hector's approach. Technical discussions and patches matter to Linus, not pressure through social media.
In response, Hector requested to remove himself from the ARM/APPLE platform maintainers, as he had lost faith in the kernel's development process and the community management approach. He also stated that the development of the ARM/Apple platform would continue outside of the main Linux kernel. There is still one maintainer for the ARM/Apple platform in the kernel—Sven Peter, who intends to continue supporting the platform within the kernel.
Izvor: opennet.ru
