Announcement

Collapse
No announcement yet.

The First Rust-Written Network PHY Driver Set To Land In Linux 6.8

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • The First Rust-Written Network PHY Driver Set To Land In Linux 6.8

    Phoronix: The First Rust-Written Network PHY Driver Set To Land In Linux 6.8

    Since Linux 6.1 when the very initial Rust infrastructure was added to the Linux kernel there's been a lot of other plumbing and house keeping merged since for enabling kernel drivers to be written in the Rust programming language. With the upcoming Linux 6.8 kernel cycle, the first Rust network driver is set to be introduced...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    "135 lines of Rust code"

    Always good to know the amount of lines in C

    Comment


    • #3
      Only 135 LOC. Ok...

      ...but what is the extra added overhead required to compile those few lines of code? What additional compilers, libraries, preprocessors, etc.? The article fails to tell us that.

      IMHO - Rust is for programmers that failed at learning to write proper C production code ... since I doubt that anyone can write proper C++ production code.

      Comment


      • #4
        Originally posted by ThomasD View Post
        "135 lines of Rust code"

        Always good to know the amount of lines in C
        For the kernel, a PHY driver with 135 LOC is going to be like 90% call and interface structure and 5% misc and 5% setting a couple of registers.
        Move along people. There really isn't anything to see here.

        Comment


        • #5
          Yeah. Sorry. But Rust is still an eyesore.
          I usually look at the kernel and think that things are part pretty, artful even.

          If it's going to end up like this then I don't want to look at it no more.
          It sort of reminds me of the fugly (early) days of C.

          Comment


          • #6
            I didn´t know about this before but actually rewriting code in memory safe languages is mandatory nowdays for companys.

            The Urgent Need for Memory Safety in Software Products | CISA

            I dont know how the EU standpoint on that is but i guess it´s the same.

            Logical Foundations for the Future of Safe Systems Programming | RustBelt | Project | Fact sheet | H2020 | CORDIS | European Commission (europa.eu)

            So yes Linux will be written in Rust in 2030 i guess.

            Comment


            • #7
              Originally posted by milkylainen View Post

              For the kernel, a PHY driver with 135 LOC is going to be like 90% call and interface structure and 5% misc and 5% setting a couple of registers.
              Move along people. There really isn't anything to see here.
              The purpose of doing things like these is to test their hypotheses about what Rust bindings to kernel interfaces need to look like to be good.

              Comment


              • #8
                Originally posted by NotMine999 View Post
                IMHO - Rust is for programmers that failed at learning to write proper C production code ... since I doubt that anyone can write proper C++ production code.
                Which is why they're doing this. Because the programmers who write 3rd-party drivers apparently did fail to learn to write proper C production code.

                This is their alternative to Microsoft's approach of "We're sick of getting blamed for crashes and security holes originating in third-party drivers. From now on, the kernel will only accept Microsoft-signed drivers outside of dev mode."

                Comment


                • #9
                  Originally posted by NotMine999 View Post
                  IMHO - Rust is for programmers that failed at learning to write proper C production code
                  Funny, a quick look through my local CVE database tells me that pretty much everyone failed at learning to write proper C production code.

                  Comment


                  • #10
                    Originally posted by ssokolow View Post

                    Which is why they're doing this. Because the programmers who write 3rd-party drivers apparently did fail to learn to write proper C production code.

                    This is their alternative to Microsoft's approach of "We're sick of getting blamed for crashes and security holes originating in third-party drivers. From now on, the kernel will only accept Microsoft-signed drivers outside of dev mode."
                    That's two different things. The one thing you're pointing to are people writing shitty code.
                    That isn't going to improve just because you call the language Rust.
                    Code with access to even more intricate kernel structures are still going to break things if they don't behave.

                    You won't be much happier because a Rust driver trashes your storage controller registers and fills the drive with trash.

                    Now.. some classes of problems might become far less frequent.
                    While that is a win, it doesn't mean code will be perfect or that substandard coders won't trash even more stuff.

                    Stop blaming everything on C

                    Comment

                    Working...
                    X