3 ms·
Is Javascript in Linux kernel an end?
by orangepanda 4y ago
Is Javascript in Linux kernel an end?
- sph 4y agoOf course it is. https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death... Jokes aside, I wouldn't be surprised to see WASM in the kernel one day, perhaps to replace eBPF.
- api 4y agoThere is at least one WASM runtime for the kernel but not to run WASM in the kernel. It's to have a platform-independent WASM user space.
- lioeters 4y ago> WASM in the kernel This may not be too crazy of an idea, it would enable fine-grained secure sandboxing like what Firefox is doing. Securing Firefox with WebAssembly - https://hacks.mozilla.org/2020/02/securing-firefox-with-webassembly/ https://hacks.mozilla.org/2020/02/securing-firefox-with-weba... Practical third-party library sandboxing with RLBox - https://rlbox.dev/ https://rlbox.dev/
- mmis1000 4y agoYep. The wasm don't even have a primitive to access to its own executable. Let alone modification and cause RCE. Bound checking definitely have overheads so you wouldn't expect it to suit all workloads, but for most workload the trade-off would be probably acceptable. And it would probably enable a universal linux driver that runs independent to cpu arch.
- Teknoman117 4y agoI highly doubt that. The whole point of eBPF is that it's a limited subset of an execution environment that not only provides a memory safe environment, but just as crucially all eBPF programs are guaranteed to terminate. It's not a general purpose computation environment in a strict sense.
- voxic11 4y agoafaik the eBPF vm used by the linux kernel can run programs that never complete, those programs are representable in eBPF bytecode just like they are in WASM bytecode. To prevent running eBPF programs that never terminate the linux kernel runs static analysis over the eBPF bytecode when its loaded, I would think similar analysis could be run over WASM bytecode to ensure it terminates.
- deleted 4y ago[deleted]