Skip to content

Conversation

@dstogov
Copy link
Member

@dstogov dstogov commented Feb 12, 2024

No description provided.

@dstogov dstogov changed the base branch from PHP-8.2 to master February 12, 2024 11:27
@dstogov
Copy link
Member Author

dstogov commented Feb 12, 2024

I gave up :(

@dstogov dstogov closed this Feb 12, 2024
@devnexen
Copy link
Member

It s tough, see. As you implied, we need to officially sign the binary. Unlike most of other oses, macos needs policies files for permissions.

@dstogov
Copy link
Member Author

dstogov commented Feb 13, 2024

It s tough, see. As you implied, we need to officially sign the binary. Unlike most of other oses, macos needs policies files for permissions.

I can't verify this, but it seems ZTS+JIT can only work if we sign PHP with the following entitlements.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
</dict>
</plist>

I suppose, this should make pthread_jit_write_protect_supported_np() return TRUE, and then we should be able to use pthread_jit_write_protect_np().

I'm not completely sure if this will work, because MAP_JIT may conflict with MAP_SHARED.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants