4 ms·
> I don't see why it's so important to rewrite parts of the kernel in rust, or why Drew is so sympathetic to the cause. The linux project uses static analysis t
by pizlonator 2y ago
> I don't see why it's so important to rewrite parts of the kernel in rust, or why Drew is so sympathetic to the cause. The linux project uses static analysis tools which provide some of what rust guarantees (outside of unsafe).
It’s important because static analysis tools get nowhere near the coverage of a memory safe language.
Static analysis can find bugs but it cannot prove their absence. A memory safe type system proves absence. Rust’s type system proves absence module uses of unsafe, which is still much better than what any C static analysis could do.
(I am saying this as a Rust hater who’s trying to obviate the need for it.)
> The language isn't the problem, it's the architecture. In Linux, all of the drivers run with the rest of the kernel. A bad driver can take down the whole thing, or perform arbitrary badness.
This is a case of “why not both”.
Sure, you can harden an OS by compartmentalizing. And you can also harden using memory safety. As time goes on, folks will do both. The fact that you could (and should) do one of these things is not an argument to not do the other.
- e40 2y ago> It’s important because static analysis tools get nowhere near the coverage of a memory safe language It’s hard for me to believe a HN reader would not know this, especially given there are regular exploits revealed in the kernel.