News for hackers. Stuff that matters.
Re:Firefox’s new streaming and tiering compiler by sjrd on Wednesday January 17, 2018 @12:11PM (#16169642)
That would assume you trust the server not to give you malicious machine code (which you of course cannot!). wasm is specified in such a way that it is still sandboxed by the VM that compiles it. If you fetch arbitrary machine code, you cannot verify it and that leads to huge security holes!
Re:Firefox’s new streaming and tiering compiler by chrisseaton on Wednesday January 17, 2018 @01:45PM (#16170545)
> which you of course cannot!

Didn't Google's NaCL implement verification of sandboxed machine code?

Re:Firefox’s new streaming and tiering compiler by sjrd on Wednesday January 17, 2018 @02:56PM (#16171198)
Maybe, but at what cost? I wouldn't be surprised if the cost of verifying the machine code was higher than the cost of compiling wasm to machine code.
Re:Firefox’s new streaming and tiering compiler by hateduser2 on Wednesday January 17, 2018 @01:58PM (#16170659)
Why can’t you just cache it with a hash?
Re:Firefox’s new streaming and tiering compiler by icebraining on Wednesday January 17, 2018 @02:05PM (#16170730)
How would the client know the hash is valid?
Re:Firefox’s new streaming and tiering compiler by Zpalmtree on Wednesday January 17, 2018 @02:20PM (#16170861)
Perhaps he means you compile the code locally, hash it, and then next time you can fetch the compiled code from a server, and check the hash matches?
Re:Firefox’s new streaming and tiering compiler by icebraining on Wednesday January 17, 2018 @02:55PM (#16171191)
That's possible; a kind of second-level cache. That assumes the compilation is reproducible, though.