4 ms·
It is entertaining to observe that how - after the bullshit and propaganda phase - Rust now slowly enters reality and the excuses for problems that did not magi
by uecker 10mo ago
It is entertaining to observe that how - after the bullshit and propaganda phase - Rust now slowly enters reality and the excuses for problems that did not magically disappear are now exactly the same as what we saw before from C programmers and which Rust proponents would have completely dismissed as unacceptable in the past ("this CVE is not exploitable", "all programmers make mistakes", "unwrap should never been used in production", "this really is an example how fantastic Rust is").
- simonask 10mo agoYou have a wild amount of confirmation bias going on here, though. Of course, this bug was in an `unsafe` block, which is exactly what you would expect given Rust's promises. The promise of Rust was never that it is magical. The promise is that it is significantly easier to manage these types of problems.
- uecker 10mo agoThere were certainly a lot of people running around claiming that "Rust eliminates the whole class of memory safety bugs." Of course, not everybody made such claims, but some did. Whether it is "significantly easier" to manage these types of problems and at what cost remains to be seen. I do not understand you comment about "confirmation bias" as did not make a quantitative prediction that could have bias.
- ivanbakel 10mo ago> There were certainly a lot of people running around claiming that "Rust eliminates the whole class of memory safety bugs." Safe Rust does do this. Dropping into unsafe Rust is the prerogative of the programmer who wants to take on the burden of preventing bugs themselves. Part of the technique of Rust programming is minimising the unsafe part so memory errors are eliminated as much as possible. If the kernel could be written in 100% safe Rust, then any memory error would be a compiler bug.
- uecker 10mo agoYes, but this is the marketing bullshit I am calling out. "Safe Rust" != "Rust" and it is not "Safe Rust" which is competing with C it is "Rust".
- simonask 10mo agoThis is just so obtuse. Be serious. Even if you somehow manage to ignore the very obvious theoretical argument why it works, the amount of quantitative evidence at this point is staggering: Rust, including unsafe warts and all, substantially improve the ability of any competent team to deliver working software. By a huge margin. This is the programming equivalent of vaccine denialism.
- uecker 10mo agoThere is a lot of science showing vaccines work. For Rust showing that it is better this is still lacking. And no Google's blog posts are not science.
- Daishiman 10mo agoSo kernel devs claiming Rust works isn't good enough? CloudFlare? Mozilla? Your're raising the bar to a place where no software will be good enough for you.
- ivanbakel 10mo ago> it is not "Safe Rust" which is competing with C it is "Rust". It is intended that Safe Rust be the main competitor to C. You are not meant to write your whole program in unsafe Rust using raw pointers - that would indicate a significant failure of Rust’s expressive power. Its true that many Rust programs involve some element of unsafe Rust, but that unsafety is meant to be contained and abstracted, not pervasive throughout the program. That’s a significant difference from how C’s unsafety works.
- uecker 10mo ago
- UltraSane 10mo agoSafe Rust absolutely eliminates entire categories of bugs
- yourdetect 10mo ago> Of course, this bug was in an `unsafe` block, which is exactly what you would expect given Rust's promises. The fix was outside of any Rust unsafe blocks. Which confused a lot of Rust developers on Reddit and elsewhere. Since fans of Rust have often repeated that only unsafe blocks have to be checked. Despite the Rustonomicon clearly spelling out that much more than the unsafe blocks might need to be checked in order to avoid UB.
- simonask 10mo agoRust fanboys on Reddit are not contributing to the Linux kernel. What matters here is that Rust helps serious people deliver great code.
- yencabulator 10mo agoThe unsafe code relied on an assumption that was not true; the chosen fix was to make that assumption be true. Makes perfect sense to me.
- dwattttt 10mo agoIs it any more or less amusimg, or perhaps tedious, watching the first Rust Linux kernel CVE be pounced on as evidence that "problems .. did not magically disappear"? Does anyone involved in any of this work believe that a CVE in an unsafe block could not happen?