4 ms·
I am probably missing something: Why is WASM required here? Can't these analysis done directly on LLVM IR?
by chakkepolja 5y ago
I am probably missing something: Why is WASM required here? Can't these analysis done directly on LLVM IR?
- ink404 5y agoIt could be, seems like they already had something in WASM for doing this so it made more sense to use that than re do on LLVM IR.
- fooyc 5y agoThat's what I though too. C compilers should be able to achieve that directly, and it's incredible that nobody though of doing so yet. What's great, though, is that they are achieving this with tools that are already available.
- azakai 5y agoYou're right that this could be done on LLVM IR. The MinSFI project did exactly that basically, several years ago, but it did not see adoption sadly. The benefits of wasm over LLVM IR is that wasm has already done the work to define the sandboxed format and build the tooling to compile to it. Wasm is also almost as fast as running normally. (Wasm is also portable and lacks undefined behavior, although for this use case those might matter less.) See the MinSFI section here which compares it directly to wasm for sandboxing: https://kripken.github.io/blog/wasm/2020/07/27/wasmboxc.html https://kripken.github.io/blog/wasm/2020/07/27/wasmboxc.html And the original MinSFI presentation is here: https://docs.google.com/presentation/d/1RD3bxsBfTZOIfrlq7HzGMsygPHgb61A1eTdelIYOurs/htmlpresent https://docs.google.com/presentation/d/1RD3bxsBfTZOIfrlq7HzG...
- glandium 5y agoLLVM IR is still CPU dependent, and is a moving target. WASM is also a moving target, but much more controlled.