Hacker News new | past | comments | ask | show | jobs | submit login

But people are claiming you can't write a safe kernel in C, and point out safe languages which should be adopted in its place. This misses the point that, just like the theoretical safety of C is 100% safe, the theoretical safety of Rust as a low-level language is zero.

Those are all bugs produced essentially on request. That doesn't bode well for the security and robustness of the project. The end user doesn't care whether the class of bug is memory related or whatever else if the end consequences are the same. Despite having the benefit of safety and the decreased burden on the programmer this offers, bugs still abound in Redox, which points to it being written in Rust as incidental at best.




Don't gloss over the distinction between security and robustness. The consequences of panics and memory corruption are very much NOT the same. The former means a reboot, which is annoying; the latter means corrupted or exfiltrated data or a hostile takeover of the system.


It's hard to tell what argument you're making, but it sounds something like "All languages whose safety is less than 100% are equally safe". Obviously Rust is safer than C (both in theory and in practice, both for high- and low-level programming).

NOTE: Observers should resist the temptation to interpret this post as an endorsement for the "rewrite everything in Rust!" crowd.


Nobody has ever said that it is impossible to write buggy code in Rust. It merely makes security guarantees about certain classes of bugs, and the use of unsafe code blocks makes it easier to isolate cases where those classes of bugs can occur.


Just go watch the talks from Linux Security Summit 2018.

https://www.youtube.com/watch?v=KUCwiQZuasA&list=PLbzoR-pLrL...

Linux kernel developers are the first ones to acknowledge that something has to be done to change the course of CVE in the Linux kernel.

Just in 2017, 68% of exploits were caused by out of bounds errors.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: