[wasm] Add some documentation on code space limit

This documents the outcome of the discussion with chromium security
guts.

R=ecmziegler@chromium.org

Change-Id: I55835fe5b40e3daf856a8ec1d5ef0d3fed5adb4c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2375386
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69563}
This commit is contained in:
Clemens Backes 2020-08-25 16:28:23 +02:00 committed by Commit Bot
parent ddf30bea13
commit 7266c848fe

View File

@ -187,6 +187,10 @@ constexpr int kElidedFrameSlots = 0;
constexpr int kDoubleSizeLog2 = 3;
// Total wasm code space per engine (i.e. per process) is limited to make
// certain attacks that rely on heap spraying harder.
// This limit was increased to 2GB in August 2020 and we have security clearance
// to increase to 4GB if needed.
constexpr size_t kMaxWasmCodeMB = 2048;
constexpr size_t kMaxWasmCodeMemory = kMaxWasmCodeMB * MB;