[Vm-dev] Cog will require changes to JIT on the next version of Mac
Das.Linux at gmx.de
Wed Aug 14 06:22:21 UTC 2019
> On 14.08.2019, at 04:29, Ryan Macnak <rmacnak at gmail.com> wrote:
> Cog will need to be signed with the JIT entitlement and to pass MAP_JIT when it allocates executable memory.
It seems the ideas of OpenBSD W^X finally reached Mac OS X , but in a different way.
Other JITs handle that by
* mmap-ing the to-be-written code region R/W
* jitting to that region
* when done mprotect to remove the w and add the x
Example: Firefox .
I have no idea why Apple came up with MAP_JIT. If we used the above,
maybe we don't need to be singend to at least run…
: https://en.wikipedia.org/wiki/W%5EX , https://www.openbsd.org/33.html
More information about the Vm-dev