Saturday, 26 October 2019

Re: [Rpcemu] RPCEmu 0.9.2

On Sat, Oct 26, 2019 at 06:28:58PM +0100, Timothy Coltman wrote:
> However, compiling with the "dynarec" option turned on gives an access
> denied error when you run the emulator (the "mprotect" line in
> "set_memory_executable" of "ArmDynarec.c"). This is OS X 10.14.6, with
> the latest software updates. This looks like an Apple change or
> something, as previous versions of the emulator did work with dynamic
> compilation turned on. It seems to object to PROT_EXEC - no idea why,
> though reading around suggests it may be something to do with sandboxing.

Apple is tightening up the use of code generated at runtime, since code
injection is a common attack pathway. It's not possible to do it at all on
iOS, for example. For macOS, it appears you need to pass MAP_JIT to mmap()
and also have the feature enabled at code signing time:
https://github.com/dotnet/coreclr/issues/18617

I think you also need pages RW or RX - macOS has almost no pages that are
RWX and I suspect they want to keep it that way.

Theo

_______________________________________________
RPCEmu mailing list
RPCEmu@riscos.info
http://www.riscos.info/cgi-bin/mailman/listinfo/rpcemu

No comments:

Post a Comment