Re:What Every Hacker Should Know About TLB Invalidation [pdf]
by egberts1 on Thursday January 16, 2025 @09:49AM
(#42725918)
Read-Write-eXecute TLB memory region can be found in JavaScript, Java, Dalvik (Android), and Python.
[ Parent
| on HN ]
Re:What Every Hacker Should Know About TLB Invalidation [pdf]
by Retr0id on Thursday January 16, 2025 @10:33AM
(#42726640)
Modern javascript engines (namely V8) avoid RWX, although last time I checked there's been a backslide as part of WASM implementation.
CPython also no longer appears to create RWX mappings even for ctypes, although you can of course still mmap them manually.
Re:What Every Hacker Should Know About TLB Invalidation [pdf]
by egberts1 on Thursday January 16, 2025 @11:30AM
(#42727473)
Wow. So V8 actually back to optimizing the entire bytecode region in one fell swoop?
I had thought that such V8 optimization were still occuring (as of Chrome Blink81/SparkPlug) during JavaScript execution of untouched bytecode as a form of overhead reduction of its startup.
https://egbert.net/blog/articles/javascript-jit-engines-time...
Re:What Every Hacker Should Know About TLB Invalidation [pdf]
by Retr0id on Thursday January 16, 2025 @01:25PM
(#42728927)
I don't know what V8 actually does, but one possible strategy is to have a pair of RW and RX mappings to the same physical pages (or just keep flipping permissions between the two)