Skip to content
  • Hjem
  • Seneste
  • Etiketter
  • Populære
  • Verden
  • Bruger
  • Grupper
Temaer
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Kollaps
FARVEL BIG TECH
  1. Forside
  2. Ikke-kategoriseret
  3. The coreutils Rust rewrite story is pretty funny.

The coreutils Rust rewrite story is pretty funny.

Planlagt Fastgjort Låst Flyttet Ikke-kategoriseret
198 Indlæg 103 Posters 148 Visninger
  • Ældste til nyeste
  • Nyeste til ældste
  • Most Votes
Svar
  • Svar som emne
Login for at svare
Denne tråd er blevet slettet. Kun brugere med emne behandlings privilegier kan se den.
  • prozacchiwawa@functional.cafeP prozacchiwawa@functional.cafe

    @lcamtuf i do find that the crates dedicated to atomic file handling and temp files, in the interest of providing a uniform platform interface aren't as good as what's reachable in c.

    it's not a fault of the rust language per se, but writing a safe interface at that level isn't easy, so it makes sense (and is in some sense a better default) to have high level, platform neutral access here.

    L This user is from outside of this forum
    L This user is from outside of this forum
    lukasz2@social.vivaldi.net
    wrote sidst redigeret af
    #38

    @prozacchiwawa @lcamtuf yeah, but coreutils is an interface for shell languages. The shell doesn't care if underlying "util" was written in C or Rust

    1 Reply Last reply
    0
    • sten@chaos.socialS sten@chaos.social

      @darkuncle @ChuckMcManis @lcamtuf Sure, but perhaps don't do your learning in production? 🙂

      m33@mastodon.socialM This user is from outside of this forum
      m33@mastodon.socialM This user is from outside of this forum
      m33@mastodon.social
      wrote sidst redigeret af
      #39

      @sten @darkuncle @ChuckMcManis @lcamtuf is it really production if it's not on my machine ?

      mikalai@privacysafe.socialM chuckmcmanis@chaos.socialC sten@chaos.socialS 3 Replies Last reply
      0
      • m33@mastodon.socialM m33@mastodon.social

        @sten @darkuncle @ChuckMcManis @lcamtuf is it really production if it's not on my machine ?

        mikalai@privacysafe.socialM This user is from outside of this forum
        mikalai@privacysafe.socialM This user is from outside of this forum
        mikalai@privacysafe.social
        wrote sidst redigeret af
        #40

        @m33 @sten @darkuncle @ChuckMcManis @lcamtuf
        yep, production is for debugging

        1 Reply Last reply
        0
        • sten@chaos.socialS sten@chaos.social

          @lcamtuf Not only that, some of the utils were not command line-compatible with their non-Rust counterparts.

          Honestly, I don't understand why these utils were rewritten. They didn't need rewriting.

          m33@mastodon.socialM This user is from outside of this forum
          m33@mastodon.socialM This user is from outside of this forum
          m33@mastodon.social
          wrote sidst redigeret af
          #41

          @sten @lcamtuf Someone said vigorously "don't break userspace". Now we need "don't break userland" or something

          1 Reply Last reply
          0
          • m33@mastodon.socialM m33@mastodon.social

            @sten @darkuncle @ChuckMcManis @lcamtuf is it really production if it's not on my machine ?

            chuckmcmanis@chaos.socialC This user is from outside of this forum
            chuckmcmanis@chaos.socialC This user is from outside of this forum
            chuckmcmanis@chaos.social
            wrote sidst redigeret af
            #42

            @m33
            I discovered at Google a tremendous laziness and lack of rigor because "well if it doesn't work or has problems we can roll it back." I came to think of it as The Google Principle and it can be more easily written as:

            The amount of care and thought that goes into a software change is proportional to the perceived difficulty of pushing that change into production.

            @sten @darkuncle @lcamtuf

            darkuncle@infosec.exchangeD 1 Reply Last reply
            0
            • sten@chaos.socialS sten@chaos.social

              @lcamtuf Not only that, some of the utils were not command line-compatible with their non-Rust counterparts.

              Honestly, I don't understand why these utils were rewritten. They didn't need rewriting.

              oblomov@sociale.networkO This user is from outside of this forum
              oblomov@sociale.networkO This user is from outside of this forum
              oblomov@sociale.network
              wrote sidst redigeret af
              #43

              @sten @lcamtuf

              MIT licensing vs GPL.

              (I'm not joking.)

              sten@chaos.socialS argv_minus_one@mastodon.sdf.orgA 2 Replies Last reply
              0
              • groxx@hachyderm.ioG groxx@hachyderm.io

                @lcamtuf a related observation would probably be: why did important, security-critical edge cases get handled without enough documentation to prevent them from reoccurring?

                orb2069@mastodon.onlineO This user is from outside of this forum
                orb2069@mastodon.onlineO This user is from outside of this forum
                orb2069@mastodon.online
                wrote sidst redigeret af
                #44

                @groxx

                ...I like how you assume people read comments. It gives me hope.

                @lcamtuf

                S 1 Reply Last reply
                0
                • klausman@mas.toK klausman@mas.to

                  @lcamtuf There's also that human habit of getting complacent about all bugs when _some_ types of bugs are either impossible or very very hard to make because of language structure and tooling.

                  orb2069@mastodon.onlineO This user is from outside of this forum
                  orb2069@mastodon.onlineO This user is from outside of this forum
                  orb2069@mastodon.online
                  wrote sidst redigeret af
                  #45

                  @klausman

                  See: Unit tests making talking about regression taboo.

                  @lcamtuf

                  1 Reply Last reply
                  0
                  • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                    The coreutils Rust rewrite story is pretty funny.

                    Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                    But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                    https://seclists.org/oss-sec/2026/q2/332

                    PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                    miss_rodent@girlcock.clubM This user is from outside of this forum
                    miss_rodent@girlcock.clubM This user is from outside of this forum
                    miss_rodent@girlcock.club
                    wrote sidst redigeret af
                    #46

                    @lcamtuf Yeah, but they got to license-wash the coreutils, the gnu coreutils are GPL3, the rust uutils use the much more corporate-overlord and user-abuse friendly MIT license.

                    grumpybozo@toad.socialG S 2 Replies Last reply
                    0
                    • oblomov@sociale.networkO oblomov@sociale.network

                      @sten @lcamtuf

                      MIT licensing vs GPL.

                      (I'm not joking.)

                      sten@chaos.socialS This user is from outside of this forum
                      sten@chaos.socialS This user is from outside of this forum
                      sten@chaos.social
                      wrote sidst redigeret af
                      #47

                      @oblomov @lcamtuf Wow. Are there any documents that say this that I can get my hands on?

                      oblomov@sociale.networkO 1 Reply Last reply
                      0
                      • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                        The coreutils Rust rewrite story is pretty funny.

                        Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                        But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                        https://seclists.org/oss-sec/2026/q2/332

                        PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                        kgf@hachyderm.ioK This user is from outside of this forum
                        kgf@hachyderm.ioK This user is from outside of this forum
                        kgf@hachyderm.io
                        wrote sidst redigeret af
                        #48

                        @lcamtuf I don't take this as a dunk on Rust, I take it as a (well-deserved) dunk on repositories that accept PRs that vibe-coded entire features that clearly no one understood. Which adds even more hidden costs.

                        1 Reply Last reply
                        0
                        • m33@mastodon.socialM m33@mastodon.social

                          @sten @darkuncle @ChuckMcManis @lcamtuf is it really production if it's not on my machine ?

                          sten@chaos.socialS This user is from outside of this forum
                          sten@chaos.socialS This user is from outside of this forum
                          sten@chaos.social
                          wrote sidst redigeret af
                          #49

                          @m33 @darkuncle @ChuckMcManis @lcamtuf An excellent point that I have to admit I hadn't considered.

                          1 Reply Last reply
                          0
                          • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                            The coreutils Rust rewrite story is pretty funny.

                            Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                            But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                            https://seclists.org/oss-sec/2026/q2/332

                            PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                            rdp@notpickard.comR This user is from outside of this forum
                            rdp@notpickard.comR This user is from outside of this forum
                            rdp@notpickard.com
                            wrote sidst redigeret af
                            #50

                            @lcamtuf coming in at #1 with a bullet on the Joel On Software 'things you never do' list

                            (know its common wisdom, but think Joel articulates it very well)

                            https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/

                            1 Reply Last reply
                            0
                            • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                              The coreutils Rust rewrite story is pretty funny.

                              Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                              But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                              https://seclists.org/oss-sec/2026/q2/332

                              PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                              brandnewmath@mstdn.socialB This user is from outside of this forum
                              brandnewmath@mstdn.socialB This user is from outside of this forum
                              brandnewmath@mstdn.social
                              wrote sidst redigeret af
                              #51

                              @lcamtuf I always looked at this project as a sort of hobby, a learning exercise, maybe just a lark, or a "maybe one day we'll have a useful alternative"...and then Canonical went and adopted it before anyone could reasonably believe it was of production quality

                              1 Reply Last reply
                              0
                              • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                                The coreutils Rust rewrite story is pretty funny.

                                Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                                But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                                https://seclists.org/oss-sec/2026/q2/332

                                PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                                david_chisnall@infosec.exchangeD This user is from outside of this forum
                                david_chisnall@infosec.exchangeD This user is from outside of this forum
                                david_chisnall@infosec.exchange
                                wrote sidst redigeret af
                                #52

                                @lcamtuf

                                It’s frustrating that POSIX took decades to get APIs that weren’t intrinsically racy, but then higher-level languages that post dated the improved ones implemented equivalents of the old racy APIs. C++ was annoying, they waited until pretty much every platform that supported C++ and had a filesystem implemented the newer APIs and then standardised the filesystem TS with racy ones. I believe Rust is similar, but at least it has cap-std which implements the non-racy versions as an alternative standard library.

                                tris@chaos.socialT icing@chaos.socialI 2 Replies Last reply
                                0
                                • benh@mastodon.scotB benh@mastodon.scot

                                  @lcamtuf

                                  https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/

                                  cmdrmoto@hachyderm.ioC This user is from outside of this forum
                                  cmdrmoto@hachyderm.ioC This user is from outside of this forum
                                  cmdrmoto@hachyderm.io
                                  wrote sidst redigeret af
                                  #53

                                  @benh @lcamtuf Wow. Kudos to Joel, it’s 26 years later and I still remember reading this article when it was fresh.

                                  slash909uk@mastodon.me.ukS 1 Reply Last reply
                                  0
                                  • hypha@cafe.mycelium.locahlo.stH hypha@cafe.mycelium.locahlo.st

                                    @xerz @lcamtuf it’s easy to fall for domain specific knowledge traps when you’re learning
                                    which is why it’s often advised against rewriting software from scratch, especially if you were not in the first team of developers

                                    star@fed.amazonawaws.comS This user is from outside of this forum
                                    star@fed.amazonawaws.comS This user is from outside of this forum
                                    star@fed.amazonawaws.com
                                    wrote sidst redigeret af
                                    #54
                                    @hypha @xerz @lcamtuf tbf i think the framing that "they shouldn't have" is wrong and bad. *canonical* should not have switched, because that is such a bad idea
                                    xerz@soc.masfloss.netX 1 Reply Last reply
                                    0
                                    • star@fed.amazonawaws.comS star@fed.amazonawaws.com
                                      @hypha @xerz @lcamtuf tbf i think the framing that "they shouldn't have" is wrong and bad. *canonical* should not have switched, because that is such a bad idea
                                      xerz@soc.masfloss.netX This user is from outside of this forum
                                      xerz@soc.masfloss.netX This user is from outside of this forum
                                      xerz@soc.masfloss.net
                                      wrote sidst redigeret af
                                      #55

                                      @star @hypha @lcamtuf yeah, the audits should have come first, not the other way around

                                      all they did was give them free patches, so uh... yet another Rust advantage? ​

                                      lispi314@udongein.xyzL 1 Reply Last reply
                                      0
                                      • sten@chaos.socialS sten@chaos.social

                                        @oblomov @lcamtuf Wow. Are there any documents that say this that I can get my hands on?

                                        oblomov@sociale.networkO This user is from outside of this forum
                                        oblomov@sociale.networkO This user is from outside of this forum
                                        oblomov@sociale.network
                                        wrote sidst redigeret af
                                        #56

                                        @sten @lcamtuf sorry, it's been literally years since the last time I cared enough about this, so I don't have the links at hand. From what I remember, the dev(s) that got the project started claimed to not care about the license and that they would consider relicensing if the community showed an interest, but shot down all proposals to switch to GPL with no discussion.

                                        Officially t's explicitly NOT about that:

                                        https://uutils.github.io/

                                        «It is not primarily […] about license debates.»

                                        1 Reply Last reply
                                        0
                                        • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                                          The coreutils Rust rewrite story is pretty funny.

                                          Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                                          But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                                          https://seclists.org/oss-sec/2026/q2/332

                                          PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                                          raven667@hachyderm.ioR This user is from outside of this forum
                                          raven667@hachyderm.ioR This user is from outside of this forum
                                          raven667@hachyderm.io
                                          wrote sidst redigeret af
                                          #57

                                          @lcamtuf It's even sillier because the Rust rewrite was just someones hobby project to learn Rust, it wasn't engineered from the start to be the "Canonical" implementation, so picking it off the Internet and shoving it into Ubuntu is an engineering decision that the professional Ubuntu engineers should be accountable for, not the original developer who just shared their work with the world.

                                          1 Reply Last reply
                                          0
                                          Svar
                                          • Svar som emne
                                          Login for at svare
                                          • Ældste til nyeste
                                          • Nyeste til ældste
                                          • Most Votes


                                          • Log ind

                                          • Har du ikke en konto? Tilmeld

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          Graciously hosted by data.coop
                                          • First post
                                            Last post
                                          0
                                          • Hjem
                                          • Seneste
                                          • Etiketter
                                          • Populære
                                          • Verden
                                          • Bruger
                                          • Grupper