Highly related: https://github.com/nebulet/nebulet “(Going to be) A microkernel that implements a WebAssembly "usermode" that runs in Ring 0.” It’s inspired by the Microsoft experiment Singularity OS.
I'm glad more people are picking up on it.
21–30 of 61 posts
Highly related: https://github.com/nebulet/nebulet “(Going to be) A microkernel that implements a WebAssembly "usermode" that runs in Ring 0.” It’s inspired by the Microsoft experiment Singularity OS.
I'm glad more people are picking up on it.
Highly related: https://github.com/nebulet/nebulet “(Going to be) A microkernel that implements a WebAssembly "usermode" that runs in Ring 0.” It’s inspired by the Microsoft experiment Singularity OS.
I've been wondering for a while as to why nobody was trying to run an entire VM at ring 0, the benefits would be significant. I was just not aware that's what Singularity/Midori were doing. I'm glad more people are picking up on it.
Earlier quoted context omitted.
I've been wondering for a while as to why nobody was trying to run an entire VM at ring 0, the benefits would be significant. I was just not aware that's what Singularity/Midori were doing. I'm glad more people are picking up on it.
What are the benefits of doing so?
Do not run untrusted code at ring 0, regardless of software sandboxing technology. It's just too risky! Otherwise neat.
There's a difference between software sandboxing of native code and not being able to run native code at all. WA being an intermediate representation, it's a different story. I'm not saying there may not be flaws in WebAssembly or what Cervus delivers.
Again, do not run untrusted code at ring 0, regardless of sandboxing technology.
Highly related: https://github.com/nebulet/nebulet “(Going to be) A microkernel that implements a WebAssembly "usermode" that runs in Ring 0.” It’s inspired by the Microsoft experiment Singularity OS.
I've been wondering for a while as to why nobody was trying to run an entire VM at ring 0, the benefits would be significant. I was just not aware that's what Singularity/Midori were doing. I'm glad more people are picking up on it.
Having web assembly be a native subsystem... That's brilliant. Why has this not been attempted for Java or anything else for that matter? I guess you could count Microsoft's .NET implementation. In any case, you could extend this beyond just user mode. Currently the domain of safe ring0 execution is eBPF as far as I know, but this would be way more approachable and other operating systems could implement it. I've got…
It has. I remember there was Linux Journal article about it, almost 20 years ago, regarding Java. Also this is how mainframes like IBM i work. Binaries use the TIMI format and are JITed into native code at installation time or on demand, if needed.
On the other RM Stallman also resisted everything Java, because it did not mesh with his vision of the future. (Prop up everything GPL, unless the proprietary solution is already an industry standard.) My favourite example was how GCC was on the cusp of getting a backend which could emit Java byte code. Imagine that!
That could have kickstarted all the JVM languages a decade earlier. Alas, many forces were against such things.
Now, we have everything on everything, but most of all Javascript everywhere. Weird. :-)
WA in the kernel could lead to drivers being established as WA code with special interfaces. With safe interfaces to stuff like PCIe devices, the linux kernel could transform into a more hybrid kernel, similar to NT. Many funs to be had! I imagine it could also be useful to run user programs without having to switch rings all the time...
> I imagine it could also be useful to run user programs without having to switch rings all the time That is pretty much exactly what this project is aiming at: "Cervus implements a WebAssembly "usermode" on top of the Linux kernel (which tries to follows the CommonWA specification), enabling wasm applications to run directly in ring 0, while still ensuring safety and security."
Earlier quoted context omitted.
What are the benefits of doing so?
The cost of context switching is near zero. No need for expensive TLB flushes, for instance. No need for paged memory whose overhead sometimes accounts for up to 50% of program runtimes. Better isolation properties, since you can sandbox individual objects instead of whole processes.
Note that modern CPUs store a tag of the current "address space ID" next to the TLB line, thus the cost of the flushing is heavily reduced.
> No need for paged memory
Unless you mean swapping, this doesn't apply as x86_64 long mode requires paging to be enabled.
> I'm busy with my College Entrance Examination until ~June 10, 2018
This dude is in high school?! When I was your age I thought I was smart for writing a youtube scraper in PHP...
Awesome work, really creative solution. Good luck to you.