6 ms·
I'd rather see unikernels written in Rust or any other memory-safe language. If we're going to start from scratch with this, let's do it right this time. 70%-9
by mtgx 7y ago
I'd rather see unikernels written in Rust or any other memory-safe language. If we're going to start from scratch with this, let's do it right this time.
70%-90% of bugs seem to be memory-related. Let's end that with a little bit of effort upfront for much fewer headaches in the long-term.
https://twitter.com/LazyFishBarrel/status/1153410070929203201 https://twitter.com/LazyFishBarrel/status/115341007092920320...
https://www.zdnet.com/article/microsoft-70-percent-of-all-security-bugs-are-memory-safety-issues/ https://www.zdnet.com/article/microsoft-70-percent-of-all-se...
https://security.googleblog.com/2019/05/queue-hardening-enhancements.html https://security.googleblog.com/2019/05/queue-hardening-enha...
- rwmj 7y agoThe entire point of this paper is not to start over from scratch, but to reuse existing software (Linux and memcached in this case), and fiddle with the linker command line and a little bit of glue to link them into a single binary. If you want to start over from scratch using a safe language then see MirageOS. Edit: I don't mean to say you have to use C for the "userspace" part of this. It should be possible -- in future -- to use any language for that. However at the end of the day you'll still be linking that with Linux (written in C) and glibc into a single binary that runs in one address space.
- edwintorok 7y agoSo this would be basically like rumpkernels but with Linux instead of BSD?
- rwmj 7y agoIt's kind of the opposite (AIUI). Rumpkernels run kernel code in userspace. We run userspace code and the kernel in kernel space.
- panpanna 7y agoWe need Rust to mature a bit before we can do that. Everything looks great on surface but as soon as you start doing low level coding a lot of issues pop up and you need the nightly compiler and xargo and some undocumented library for the boot sequence and whatnot. TL;DR: great idea. Let's just wait 2 years
- madmax96 7y agoWould you happen to have a link to some sources describing some of these issues?
- panpanna 7y agoChoose any "let's write an OS in Rust" project that has recently been featured on HN. Then try to follow it using the stable compiler (sudo apt install rustc) and see what happens. Maybe "work in progress" better describes the situation. We need to wait for the language to stabilize, then the tooling and finally the libraries before starting a huge project like writing an OS.