Skip to content

Commit

Permalink
[v8] Disable Wasm code protection by default
Browse files Browse the repository at this point in the history
V8 has an implication that makes lazy compilation disable mprotect-based
code protection (see https://crrev.com/c/3627596).
This implication is ignored in Chrome though since the flag is currently
explicitly enabled. Since lazy compilation is now enabled by default
(https://crrev.com/c/4023373), we should disable code protection.

Note that protection via PKU (which is much stronger and faster) is
still enabled.

R=​ahaas@chromium.org, jam@chromium.org

(cherry picked from commit 9a48361)

Bug: v8:12852
Change-Id: I55c0959ecdc85aa2253f40f443ce85a449adb4a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4023869
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1072399}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4061295
Reviewed-by: Prudhvikumar Bommana <pbommana@google.com>
Commit-Queue: Prudhvikumar Bommana <pbommana@google.com>
Owners-Override: Prudhvikumar Bommana <pbommana@google.com>
Commit-Queue: Srinivas Sista <srinivassista@chromium.org>
Cr-Commit-Position: refs/branch-heads/5359@{#1014}
Cr-Branched-From: 27d3765-refs/heads/main@{#1058933}
  • Loading branch information
backes authored and Chromium LUCI CQ committed Nov 28, 2022
1 parent e278d93 commit b3d801b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/public/common/content_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ BASE_FEATURE(kWebAssemblyBaseline,
// Enable memory protection for code JITed for WebAssembly.
BASE_FEATURE(kWebAssemblyCodeProtection,
"WebAssemblyCodeProtection",
base::FEATURE_ENABLED_BY_DEFAULT);
base::FEATURE_DISABLED_BY_DEFAULT);

#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64)
// Use memory protection keys in userspace (PKU) (if available) to protect code
Expand Down

0 comments on commit b3d801b

Please sign in to comment.