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

  • #11
    Originally posted by bachchain View Post

    Funny, a quick look through my local CVE database tells me that pretty much everyone failed at learning to write proper C production code.
    A lot of those failures have very little to do with C.
    And most of the bugs fixed in products in general have very little to do with security issues.
    If you start a project in 2023, use modern tooling and aren't a total dimwit, you're not going to have a lot of security issues.

    Comment


    • #12
      Originally posted by milkylainen View Post

      A lot of those failures have very little to do with C.
      And most of the bugs fixed in products in general have very little to do with security issues.
      If you start a project in 2023, use modern tooling and aren't a total dimwit, you're not going to have a lot of security issues.
      The stats seem to pretty consistently point to memory safety issues as being 70-80% of security issues.

      Nobody is saying C is the cause of all problems, or that not using C will result in perfection. But if it cuts even half of security issues, that's a massive win.

      If your argument boils down to "programmers shouldn't be shitty" that's just not something that can be done in the real world. That's like saying we shouldn't create debuggers because real programmers will just write everything correctly the first time.
      Last edited by smitty3268; 17 December 2023, 06:18 PM.

      Comment


      • #13
        Originally posted by NotMine999 View Post
        IMHO - Rust is for programmers that failed at learning to write proper C production code
        "C is for programmers that failed at learning to write proper Assembly production code" - somebody in the 80's.

        Comment


        • #14
          Originally posted by erniv2 View Post
          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.
          Yeah, keep dreaming. I bet messenger from facebook is written in memory safety language and it's one of the most broken piece of crap I've ever used. They should change their stupid article to "the urgent need for good programmers".

          Comment


          • #15
            Originally posted by dragon321 View Post

            "C is for programmers that failed at learning to write proper Assembly production code" - somebody in the 80's.
            And they weren't wrong (and I was one of the people saying that at the time). Since then however, complexity of processors increased by several orders of magnitude and compilers stopped being shit.

            Comment


            • #16
              Originally posted by NotMine999 View Post
              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.
              Can we get a rest from these moronic comments seriously ? How thick can you get to write something like that ?

              Comment


              • #17
                Originally posted by NotMine999 View Post
                Only 135 LOC. Ok...

                ...but what is the extra added overhead required to compile those few lines of code?
                The rule of thumb is, for every 1 line of Rust code, you have 20 lines of manual bindings code, 200 lines of autogenerated bindings code and 2 ratty dependencies from NPM-style crates.io.
                Last edited by kpedersen; 17 December 2023, 07:05 PM.

                Comment


                • #18
                  Rust is particularly well suited for driver development, so great to see at least one driver from it.

                  Comment


                  • #19
                    Originally posted by milkylainen View Post

                    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.
                    If that happens orders of magnitude less often, then I WILL be much happier.

                    Originally posted by milkylainen View Post
                    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.
                    The only ones who ever talk about perfect code are the naive types who believe that the answer is to "write g0Od c0d3". Stuff will still get trashed, but with a language enforcing (that's the operative word: ENFORCING) much more exacting rules, it will become an exception rather than the norm as it is today.

                    Originally posted by milkylainen View Post
                    Stop blaming everything on C
                    Not everything, just all the stuff it should be blamed and shamed for. Which is a lot. From a programming language-theoretical point of view, C has very few redeeming qualities if any. Even by the 1970s' standards.

                    Comment


                    • #20
                      Originally posted by milkylainen View Post

                      A lot of those failures have very little to do with C.
                      And most of the bugs fixed in products in general have very little to do with security issues.
                      If you start a project in 2023, use modern tooling and aren't a total dimwit, you're not going to have a lot of security issues.
                      Have a look at the number of CVEs in the Linux kernel that were caused by C this year alone. I wouldn't call the kernel developers "dimwits" and that's exactly the reason why many of them welcome a path to move away from C.

                      Comment

                      Working...
                      X