Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround problems with hardened runtime, needed for notarization #259

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 20, 2019

  1. Use mmap rather than valloc in vmm_mem_alloc

    This will allow us to customise the flags in a later patch.
    
    Signed-off-by: David Scott <[email protected]>
    djs55 committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    04f7bc8 View commit details
    Browse the repository at this point in the history
  2. On Majave and later, allocate with MAP_JIT

    The VM requires writeable + executable memory which is blocked when
    the "hardened runtime" is enabled at the codesigning stage.
    
    If we pass the `MAP_JIT` flag then we can add the capability
    
      com.apple.security.cs.allow-jit [1]
    
    to permit the allocation. The alternative is to globally enable
    write+execute for all allocations in the process which seems worse [2]
    
    [1] https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-jit
    [2] https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-unsigned-executable-memory
    
    Signed-off-by: David Scott <[email protected]>
    djs55 committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    c0a16ba View commit details
    Browse the repository at this point in the history