4 ms·
Obligatory could this have been done in rust and work the same without the vulnerability? Or are there some problems that make it unreasonable to do?
by devwastaken 5y ago
Obligatory could this have been done in rust and work the same without the vulnerability? Or are there some problems that make it unreasonable to do?
- smoldesu 5y agoThere are very few things C can do that Rust can't, but there are lots of things you probably shouldn't use Rust for: this being one of them. On a purely speculative level though? Sure, it's totally possible as long as you're willing to break out a few unsafe blocks.
- steveklabnik 5y agoWhy is Rust a "shouldn't" here? (And usually, parsing doesn't require any unsafe blocks, though it's not 100% clear to me exactly if this would or would not require it if things were written in Rust. It also depends on how much is... it's not a simple yes or no, which is one reason why I am curious about your opinion.)
- Seirdy 5y agoI'd imagine that portability along with avoiding the need to add a significant dependency to the kernel's core toolchain (rustc, llvm) are two reasons. Rust's involvement in the kernel is mostly relegated to less-essential modules for a reason.