New issue
Advanced search Search tips

Issue 840292 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 1
Type: Bug



Sign in to add a comment

Increase WebAssembly code space

Project Member Reported by clemensh@chromium.org, May 7 2018

Issue description

On architectures where we cannot easily allocate more code space because all code needs to be within a limited distance (e.g. on x64), we currently always allocate 256MB of code space for WebAssembly.
This limit (kMaxWasmCodeMemory) is defined in globals.h:
https://cs.chromium.org/chromium/src/v8/src/globals.h?sq=package:chromium&dr=CSs&l=182

We already had cases where this space was not sufficient (see issue 723899).

With the launch of Liftoff (see issue 787421), we will again increase the generated code size, at least temporarily (Liftoff code is bigger than Turbofan code).

Thus we would like to bump the wasm code space to 512MB.
Seeking for approval from security folks.
 
Cc: -palmer@chromium.org clemensh@chromium.org
Labels: -M-68 Security M-69
Owner: palmer@chromium.org
Autodesk is now also hitting the code space limit of 256 MB with bigger WebAssembly modules.

Assigning to palmer@ for approval to increase the code space, or advice on how to proceed otherwise.
Cc: -clemensh@chromium.org awhalley@chromium.org tsepez@chromium.org rsesek@chromium.org palmer@chromium.org wfh@chromium.org
Components: Security Internals>Sandbox
Labels: -Security OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac OS-Windows
Owner: clemensh@chromium.org
I don't see any alternative to increasing the code space size. Thanks for asking us, and I think we have to say Go For It.

Any thoughts from other Platform Security Team peeps?
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 3

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/0fd6ef88d5fd3dcfa30b4e337288dd30a0dad882

commit 0fd6ef88d5fd3dcfa30b4e337288dd30a0dad882
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Fri Aug 03 09:30:31 2018

[wasm] Increase maximum wasm code space to 512 MB

On all architectures except for arm64 (which has a limit of 128 MB), we
increase the maximum wasm code space from 256 MB to 512 MB. This
generally allows for bigger WebAssembly modules and tolerates the code
size increase because of Liftoff.

R=titzer@chromium.org

Bug:  chromium:840292 , v8:6600
Change-Id: I999cc0c96740ad3da15cc70114d7835354d67fbf
Reviewed-on: https://chromium-review.googlesource.com/1160702
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54890}
[modify] https://crrev.com/0fd6ef88d5fd3dcfa30b4e337288dd30a0dad882/src/globals.h

Labels: Merge-Request-69
Status: Fixed (was: Assigned)
Increased the code space to 512 MB. This should be merged to the M-69 branch.
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 3

Labels: -Merge-Request-69 Merge-Review-69 Hotlist-Merge-Review
This bug requires manual review: M69 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: hablich@chromium.org
Labels: -Merge-Review-69 Merge-Approved-69
Please merge after some Canary coverage (Monday?).
NextAction: 2018-08-06
Please merge your change to M69 branch 3497 by 4:00 PM PT, Monday (08/06) so we can pick it up for next week M69 beta release. Thank you.
Project Member

Comment 10 by bugdroid1@chromium.org, Aug 6

Labels: merge-merged-6.9
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/7093816ceb585d8985d80de93506b4d6ad584922

commit 7093816ceb585d8985d80de93506b4d6ad584922
Author: Clemens Hammacher <clemensh@chromium.org>
Date: Mon Aug 06 08:11:46 2018

Merged: [wasm] Increase maximum wasm code space to 512 MB

On all architectures except for arm64 (which has a limit of 128 MB), we
increase the maximum wasm code space from 256 MB to 512 MB. This
generally allows for bigger WebAssembly modules and tolerates the code
size increase because of Liftoff.

R=​titzer@chromium.org

No-Try: true
No-Presubmit: true
No-Treechecks: true
Bug:  chromium:840292 , v8:6600
Change-Id: I815d5e290d4184eb48f4f17b36644e495f72dee8
Originally-reviewed-on: https://chromium-review.googlesource.com/1160702
Reviewed-on: https://chromium-review.googlesource.com/1163461
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/branch-heads/6.9@{#23}
Cr-Branched-From: d7b61abe7b48928aed739f02bf7695732d359e7e-refs/heads/6.9.427@{#1}
Cr-Branched-From: b7e108d6016bf6b7de3a34e6d61cb522f5193460-refs/heads/master@{#54504}
[modify] https://crrev.com/7093816ceb585d8985d80de93506b4d6ad584922/src/globals.h

Labels: -Merge-Approved-69
NextAction: ----

Sign in to add a comment