Skip to content

Commit 0da18ae

Browse files
committed
Enable JITCage Relaxation on iOS
https://bugs.webkit.org/show_bug.cgi?id=325962 rdar://183646426 Reviewed by Yusuke Suzuki. JIT Cage can only be supported on macOS in its Relaxed configuration. Since this does not compromise any of the goals of the feature, it's better to use the same configuration on both macOS and iOS rather than maintain both in parallel. This patch enables JIT Cage Relaxation on iOS, replacing the previous pathways entirely. * Source/JavaScriptCore/Scripts/process-entitlements.sh: add necessary relaxation entitlements * Source/WTF/wtf/PlatformEnable.h: build to accomodate relaxation * Source/WebKit/Scripts/process-entitlements.sh: add necessary relaxation entitlements Canonical link: https://commits.webkit.org/323993@main
1 parent 75cdc5a commit 0da18ae

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎Source/JavaScriptCore/Scripts/process-entitlements.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ function ios_family_process_jsc_entitlements()
184184
# ensure that `Options::crashIfCantAllocateJITMemory` is disabled on non-JIT platforms
185185
if [[ "${PLATFORM_NAME}" != watchos && "${PLATFORM_NAME}" != appletvos ]]; then
186186
plistbuddy Add :com.apple.private.verified-jit bool YES
187+
plistbuddy Add :com.apple.private.verified-jit-mode integer 1
187188
if [[ "${PLATFORM_NAME}" == iphoneos ]]; then
188189
if (( $(( ${SDK_VERSION_ACTUAL} )) >= 170400 )); then
189190
plistbuddy Add :com.apple.developer.cs.allow-jit bool YES

‎Source/WTF/wtf/PlatformEnable.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,8 +968,7 @@
968968
#if OS(DARWIN) && ENABLE(JIT) && USE(APPLE_INTERNAL_SDK) && CPU(ARM64E) && HAVE(JIT_CAGE)
969969
#if HAVE(JIT_CAGE_RELAXATION) && !(PLATFORM(MAC) || PLATFORM(MACCATALYST))
970970
#define ENABLE_JIT_CAGE 1
971-
// FIXME: rdar://183646426
972-
#define ENABLE_JIT_CAGE_RELAXATION 0
971+
#define ENABLE_JIT_CAGE_RELAXATION 1
973972
#elif HAVE(JIT_CAGE_RELAXATION) && (PLATFORM(MAC) || PLATFORM(MACCATALYST))
974973
#define ENABLE_JIT_CAGE 0
975974
// FIXME: rdar://183649352

‎Source/WebKit/Scripts/process-entitlements.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ function ios_family_process_webcontent_entitlements()
471471
{
472472
if [[ "${PLATFORM_NAME}" != watchos && "${PLATFORM_NAME}" != appletvos ]]; then
473473
plistbuddy Add :com.apple.private.verified-jit bool YES
474+
plistbuddy Add :com.apple.private.verified-jit-mode integer 1
474475
if [[ "${PLATFORM_NAME}" == iphoneos ]]; then
475476
if (( $(( ${SDK_VERSION_ACTUAL} )) >= 170400 )); then
476477
plistbuddy Add :com.apple.developer.cs.allow-jit bool YES

0 commit comments

Comments
 (0)