Lurker News

Comments (374) 58 threads

Earlier comments
throwaway2037#
For anyone too lazy to read the full article, the last line says it all:

    > Sit and bask in that insanity. That is Firefox, on Linux compiled to WebAssembly, in a Firefox tab, loading the site and then loading Firefox again inside itself.
I can remember more than 10 years ago seeing a GNOME app run from a web browser. I cannot remember how it worked, but it was a similar kind of Inception feeling when you saw it.
orangea#
Wow, I love this. Emulating system calls or posix-like userspace seems like a better approach for most tasks, which don't use 90% of Linux's userspace API surface.

Suggestion: remove `.description { overflow: hidden; }`

swiftcoder#
I did not expect someone to get the nested browser-in-a-browser running this soon. Bravo!
__MatrixMan__1 reply#
If these builds are running in a WASM environment, it means we can enforce stricter control over them than was available when they were originally authored. Rather than having it be a convention that using a source of randomness in your builds is a bad idea, we can just take the random number generator away from the build. Rather than suggesting that network connections in builds are likely problematic, we can deny the build access to the network and ensure it still runs. The nix sandbox can only go so far to encourage determinism, but I think wasm can take it even further.
clhodapp1 reply#
What can WASM do in terms of sandboxing that a build environment in a VM couldn't?
__MatrixMan__#
Without host imports, WASM has no clock, no randomness, and no threads unless you grant them, so execution is closer to fully deterministic.

If we can determine with high confidence that a particular derivation is in fact deterministic, we can memoize it: just look up the output rather than compute it. If we can get to a place where everything is memoizable in that way, we can build a map between compiled binaries and the code that generated them... no decompiling, just search and find it. From there we can reach further back: Who has reviewed this? Who has tested it? Has anybody raised an alarm about it? These could be gossiped annotations on nodes in the derivation graph, some of which will correspond to binaries that a potential victim is about to execute.
And if we can get all of that working, we can make our operating systems much smarter about their "are you sure you want to run this?" messages, as well as improvements to our ability to quickly understand the blast radius of bugs, because "am I affected" becomes a matter of graph traversal within the same dataset that would support the memoization.

Load more comments