Closed Bug 1648885 Opened 5 years ago Closed 5 years ago

Perform Spectre mitigations for WebAssembly on Cranelift/ARM64

Categories

(Core :: JavaScript: WebAssembly, defect, P1)

ARM64
Unspecified
defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: cfallin, Assigned: cfallin)

References

Details

Attachments

(1 file)

We need to Spectre-proof the heap bounds check for WebAssembly running on Cranelift on ARM64 (aarch64).

As per conversations with :bbouvier, it seems this should involve simply replicating the conditional-move protection that is seen in the ARM64 MacroAssembler's bounds-check code.

This work will entail landing a PR in Cranelift first, then updating our vendored version of Cranelift here.

A PR is open for Cranelift here (#1930).

Severity: -- → S3
Priority: -- → P1

This patch pulls in Cranelift revision
0a59a321bdecb6ddaab12c9097532cdb31f241f1, which incorporates several
relevant changes:

In order to adapt to the new Cranelift version's slight API changes in
the FuncEnvironment, we need to pull in cranelift-frontend as a
dependency (its type FunctionBuilder appears in the API now).

We also need to temporarily disable the wasm/limits.js jit-test
on Cranelift configurations because it now needs shared memory to work,
and the Cranelift backend does not support this yet. Given that this
should be ready in the next month at most (requires atomics support on
AArch64, which is currently being examined), it seems simpler to
temporarily disable the test on aarch64 than to try to disentangle the
bits that depend on shared memories explicitly.

Adding dep to Bug 1649929; fixing the breakage would be a better solution than just disabling wasm/limits.js.

Depends on: 1649929
Blocks: 1649932
Pushed by cfallin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/da778e8edbdc and Bug 1649432: vendor latest Cranelift to get Spectre mitigations and fix fuzzbug. r=bbouvier
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: