Live data from Hacker News

Cervus: A WebAssembly subsystem for Linux

github.com

11–20 of 61 posts

Re: Cervus: A WebAssembly subsystem for Linux

#11

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.

It could also be inspired by many others.

I suggest some reading about Xerox PARC and ETHZ OSes.

JNode and CosmOS are also interesting ones.

Re: Cervus: A WebAssembly subsystem for Linux

#13
post #7

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."

Re: Cervus: A WebAssembly subsystem for Linux

#14
post #5

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…

Isn't that what JVM actually is? Java subsystem for Linux/et. al?

Re: Cervus: A WebAssembly subsystem for Linux

#15
post #14
post #5

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…

Isn't that what JVM actually is? Java subsystem for Linux/et. al?

No, JVM makes syscalls to Linux. This makes calls, not syscalls, to Linux. There is no context switching.

Re: Cervus: A WebAssembly subsystem for Linux

#16

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.

That description sounds a lot like a unikernel-type system.

Re: Cervus: A WebAssembly subsystem for Linux

#17
post #5

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…

> Having web assembly be a native subsystem... That's brilliant. Why has this not been attempted for Java or anything else for that matter?

There have been CPUs which could execute Java bytecode directly…

And not just actual Java processors, ARM has/had an extension for that: https://en.wikipedia.org/wiki/Jazelle

Re: Cervus: A WebAssembly subsystem for Linux

#20
post #19

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.

Post reply on HN