I'm maintaining the snapshots of DOSBox, a DOS emulator. I'm codesigning these snapshots and also lately began to notarize them. For macOS 10.15 I had to add the entitlement to allow-unsigned-executable-memory, or the notarized app would crash when entering dynamic (JIT) mode.
Now there is a patch to enable the dynamic core for ARM64 and this works nicely when I use the built binary on the Apple silicon (DTK).
But when I make the app bundle it crashes when it enters JIT.
Of course I instantly added the entitlements com.apple.security.cs.allow-jit and just for making sure also com.apple.security.cs.disable-executable-page-protection. codesigned and notarized it but it still crashes with
Now I'm wondering if it's our code that trips over something even though jit, unsigned ex memory and page protection are all set, or whether I'm running into a quirk of the DTK and that works on the actual M1 machines.
To recap, the binary works fine, the app bundle with hardened runtime and following entitlements crashes:
Now there is a patch to enable the dynamic core for ARM64 and this works nicely when I use the built binary on the Apple silicon (DTK).
But when I make the app bundle it crashes when it enters JIT.
Of course I instantly added the entitlements com.apple.security.cs.allow-jit and just for making sure also com.apple.security.cs.disable-executable-page-protection. codesigned and notarized it but it still crashes with
Code Block CODE SIGNING: 16291[dosbox] vm_map_enter: curprot cannot be write+execute. failing
Now I'm wondering if it's our code that trips over something even though jit, unsigned ex memory and page protection are all set, or whether I'm running into a quirk of the DTK and that works on the actual M1 machines.
To recap, the binary works fine, the app bundle with hardened runtime and following entitlements crashes:
Code Block <key>com.apple.security.cs.allow-jit</key> <true/> <key>com.apple.security.cs.allow-unsigned-executable-memory</key> <true/> <key>com.apple.security.cs.disable-executable-page-protection</key> <true/> <key>com.apple.security.automation.apple-events</key> <true/>