Re:About the Rosetta Translation Environment
by lsllc on Tuesday June 23, 2020 @11:45AM
(#23615462)
Right, if you look at the example JIT project I posted, they start by creating the memory with mmap() and PROT_EXEC before generating any code. So yes, you'd need to trap subsequent writes to allow for retranslation [I assume they have hooks in the Darwin kernel for this].
[ Parent
| on HN ]
Re:About the Rosetta Translation Environment
by monocasa on Tuesday June 23, 2020 @11:48AM
(#23615516)
Or they just enforce W^X in the rosetta runtime by intercepting client mmap calls and fix it up as far as the client code is concerned by catching SIGBUS first.
I don't see anything here that requires extra kernel hooks.