Skip to content

Disable use of Linux memory protection keys #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libexec/extract-node
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ cd "${src}/node-v${version}"
#patch -p1 < "${top}"/patch/gyp-libv8_monolith.patch
#patch -p1 < "${top}"/patch/py2-icutrim.patch
#patch -p1 < "${top}"/patch/py2-genv8constants.patch
patch -p1 < "${top}"/patch/v8-disable-pkey.patch

# TODO: the following still fails on py3 so the above one forcing py2 is needed
# patch -p1 < ../../py3-genv8constants.patch
Expand Down
17 changes: 17 additions & 0 deletions patch/v8-disable-pkey.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/deps/v8/src/base/build_config.h b/deps/v8/src/base/build_config.h
index 9ed4c8f102..dfca698506 100644
--- a/deps/v8/src/base/build_config.h
+++ b/deps/v8/src/base/build_config.h
@@ -35,11 +35,8 @@
#define V8_HAS_PTHREAD_JIT_WRITE_PROTECT 0
#endif

-#if defined(V8_OS_LINUX) && defined(V8_HOST_ARCH_X64)
-#define V8_HAS_PKU_JIT_WRITE_PROTECT 1
-#else
+// disabled, see https://issues.chromium.org/issues/360909072
#define V8_HAS_PKU_JIT_WRITE_PROTECT 0
-#endif

#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X64)
#define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK true