Changeset 234648 in webkit
- Timestamp:
- Aug 7, 2018 5:50:23 AM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r234580 r234648 1 2018-08-07 Karo Gyoker <karogyoker2+webkit@gmail.com> 2 3 Hardcoded LFENCE instruction 4 https://bugs.webkit.org/show_bug.cgi?id=188145 5 6 Reviewed by Filip Pizlo. 7 8 Remove lfence instruction because it is crashing systems without SSE2 and 9 this is not the way how WebKit mitigates Spectre. 10 11 * runtime/JSLock.cpp: 12 (JSC::JSLock::didAcquireLock): 13 (JSC::JSLock::willReleaseLock): 14 1 15 2018-08-04 David Kilzer <ddkilzer@apple.com> 2 16 -
trunk/Source/JavaScriptCore/runtime/JSLock.cpp
r232998 r234648 123 123 124 124 void JSLock::didAcquireLock() 125 { 126 WTF::speculationFence(); 127 125 { 128 126 // FIXME: What should happen to the per-thread identifier table if we don't have a VM? 129 127 if (!m_vm) … … 193 191 194 192 void JSLock::willReleaseLock() 195 { 196 WTF::speculationFence(); 197 193 { 198 194 RefPtr<VM> vm = m_vm; 199 195 if (vm) { -
trunk/Source/WTF/ChangeLog
r234646 r234648 1 2018-08-07 Karo Gyoker <karogyoker2+webkit@gmail.com> 2 3 Hardcoded LFENCE instruction 4 https://bugs.webkit.org/show_bug.cgi?id=188145 5 6 Reviewed by Filip Pizlo. 7 8 Remove lfence instruction because it is crashing systems without SSE2 and 9 this is not the way how WebKit mitigates Spectre. 10 11 * wtf/Atomics.h: 12 (WTF::crossModifyingCodeFence): 13 (WTF::speculationFence): Deleted. 14 (WTF::x86_lfence): Deleted. 15 1 16 2018-08-07 Antti Koivisto <antti@apple.com> 2 17 -
trunk/Source/WTF/wtf/Atomics.h
r229988 r234648 277 277 inline void memoryBarrierBeforeUnlock() { arm_dmb(); } 278 278 inline void crossModifyingCodeFence() { arm_isb(); } 279 inline void speculationFence() { arm_isb(); }280 279 281 280 #elif CPU(X86) || CPU(X86_64) 282 283 inline void x86_lfence()284 {285 #if !OS(WINDOWS)286 asm volatile("lfence" ::: "memory");287 #endif288 }289 281 290 282 inline void x86_ortop() … … 323 315 inline void memoryBarrierBeforeUnlock() { compilerFence(); } 324 316 inline void crossModifyingCodeFence() { x86_cpuid(); } 325 inline void speculationFence() { x86_lfence(); }326 317 327 318 #else … … 334 325 inline void memoryBarrierBeforeUnlock() { std::atomic_thread_fence(std::memory_order_seq_cst); } 335 326 inline void crossModifyingCodeFence() { std::atomic_thread_fence(std::memory_order_seq_cst); } // Probably not strong enough. 336 inline void speculationFence() { } // Probably not strong enough.337 327 338 328 #endif
Note: See TracChangeset
for help on using the changeset viewer.