• Gayhitler@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    15 days ago

    https://lore.kernel.org/lkml/20250108122825.136021-1-abdiel.janulgue@gmail.com/

    Here’s the source thread.

    Tldr: someone wants to put rust in the dma part of the kernel (the part that accesses memory directly)(it’s a memory allocator abstraction layer written in rust which rust code can use directly instead of dealing with the c allocator abstraction layer), is told that rust should use the extant methods to talk to the c dma interface, replies that doing so would make rust programs that talk to dma require some more code, gets told “that’s fine. We can’t do a split codebase”. The two parties work towards some resolution, then hector martin comes in and acts like jerk and gets told to fuck off by Linus.

    Martin is no lennart poettering but I don’t try to see things from his perspective anymore.

    It’s worth noting that Linus’ “approval” of rust in the kernel isn’t generally seen as a blanket endorsement, but a willingness to see how it might go and rust people have been generally trying to jam their code everywhere using methods that rival the cia simple field sabotage manual.

    I don’t think it’s on purpose (except for maybe Martin) but a byproduct of the kernel maintainers moving slowly but surely and the rust developers moving much faster and some seeing the solution to that slow movement as jamming their foot in the door and wedging it open.

    • Norah (pup/it/she)@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      14 days ago

      Except you’re wrong about them wanting to put Rust code in the DMA subtree. As per the article linked below by M1ch431:

      In a message to the Linux kernel mailing list, Hellwig wrote: “No Rust code in kernel/dma, please.” For what it’s worth, the patch added code to the rust/kernel portion of the Linux source tree, not kernel/dma, as far as we can tell.

      All they were doing is adding an abstraction layer, within the already existing Rust code, so that rust drivers could communicate with the C DMA code in a uniform and predictable manner. It would have put far more work on maintainers, both C and Rust alike, to have each and every driver implement its own abstraction to the DMA API. Issues would have been/will be filed against the kernel/dma subtree in error due to issues with these myriad abstraction layers.

      • Gayhitler@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        1
        ·
        14 days ago

        It’s a duplication of functionality in kernel/dma.

        That’s why the submitter didn’t say “I didn’t submit to kernel/dma, checkmate libs!”.

        The intent is to duplicate functionality in kernel/dma then get it included directly or linked to.

        That’s what the r4l project is trying to do explicitly!

        Before you say that kernel/dma didn’t have functional easy to use rust bindings, so the commit couldn’t have duplicated functionality: someone on kernel/dma said they didn’t want that and suggested using the c bindings instead which is what every other language has to do. Which means there was already a solution that was functional.

        It’s like if there’s a community bicycle and you bring your drill and tap set so you can mount your bottle caddy and the community says “please don’t make a hole we have to tig in. Just use a pipe strap.” The right answer isn’t to start building a whole new down tube you can tap for an m5 for your bottle caddy, it’s to just use a pipe strap for your bottle caddy.

        I didn’t read the linked article (or any linked article about this) because I’ve been reading the mailing list. Reporting on the kernel and people’s behavior on the list is tiring and often includes a bunch of baseless speculation.

    • verdigris@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      15 days ago

      To be fair, I’m not sure how “I will do everything in my power to oppose this” is the anti-Rust side “work[ing] towards some resolution”…

      • Gayhitler@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        15 days ago

        That’s tame for the kernel mailing list lol.

        The context is that hellwig doesn’t want another maintainer or deal with a split codebase in the dma subsystem which I honestly agree with.

        If I were a maintainer in that position I’d be barring the doors too. It’s not a driver for some esoteric realtek wireless card or something.

        Even if I didn’t agree with that position it’s normal to only post on the kernel mailing list about shit you actually care deeply about because it’s public and aside from all your fellow devs taking the time to read what you wrote, psychotic nerds like myself watch it and will try to read the tea leaves too!

        • FooBarrington@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          14 days ago

          This creates a lot of extra work for no benefit, as every driver that needs DMA would have to include their own copy of the DMA stuff.

          • uis@lemm.ee
            link
            fedilink
            arrow-up
            0
            arrow-down
            1
            ·
            14 days ago

            They still can share code. Just not maintained by dma.

            • FooBarrington@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              14 days ago

              Nobody asked for the code to be maintained by DMA. The maintainer blocked a PR outside his subsystem, and even if it was part of his subsystem, the R4L approach is that C developers can break Rust code however they want.

              Literally nobody suggested that the DMA maintainers should maintain Rust code.

    • Michael@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      15 days ago

      trying to jam their code everywhere using methods that rival the cia simple field sabotage manual.

      I am aware of the manual, but I fail to see how adding to a codebase is “sabotage” if it’s all generally seen as fine by the project lead - it’s far from a hostile takeover.

      Would a CIA saboteur even want memory safety as a rule? Just speculating, but I’d say that’s unlikely.

      Edit: I changed the order of the sentences, as it was not intentionally ordered, and slightly clarified my second thought.

      • Gayhitler@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        15 days ago

        I don’t think the ends are those of the cia, and I didn’t say that the means were either, only that they were similar to those in a famous mid century guide for those trying to halt or hijack organizations.

        I don’t think the rust devs are a cia opp, before you ask. I think some rust devs and even proponents of rust who only cheer from the sidelines are sometimes behaving in ways that raise red flags. I think it’s natural and laudable that the existing devs and maintainers are alarmed by that same behavior. It’s their job.

        I also think Linus position on rust has been stretched to the point of breaking and I personally find it hard to take positions seriously that distill the complex process of integrating new languages into a very old very large codebase with many full time developers into “Linus said I could”.