Title: [270548] branches/safari-610-branch/Source
- Revision
- 270548
- Author
- alanc...@apple.com
- Date
- 2020-12-08 12:04:58 -0800 (Tue, 08 Dec 2020)
Log Message
Cherry-pick r270052. rdar://problem/72099688
Use os_thread_self_restrict_rwx_is_supported instead of pthread_jit_write_protect_supported_np on Apple Internal SDK builds
https://bugs.webkit.org/show_bug.cgi?id=219099
<rdar://problem/71547048>
Reviewed by Mark Lam.
Source/_javascript_Core:
* assembler/FastJITPermissions.h:
(useFastJITPermissions):
(threadSelfRestrictRWXToRW):
(threadSelfRestrictRWXToRX):
Source/WTF:
* wtf/PlatformHave.h:
* wtf/PlatformUse.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610-branch/Source/_javascript_Core/ChangeLog (270547 => 270548)
--- branches/safari-610-branch/Source/_javascript_Core/ChangeLog 2020-12-08 20:01:55 UTC (rev 270547)
+++ branches/safari-610-branch/Source/_javascript_Core/ChangeLog 2020-12-08 20:04:58 UTC (rev 270548)
@@ -1,3 +1,40 @@
+2020-12-08 Russell Epstein <repst...@apple.com>
+
+ Cherry-pick r270052. rdar://problem/72099688
+
+ Use os_thread_self_restrict_rwx_is_supported instead of pthread_jit_write_protect_supported_np on Apple Internal SDK builds
+ https://bugs.webkit.org/show_bug.cgi?id=219099
+ <rdar://problem/71547048>
+
+ Reviewed by Mark Lam.
+
+ Source/_javascript_Core:
+
+ * assembler/FastJITPermissions.h:
+ (useFastJITPermissions):
+ (threadSelfRestrictRWXToRW):
+ (threadSelfRestrictRWXToRX):
+
+ Source/WTF:
+
+ * wtf/PlatformHave.h:
+ * wtf/PlatformUse.h:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-11-19 Saam Barati <sbar...@apple.com>
+
+ Use os_thread_self_restrict_rwx_is_supported instead of pthread_jit_write_protect_supported_np on Apple Internal SDK builds
+ https://bugs.webkit.org/show_bug.cgi?id=219099
+ <rdar://problem/71547048>
+
+ Reviewed by Mark Lam.
+
+ * assembler/FastJITPermissions.h:
+ (useFastJITPermissions):
+ (threadSelfRestrictRWXToRW):
+ (threadSelfRestrictRWXToRX):
+
2020-12-02 Alan Coon <alanc...@apple.com>
Apply patch. rdar://problem/71921536
Modified: branches/safari-610-branch/Source/_javascript_Core/assembler/FastJITPermissions.h (270547 => 270548)
--- branches/safari-610-branch/Source/_javascript_Core/assembler/FastJITPermissions.h 2020-12-08 20:01:55 UTC (rev 270547)
+++ branches/safari-610-branch/Source/_javascript_Core/assembler/FastJITPermissions.h 2020-12-08 20:04:58 UTC (rev 270548)
@@ -29,7 +29,7 @@
#include <wtf/Platform.h>
-#if HAVE(PTHREAD_JIT_PERMISSIONS_API)
+#if USE(PTHREAD_JIT_PERMISSIONS_API)
#include <pthread.h>
#elif USE(APPLE_INTERNAL_SDK)
#include <os/thread_self_restrict.h>
@@ -39,7 +39,7 @@
{
#if CPU(ARM64E)
return true;
-#elif HAVE(PTHREAD_JIT_PERMISSIONS_API)
+#elif USE(PTHREAD_JIT_PERMISSIONS_API)
return !!pthread_jit_write_protect_supported_np();
#elif USE(APPLE_INTERNAL_SDK)
return !!os_thread_self_restrict_rwx_is_supported();
@@ -52,7 +52,7 @@
{
ASSERT(useFastJITPermissions());
-#if HAVE(PTHREAD_JIT_PERMISSIONS_API)
+#if USE(PTHREAD_JIT_PERMISSIONS_API)
pthread_jit_write_protect_np(false);
#elif USE(APPLE_INTERNAL_SDK)
os_thread_self_restrict_rwx_to_rw();
@@ -67,7 +67,7 @@
{
ASSERT(useFastJITPermissions());
-#if HAVE(PTHREAD_JIT_PERMISSIONS_API)
+#if USE(PTHREAD_JIT_PERMISSIONS_API)
pthread_jit_write_protect_np(true);
#elif USE(APPLE_INTERNAL_SDK)
os_thread_self_restrict_rwx_to_rx();
Modified: branches/safari-610-branch/Source/WTF/ChangeLog (270547 => 270548)
--- branches/safari-610-branch/Source/WTF/ChangeLog 2020-12-08 20:01:55 UTC (rev 270547)
+++ branches/safari-610-branch/Source/WTF/ChangeLog 2020-12-08 20:04:58 UTC (rev 270548)
@@ -1,3 +1,38 @@
+2020-12-08 Russell Epstein <repst...@apple.com>
+
+ Cherry-pick r270052. rdar://problem/72099688
+
+ Use os_thread_self_restrict_rwx_is_supported instead of pthread_jit_write_protect_supported_np on Apple Internal SDK builds
+ https://bugs.webkit.org/show_bug.cgi?id=219099
+ <rdar://problem/71547048>
+
+ Reviewed by Mark Lam.
+
+ Source/_javascript_Core:
+
+ * assembler/FastJITPermissions.h:
+ (useFastJITPermissions):
+ (threadSelfRestrictRWXToRW):
+ (threadSelfRestrictRWXToRX):
+
+ Source/WTF:
+
+ * wtf/PlatformHave.h:
+ * wtf/PlatformUse.h:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-11-19 Saam Barati <sbar...@apple.com>
+
+ Use os_thread_self_restrict_rwx_is_supported instead of pthread_jit_write_protect_supported_np on Apple Internal SDK builds
+ https://bugs.webkit.org/show_bug.cgi?id=219099
+ <rdar://problem/71547048>
+
+ Reviewed by Mark Lam.
+
+ * wtf/PlatformHave.h:
+ * wtf/PlatformUse.h:
+
2020-11-16 Russell Epstein <repst...@apple.com>
Cherry-pick r268979. rdar://problem/71446613
Modified: branches/safari-610-branch/Source/WTF/wtf/PlatformHave.h (270547 => 270548)
--- branches/safari-610-branch/Source/WTF/wtf/PlatformHave.h 2020-12-08 20:01:55 UTC (rev 270547)
+++ branches/safari-610-branch/Source/WTF/wtf/PlatformHave.h 2020-12-08 20:04:58 UTC (rev 270548)
@@ -698,7 +698,6 @@
#define HAVE_HSTS_STORAGE 1
#define HAVE_LSDATABASECONTEXT 1
#define HAVE_PRECONNECT_PING 1
-#define HAVE_PTHREAD_JIT_PERMISSIONS_API 1
#define HAVE_WEBP 1
#endif
Modified: branches/safari-610-branch/Source/WTF/wtf/PlatformUse.h (270547 => 270548)
--- branches/safari-610-branch/Source/WTF/wtf/PlatformUse.h 2020-12-08 20:01:55 UTC (rev 270547)
+++ branches/safari-610-branch/Source/WTF/wtf/PlatformUse.h 2020-12-08 20:04:58 UTC (rev 270548)
@@ -304,3 +304,13 @@
#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 110000)
#define USE_CTFONTSHAPEGLYPHS 1
#endif
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \
+ || (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
+#if USE(APPLE_INTERNAL_SDK)
+/* Always use the macro on internal builds */
+#define USE_PTHREAD_JIT_PERMISSIONS_API 0
+#else
+#define USE_PTHREAD_JIT_PERMISSIONS_API 1
+#endif
+#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes