Intent to prototype: WebAssembly relaxed SIMD

125 views
Skip to first unread message

Lars Hansen

unread,
Apr 22, 2021, 5:08:45 AM4/22/21
to dev-pl...@mozilla.org
Summary: Adds SIMD instructions with locally nondeterministic semantics to account for different behavior in different instruction sets and sometimes within different members of the same CPU family.  Local nondeterminism can take the form of different approximations, differing NaN behavior, differing rounding behavior, and differing response to some subset of inputs, to mention only some.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1706922


Platform coverage:  x86, x64, arm64 (same as Wasm SIMD).

Preference: javascript.options.wasm_relaxed_simd

DevTools bug: No bug, I don't believe any work is required here.

Other browsers: Google is championing the proposal but has not signaled anything publicly at this time.  We expect them to strongly back this proposal.

web-platform-tests:  Tests will be imported + we will have internal tests, as for SIMD.

--lars

Martin Thomson

unread,
Apr 22, 2021, 5:44:18 AM4/22/21
to Lars Hansen, dev-pl...@mozilla.org
So this nondeterministic behaviour turns out to be a really great source of fingerprinting data in web audio. Because it is deterministic, for the same CPU. What, if anything, is being done here to manage that risk for this API?

Brave had some tricks for web audio (that don't appear effective in practice), but I can't see those working in this case.

--
You received this message because you are subscribed to the Google Groups "dev-pl...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform...@mozilla.org.
To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAHOPy%3Do%2B3GKSRxnipkAH5BoJiuZu%2Bj%3D1Bd3eEbzhu8BinGqugA%40mail.gmail.com.

Lars Hansen

unread,
Apr 22, 2021, 6:04:11 AM4/22/21
to Martin Thomson, dev-pl...@mozilla.org
Fingerprinting is something the group is concerned about.  The issue becomes whether you can discover something that you couldn't (easily) discover already.  It is my understanding that it's already possible to distinguish between, say, Intel and ARM64 by inspecting the specific payload or sign bits computed for certain NaNs.  And with Wasm SIMD, it is already possible to distinguish between "older" Intel chips and newer ones because SIMD is only supported on the newer ones.  (In Firefox, we don't even support SIMD at all on 32-bit ARM, so there's a bit.)  On some families of chips, the performance of some instructions is so awful that it's likely possible to sniff those chips using differential performance.  64-bit systems can easily be distinguished from 32-bit.  And so on.  Obviously we don't want to make it worse than it is but this space is already fairly effectively explorable from JS and wasm.

My take on this is that for each of the instructions proposed we'll need to analyze it for how much it improves fingerprinting in practice / how valuable that bit of fingerprinting information can be.  We are discussing the possibility of / need for external review for fingerprintability.  It's early days still, and for serious numerical computation some of these instructions are likely crucial, but fingerprinting concerns are very high on the agenda.

--lars
Reply all
Reply to author
Forward
0 new messages