New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 750378 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 722585



Sign in to add a comment

WebAssembly memories with guard regions quickly exceed renderer address space limit

Project Member Reported by eholk@chromium.org, Jul 28 2017

Issue description

When using trap-based bounds checking, each WebAssembly.Memory object requires 8GiB of address space for guard regions. The renderer process is currently limited at 16GiB, which means we can support at most one at a time. This is too few, so we need a way to let more than one exist at once.
 

Comment 1 by eholk@chromium.org, Aug 2 2017

Owner: eholk@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f35574bba03c09b60ca6fa4cb9428c873f3706ef

commit f35574bba03c09b60ca6fa4cb9428c873f3706ef
Author: Eric Holk <eholk@chromium.org>
Date: Thu Aug 10 21:06:36 2017

Dynamically adjust address space limit for array buffer reservations

WebAssembly memories with guard regions can quickly exhaust our address
space. This change raises the maximum address space limit on Linux x64
when WebAssembly's trap-based bounds checking feature is enabled to
4TiB. The soft limit stays at 16GiB, but is dynamically adjusted when
large WebAssembly memory regions are allocated and freed.

Bug:  750378 
Change-Id: I7c58c39ca93eb38f9c23c0954d6fb3fa1f26f118
Reviewed-on: https://chromium-review.googlesource.com/590758
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493542}
[modify] https://crrev.com/f35574bba03c09b60ca6fa4cb9428c873f3706ef/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
[modify] https://crrev.com/f35574bba03c09b60ca6fa4cb9428c873f3706ef/content/common/sandbox_linux/sandbox_linux.cc
[modify] https://crrev.com/f35574bba03c09b60ca6fa4cb9428c873f3706ef/sandbox/linux/services/resource_limits.cc
[modify] https://crrev.com/f35574bba03c09b60ca6fa4cb9428c873f3706ef/sandbox/linux/services/resource_limits.h
[add] https://crrev.com/f35574bba03c09b60ca6fa4cb9428c873f3706ef/third_party/WebKit/LayoutTests/external/wpt/wasm/create_multiple_memory.worker.js
[modify] https://crrev.com/f35574bba03c09b60ca6fa4cb9428c873f3706ef/third_party/WebKit/Source/platform/wtf/BUILD.gn
[modify] https://crrev.com/f35574bba03c09b60ca6fa4cb9428c873f3706ef/third_party/WebKit/Source/platform/wtf/DEPS
[modify] https://crrev.com/f35574bba03c09b60ca6fa4cb9428c873f3706ef/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.cpp

Comment 3 by eholk@chromium.org, Aug 11 2017

Status: Fixed (was: Untriaged)
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a28bda9e5ab17cd8107cac464a5f5d30b868f40f

commit a28bda9e5ab17cd8107cac464a5f5d30b868f40f
Author: Justin TerAvest <teravest@chromium.org>
Date: Wed Sep 06 16:39:17 2017

sandbox_linux: Allow setting limits via prlimit().

commit f35574bb "Dynamically adjust address space limit..." changed the
renderer policy on linux to permit setrlimit() to be called by the
process, specifically to allow dynamically adjusting the address space
limit.

Since glibc 2.13, the getrlimit() and setrlimit() wrappers invoke
prlimit(), which is why prlimit needs to be modified as well.

This has the added benefit of allowing the file descriptor soft limit to
be raised as well, helping on crbug.com/583730

BUG= 750378 ,583730
TEST=build

Change-Id: I1bc38698b617fd170a2cb260aefcd918f6105de4
Reviewed-on: https://chromium-review.googlesource.com/650566
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Justin TerAvest <teravest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499988}
[modify] https://crrev.com/a28bda9e5ab17cd8107cac464a5f5d30b868f40f/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
[modify] https://crrev.com/a28bda9e5ab17cd8107cac464a5f5d30b868f40f/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
[modify] https://crrev.com/a28bda9e5ab17cd8107cac464a5f5d30b868f40f/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h

Sign in to add a comment