Changeset 236538 in webkit
- Timestamp:
- Sep 26, 2018 9:36:42 PM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r236534 r236538 1 2018-09-26 Mark Lam <mark.lam@apple.com> 2 3 Options::useSeparatedWXHeap() should always be false when ENABLE(FAST_JIT_PERMISSIONS) && CPU(ARM64E). 4 https://bugs.webkit.org/show_bug.cgi?id=190022 5 <rdar://problem/44800928> 6 7 Reviewed by Saam Barati. 8 9 * jit/ExecutableAllocator.cpp: 10 (JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator): 11 (JSC::FixedVMPoolExecutableAllocator::initializeSeparatedWXHeaps): 12 * jit/ExecutableAllocator.h: 13 (JSC::performJITMemcpy): 14 * runtime/Options.cpp: 15 (JSC::recomputeDependentOptions): 16 1 17 2018-09-26 Mark Lam <mark.lam@apple.com> 2 18 -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.cpp
r232604 r236538 107 107 JS_EXPORT_PRIVATE void* taggedStartOfFixedExecutableMemoryPool; 108 108 JS_EXPORT_PRIVATE void* taggedEndOfFixedExecutableMemoryPool; 109 110 #if !ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E) 109 111 JS_EXPORT_PRIVATE bool useFastPermisionsJITCopy { false }; 110 111 112 JS_EXPORT_PRIVATE JITWriteSeparateHeapsFunction jitWriteSeparateHeapsFunction; 113 #endif 112 114 113 115 #if !USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION) && HAVE(REMAP_JIT) … … 144 146 void* reservationBase = m_reservation.base(); 145 147 148 #if ENABLE(FAST_JIT_PERMISSIONS) && CPU(ARM64E) 149 RELEASE_ASSERT(os_thread_self_restrict_rwx_is_supported()); 150 os_thread_self_restrict_rwx_to_rx(); 151 152 #else // not ENABLE(FAST_JIT_PERMISSIONS) or not CPU(ARM64E) 146 153 #if ENABLE(FAST_JIT_PERMISSIONS) 147 154 if (os_thread_self_restrict_rwx_is_supported()) { … … 157 164 initializeSeparatedWXHeaps(m_reservation.base(), pageSize(), reservationBase, reservationSize); 158 165 } 166 #endif // not ENABLE(FAST_JIT_PERMISSIONS) or not CPU(ARM64E) 159 167 160 168 addFreshFreeSpace(reservationBase, reservationSize); … … 245 253 memset_s(&writableAddr, sizeof(writableAddr), 0, sizeof(writableAddr)); 246 254 255 #if !ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E) 247 256 jitWriteSeparateHeapsFunction = reinterpret_cast<JITWriteSeparateHeapsFunction>(writeThunk.code().executableAddress()); 257 #endif 248 258 } 249 259 -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.h
r236534 r236538 82 82 } 83 83 84 #if !ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E) 85 84 86 typedef void (*JITWriteSeparateHeapsFunction)(off_t, const void*, size_t); 85 87 extern JS_EXPORT_PRIVATE JITWriteSeparateHeapsFunction jitWriteSeparateHeapsFunction; 88 extern JS_EXPORT_PRIVATE bool useFastPermisionsJITCopy; 86 89 87 extern JS_EXPORT_PRIVATE bool useFastPermisionsJITCopy; 90 #endif // !ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E) 88 91 89 92 static inline void* performJITMemcpy(void *dst, const void *src, size_t n) … … 97 100 RELEASE_ASSERT(reinterpret_cast<uint8_t*>(dst) + n <= endOfFixedExecutableMemoryPool()); 98 101 #if ENABLE(FAST_JIT_PERMISSIONS) 99 if (useFastPermisionsJITCopy) { 102 #if !CPU(ARM64E) 103 if (useFastPermisionsJITCopy) 104 #endif 105 { 100 106 os_thread_self_restrict_rwx_to_rw(); 101 107 memcpy(dst, src, n); … … 103 109 return dst; 104 110 } 105 #endif 111 #endif // ENABLE(FAST_JIT_PERMISSIONS) 106 112 113 #if !ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E) 107 114 if (jitWriteSeparateHeapsFunction) { 108 115 // Use execute-only write thunk for writes inside the JIT region. This is a variant of … … 112 119 return dst; 113 120 } 121 #endif 114 122 } 115 123 -
trunk/Source/JavaScriptCore/runtime/Options.cpp
r235935 r236538 460 460 } 461 461 462 #if PLATFORM(IOS) && CPU(ARM64) 462 #if PLATFORM(IOS) && CPU(ARM64) && !CPU(ARM64E) 463 463 // Override globally for now. Longer term we'll just make the default 464 464 // be to have this option enabled, and have platforms that don't support
Note: See TracChangeset
for help on using the changeset viewer.