3 ms·
> what's the point of rewriting it in Rust The fact that you don't have to write C and also that you can have different API semantics. E.g. you can pass user s
by adamnemecek 7y ago
> what's the point of rewriting it in Rust
The fact that you don't have to write C and also that you can have different API semantics. E.g. you can pass user space code (say callbacks) to the kernel while maintaining safety.
- monocasa 7y agoI don't see a world where they allow "run this user code as ring 0".
- adamnemecek 7y agoI do. If it's a callback and all arguments are passed in, it's fine.
- monocasa 7y agoIt can literally take control of the machine. Even if it's written in Rust, there's no "this binary used an unsafe block" on binaries. If they're signing and proving everything, then what's the purpose of sticking that code in user space to begin with?
- fulafel 7y agoThere does exist a precedent in tha mainframe world of trusted compilers and mechanisms of verifying that a piece of code was produced by the blessed compiler. I guess the embedded version of this would have to be an offline compiler & code signing based system, and the language would need to be much more sandboxy than Rust.
- adamnemecek 7y agoI know maybe you are writing a driver or smth.
- asveikau 7y agoBad idea in the wake of Spectre and meltdown. You want user code in a different address space for those reasons these days. Unless you mean more like using the user callback in the same way, say, a posix signal handler works, or Microsoft's SEH or APCs, then I would say it's already possible with a C ABI, citing those things as examples.