Announcement

Collapse
No announcement yet.

Linux's V4L2 VP9 Codec Kernel Code Rewritten In Rust For Better Memory Safety

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

  • #11
    Originally posted by Volta View Post

    What's so amazing? Rust is far from maturity of C and code written in Rust is much harder to read and follow IMO. I'm waiting for large project written in Rust to see if it's really capable of replacing C. So far there are only tiny projects which are doing simple tasks. I'd love to see PostgreSQL equivalent. It's so much hype and promises about Rust, but nothing interesting to see so far. The order should be different.
    "only small projects" https://github.com/uutils/coreutils

    Comment


    • #12
      Originally posted by Volta View Post
      Rust is far from maturity of C and code written in Rust is much harder to read and follow IMO.
      It depends. I know both rust an C and currently program C at work. I find rust code easier to follow, usually, since usually there is a less boilerplate for doing the same thing.

      I'm waiting for large project written in Rust to see if it's really capable of replacing C. So far there are only tiny projects which are doing simple tasks.
      It would seem you are not aware of many rust projects.
      Take https://github.com/quickwit-oss/tantivy as an example.
      Or https://github.com/qdrant/qdrant.
      Not trivial projects.
      Last edited by oleid; 28 February 2024, 04:59 AM.

      Comment


      • #13
        Originally posted by darkonix View Post

        That's not exactly what's happening. The Linux kernel is not being rewritten in Rust at this time. Some new drivers are being developed in Rust and a few are being rewritten in Rust.
        And that really is the best of both worlds. The kernel stays put, while drivers, a prime source of bugs get to try Rust. If it works out, everybody wins. If it doesn't, only one driver is affected.

        Comment


        • #14
          Originally posted by Shnatsel View Post
          Considering the terrible track record of both software and hardware video decoders when it comes to memory safety vulnerabilities, this is sorely needed, and I am excited to see it happen!
          That is "off-topic". There are no media codecs in the linux kernel and there will not be any. It is related to the v4l2 interface that move data and control back and forth hardware decoder drivers.

          Some bits of the codecs are in the kernel because stateless decoders require the software to keep metadata and handle some of the decoding state, but no decoding happens in the kernel.
          Last edited by blackshard; 28 February 2024, 05:17 AM.

          Comment


          • #15
            Originally posted by Volta View Post

            What's so amazing? Rust is far from maturity of C and code written in Rust is much harder to read and follow IMO. I'm waiting for large project written in Rust to see if it's really capable of replacing C. So far there are only tiny projects which are doing simple tasks. I'd love to see PostgreSQL equivalent. It's so much hype and promises about Rust, but nothing interesting to see so far. The order should be different.
            Well, almost nothing is as mature as C, since it was created in the 60s. But, Rust is far from immature, it is almost 9 years since it reached 1.0 and was classified as stable. It is also officially certified for use in safety critical environments https://ferrous-systems.com/blog/off...ied-ferrocene/ . And about rust being able to replace C, there is the small project called Microsoft Windows, that have started to to pretty much the same thing as was proposed in this post, to replace critical C/C++ code with Rust. Latest versions of Windows is shipped with parts written in rust as far as I understand it.

            Comment


            • #16
              Originally posted by Volta View Post
              What's so amazing?
              Kernel getting provable safety features of course.

              Rust is far from maturity of C
              And I'm always far from the maturity that my parents have (at least until they die). Was this supposed to be an argument?
              and code written in Rust is much harder to read and follow IMO.
              What? Harder to read and follow than C? I see, only in your opinion, that might very well be. Because for the typical programmer that would be the other way around.

              Even if you never heard about rust as C programmer, you could very easily understand rust code. Writing of course is a different beast.

              Comment


              • #17
                Originally posted by Volta View Post

                What's so amazing? Rust is far from maturity of C and code written in Rust is much harder to read and follow IMO. I'm waiting for large project written in Rust to see if it's really capable of replacing C. So far there are only tiny projects which are doing simple tasks. I'd love to see PostgreSQL equivalent. It's so much hype and promises about Rust, but nothing interesting to see so far. The order should be different.
                All of your concerns (most of which are non-concerns) are trumped by security issues/critical bug's (of which there have been plenty in this area) because as is empirically evident, C is absolutely terrible in this regard.

                Or to put it differently, C is incredibly immature (i.e. 40-50 years) when it comes to memory safety.

                Comment


                • #18
                  Originally posted by Volta View Post

                  What's so amazing? Rust is far from maturity of C and code written in Rust is much harder to read and follow IMO. I'm waiting for large project written in Rust to see if it's really capable of replacing C. So far there are only tiny projects which are doing simple tasks. I'd love to see PostgreSQL equivalent. It's so much hype and promises about Rust, but nothing interesting to see so far. The order should be different.
                  Is the COSMIC desktop environment not a large project? What about Redox OS, which is an entire operating system from the microkernel to its desktop applications? Speaking of databases, SurrealDB exists. When will people stop making excuses to avoid using Rust?

                  Comment


                  • #19
                    I'm patiently waiting for first memory leak or memory corruption in that rust code ..

                    Comment


                    • #20
                      Originally posted by kloczek View Post
                      I'm patiently waiting for first memory leak or memory corruption in that rust code ..
                      You're going to be waiting a very, very long time. Even if there were, one vulnerability per million lines of code is better than one vulnerability per thousand lines of code.

                      Comment

                      Working...
                      X