Function

SecCodeMapMemory

Asks the kernel to accept the signing information currently attached to a code object and uses it to validate memory page-ins.

Declaration

OSStatus SecCodeMapMemory(SecStaticCodeRef code, SecCSFlags flags);

Parameters

code

A code or static code object representing the signed code whose main executable should be subject to page-in validation. If you provide a code object, the function processes it in the same manner as the SecCodeCopyStaticCode function—that is, whether you provide a code object or a static code object, the function actually takes the signature from the code on disk.

flags

Optional flags; see SecCSFlags for possible values. Pass kSecCSDefaultFlags for standard behavior.

Return Value

Discussion

This function is for the use of code hosts that use memory mapping to manage their own code. The kernel takes the signing information attached to the code on disk specified by the code parameter and attaches it to the memory object. After that, it uses the signature to validate memory page-ins, updating the dynamic validity status accordingly. You can use the SecCodeCopySigningInformation function to check the code’s dynamic validity status. The attachment of the signature to the memory object affects all processes that have the main executable of this code mapped.

See Also

Guest Management

SecCodeCopyHost

Retrieves the code object for the host of specified guest code.

SecHostRemoveGuest

Removes a guest from a host.

Deprecated
SecHostSelectGuest

Makes the calling thread the proxy for a specified guest.

Deprecated
SecHostSelectedGuest

Retrieves the handle for the guest currently selected for the calling thread.

Deprecated
SecHostSetHostingPort

Tells code signing services that the calling code will directly respond to hosting inquiries over the given port.

Deprecated