#include <mach/port.h> also included by
<mach/mach.h>mach/port.h
NOTICE: This file was modified by McAfee Research in 2004 to introduce
support for mandatory and extensible security protections. This notice
is included in support of clause 2.2 (b) of the Apple Public License,
Version 2.0.
macroxnu_static_assert_struct_size
Helpers to declare and lock down the expected size for structures.
Some structures must remain a constant size due to performance or ABI implications.
It's not necessarily an issue if you need to bump a size passed to these macros: act judiciously.
#define xnu_static_assert_struct_size(name, expected_size) _Static_assert( sizeof(name) == expected_size, "struct changed size unexpectedly")
macroxnu_static_assert_struct_size_kernel_user
#define xnu_static_assert_struct_size_kernel_user(name, expected_kernel_size, expected_user_size) xnu_static_assert_struct_size(name, expected_user_size)
macroxnu_static_assert_struct_size_kernel_user64_user32
#define xnu_static_assert_struct_size_kernel_user64_user32(name, _kern_size, expected_user64_size, _u32_size) xnu_static_assert_struct_size(name, expected_user64_size)
typedefmach_port_name_t
typedef natural_t mach_port_name_t
typedefmach_port_name_array_t
typedef mach_port_name_t *mach_port_name_array_t
typedefmach_port_array_t
typedef mach_port_t *mach_port_array_t
macroMACH_PORT_DEAD
#define MACH_PORT_DEAD ((mach_port_name_t) ~0)
macroMACH_PORT_VALID
#define MACH_PORT_VALID(name) (((name) != MACH_PORT_NULL) && ((name) != MACH_PORT_DEAD))
macroMACH_PORT_INDEX
#define MACH_PORT_INDEX(name) ((name) >> 8)
macroMACH_PORT_GEN
#define MACH_PORT_GEN(name) (((name) & 0xff) << 24)
macroMACH_PORT_MAKE
#define MACH_PORT_MAKE(index, gen) (((index) << 8) | ((gen) >> 24))
typedefmach_port_right_t
typedef natural_t mach_port_right_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defined values:
| MACH_PORT_RIGHT_RECEIVE | mach_port_allocate creates a port. The new port is not a member of any port set. It doesn't have any extant send or send-once rights. Its make-send count is zero, its sequence number is zero, its queue limit is MACH_PORT_QLIMIT_DEFAULT, and it has no queued messages. name denotes the receive right for the new port. task does not hold send rights for the new port, only the receive right. mach_port_insert_right and mach_port_extract_right can be used to convert the receive right into a combined send/receive right. |
| MACH_PORT_RIGHT_PORT_SET | mach_port_allocate creates a port set. The new port set has no members. |
| MACH_PORT_RIGHT_DEAD_NAME | mach_port_allocate creates a dead name. The new dead name has one user reference. |
macroMACH_PORT_RIGHT_SEND
#define MACH_PORT_RIGHT_SEND ((mach_port_right_t) 0)
macroMACH_PORT_RIGHT_RECEIVE
#define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1)
CMU/MIT Mach reference · manual page · © Carnegie Mellon
mach_port_allocate creates a port. The new port is not a member of any port set. It doesn't have any extant send or send-once rights. Its make-send count is zero, its sequence number is zero, its queue limit is MACH_PORT_QLIMIT_DEFAULT, and it has no queued messages. name denotes the receive right for the new port. task does not hold send rights for the new port, only the receive right. mach_port_insert_right and mach_port_extract_right can be used to convert the receive right into a combined send/receive right.
macroMACH_PORT_RIGHT_SEND_ONCE
#define MACH_PORT_RIGHT_SEND_ONCE ((mach_port_right_t) 2)
macroMACH_PORT_RIGHT_PORT_SET
#define MACH_PORT_RIGHT_PORT_SET ((mach_port_right_t) 3)
CMU/MIT Mach reference · manual page · © Carnegie Mellon
mach_port_allocate creates a port set. The new port set has no members.
macroMACH_PORT_RIGHT_DEAD_NAME
#define MACH_PORT_RIGHT_DEAD_NAME ((mach_port_right_t) 4)
CMU/MIT Mach reference · manual page · © Carnegie Mellon
mach_port_allocate creates a dead name. The new dead name has one user reference.
macroMACH_PORT_RIGHT_NUMBER
#define MACH_PORT_RIGHT_NUMBER ((mach_port_right_t) 6)
right not implemented
macroMACH_PORT_TYPE
#define MACH_PORT_TYPE(right) ((mach_port_type_t)(((mach_port_type_t) 1) << ((right) + ((mach_port_right_t) 16))))
typedefmach_port_type_t
typedef natural_t mach_port_type_t
typedefmach_port_type_array_t
typedef mach_port_type_t *mach_port_type_array_t
macroMACH_PORT_TYPE_NONE
#define MACH_PORT_TYPE_NONE ((mach_port_type_t) 0L)
macroMACH_PORT_TYPE_SEND
#define MACH_PORT_TYPE_SEND MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND)
macroMACH_PORT_TYPE_RECEIVE
#define MACH_PORT_TYPE_RECEIVE MACH_PORT_TYPE(MACH_PORT_RIGHT_RECEIVE)
macroMACH_PORT_TYPE_SEND_ONCE
#define MACH_PORT_TYPE_SEND_ONCE MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND_ONCE)
macroMACH_PORT_TYPE_PORT_SET
#define MACH_PORT_TYPE_PORT_SET MACH_PORT_TYPE(MACH_PORT_RIGHT_PORT_SET)
macroMACH_PORT_TYPE_DEAD_NAME
#define MACH_PORT_TYPE_DEAD_NAME MACH_PORT_TYPE(MACH_PORT_RIGHT_DEAD_NAME)
macroMACH_PORT_TYPE_LABELH
#define MACH_PORT_TYPE_LABELH MACH_PORT_TYPE(MACH_PORT_RIGHT_LABELH)
obsolete
macroMACH_PORT_TYPE_DNREQUEST
Dummy type bits that mach_port_type/mach_port_names can return.
#define MACH_PORT_TYPE_DNREQUEST 0x80000000
macroMACH_PORT_TYPE_SPREQUEST
#define MACH_PORT_TYPE_SPREQUEST 0x40000000
macroMACH_PORT_TYPE_SPREQUEST_DELAYED
#define MACH_PORT_TYPE_SPREQUEST_DELAYED 0x20000000
macroMACH_PORT_TYPE_SEND_RECEIVE
#define MACH_PORT_TYPE_SEND_RECEIVE (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_RECEIVE)
macroMACH_PORT_TYPE_SEND_RIGHTS
#define MACH_PORT_TYPE_SEND_RIGHTS (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_SEND_ONCE)
macroMACH_PORT_TYPE_PORT_RIGHTS
#define MACH_PORT_TYPE_PORT_RIGHTS (MACH_PORT_TYPE_SEND_RIGHTS|MACH_PORT_TYPE_RECEIVE)
macroMACH_PORT_TYPE_PORT_OR_DEAD
#define MACH_PORT_TYPE_PORT_OR_DEAD (MACH_PORT_TYPE_PORT_RIGHTS|MACH_PORT_TYPE_DEAD_NAME)
macroMACH_PORT_TYPE_ALL_RIGHTS
#define MACH_PORT_TYPE_ALL_RIGHTS (MACH_PORT_TYPE_PORT_OR_DEAD|MACH_PORT_TYPE_PORT_SET)
typedefmach_port_urefs_t
typedef natural_t mach_port_urefs_t
macroMACH_PORT_SRIGHTS_NONE
Are there outstanding send rights for a given port?
#define MACH_PORT_SRIGHTS_NONE 0
no srights
structmach_port_status
| mach_port_rights_t | mps_pset | count of containing port sets |
| mach_port_seqno_t | mps_seqno | sequence number |
| mach_port_mscount_t | mps_mscount | make-send count |
| mach_port_msgcount_t | mps_qlimit | queue limit |
| mach_port_msgcount_t | mps_msgcount | number in the queue |
| mach_port_rights_t | mps_sorights | how many send-once rights |
| boolean_t | mps_srights | do send rights exist? |
| boolean_t | mps_pdrequest | port-deleted requested? |
| boolean_t | mps_nsrequest | no-senders requested? |
| natural_t | mps_flags | port flags |
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Used to present a port's current status with respect to various important attributes.
The mach_port_status structure is used to provide information about a port in response to an invocation of the mach_port_get_attributes interface.
Notes. This structure is machine word length sensitive due to the presence of the port set name.
typedefmach_port_status_t
typedef struct mach_port_status mach_port_status_t;
macroMACH_PORT_QLIMIT_ZERO
System-wide values for setting queue limits on a port
#define MACH_PORT_QLIMIT_ZERO (0)
macroMACH_PORT_QLIMIT_BASIC
#define MACH_PORT_QLIMIT_BASIC (5)
macroMACH_PORT_QLIMIT_SMALL
#define MACH_PORT_QLIMIT_SMALL (16)
macroMACH_PORT_QLIMIT_LARGE
#define MACH_PORT_QLIMIT_LARGE (1024)
macroMACH_PORT_QLIMIT_KERNEL
#define MACH_PORT_QLIMIT_KERNEL (65534)
macroMACH_PORT_QLIMIT_MIN
#define MACH_PORT_QLIMIT_MIN MACH_PORT_QLIMIT_ZERO
macroMACH_PORT_QLIMIT_DEFAULT
#define MACH_PORT_QLIMIT_DEFAULT MACH_PORT_QLIMIT_BASIC
macroMACH_PORT_QLIMIT_MAX
#define MACH_PORT_QLIMIT_MAX MACH_PORT_QLIMIT_LARGE
structmach_port_limits
| mach_port_msgcount_t | mpl_qlimit | number of msgs |
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Specifies a port's resource and message queue limits.
The mach_port_limits structure defines various limits governing the messages that can be sent through the port. (In the current implementation, the structure maintains only a queue length limit.)
typedefmach_port_limits_t
typedef struct mach_port_limits mach_port_limits_t;
macroMACH_PORT_STATUS_FLAG_TEMPOWNER
Possible values for mps_flags (part of mach_port_status_t)
#define MACH_PORT_STATUS_FLAG_TEMPOWNER 0x01
macroMACH_PORT_STATUS_FLAG_GUARDED
#define MACH_PORT_STATUS_FLAG_GUARDED 0x02
macroMACH_PORT_STATUS_FLAG_STRICT_GUARD
#define MACH_PORT_STATUS_FLAG_STRICT_GUARD 0x04
macroMACH_PORT_STATUS_FLAG_IMP_DONATION
#define MACH_PORT_STATUS_FLAG_IMP_DONATION 0x08
macroMACH_PORT_STATUS_FLAG_REVIVE
#define MACH_PORT_STATUS_FLAG_REVIVE 0x10
macroMACH_PORT_STATUS_FLAG_TASKPTR
#define MACH_PORT_STATUS_FLAG_TASKPTR 0x20
macroMACH_PORT_STATUS_FLAG_GUARD_IMMOVABLE_RECEIVE
#define MACH_PORT_STATUS_FLAG_GUARD_IMMOVABLE_RECEIVE 0x40
structmach_port_info_ext
| mach_port_status_t | mpie_status | |
| mach_port_msgcount_t | mpie_boost_cnt | |
| uint32_t[6] | reserved |
typedefmach_port_info_ext_t
typedef struct mach_port_info_ext mach_port_info_ext_t;
structmach_port_guard_info
| uint64_t | mpgi_guard | guard value |
typedefmach_port_guard_info_t
typedef struct mach_port_guard_info mach_port_guard_info_t;
typedefmach_port_flavor_t
Flavors for mach_port_get/set/assert_attributes()
typedef int mach_port_flavor_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defined values:
| MACH_PORT_LIMITS_INFO | Returns the resource limits for the port. The declaration of this data is found in structure mach_port_limits. |
| MACH_PORT_RECEIVE_STATUS | Returns random information about the rights and messages associated with the port. The declaration of this data is found in structure mach_port_status. |
macroMACH_PORT_LIMITS_INFO
#define MACH_PORT_LIMITS_INFO 1
uses mach_port_limits_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Returns the resource limits for the port. The declaration of this data is found in structure mach_port_limits.
macroMACH_PORT_RECEIVE_STATUS
#define MACH_PORT_RECEIVE_STATUS 2
uses mach_port_status_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Returns random information about the rights and messages associated with the port. The declaration of this data is found in structure mach_port_status.
macroMACH_PORT_TEMPOWNER
#define MACH_PORT_TEMPOWNER 4
indicates receive right will be reassigned to another task
macroMACH_PORT_IMPORTANCE_RECEIVER
#define MACH_PORT_IMPORTANCE_RECEIVER 5
indicates recieve right accepts priority donation
macroMACH_PORT_DENAP_RECEIVER
#define MACH_PORT_DENAP_RECEIVER 6
indicates receive right accepts de-nap donation
macroMACH_PORT_SERVICE_THROTTLED
#define MACH_PORT_SERVICE_THROTTLED 9
info is an integer that indicates if service port is throttled or not
macroMACH_PORT_LIMITS_INFO_COUNT
#define MACH_PORT_LIMITS_INFO_COUNT ((natural_t) (sizeof(mach_port_limits_t)/sizeof(natural_t)))
macroMACH_PORT_RECEIVE_STATUS_COUNT
#define MACH_PORT_RECEIVE_STATUS_COUNT ((natural_t) (sizeof(mach_port_status_t)/sizeof(natural_t)))
macroMACH_PORT_DNREQUESTS_SIZE_COUNT
#define MACH_PORT_DNREQUESTS_SIZE_COUNT 1
macroMACH_PORT_INFO_EXT_COUNT
#define MACH_PORT_INFO_EXT_COUNT ((natural_t) (sizeof(mach_port_info_ext_t)/sizeof(natural_t)))
macroMACH_PORT_GUARD_INFO_COUNT
#define MACH_PORT_GUARD_INFO_COUNT ((natural_t) (sizeof(mach_port_guard_info_t)/sizeof(natural_t)))
macroMACH_PORT_SERVICE_THROTTLED_COUNT
#define MACH_PORT_SERVICE_THROTTLED_COUNT 1
structmach_port_qos
Structure used to pass information about port allocation requests.
Must be padded to 64-bits total length.
| unsigned int:1 | name | name given |
| unsigned int:1 | prealloc | prealloced message |
| boolean_t:30 | pad1 | |
| natural_t | len |
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Specifies a port's attributes with respect to "Quality Of Service."
The mach_port_qos structure is used to specify a port's "quality of service" attributes when allocating the port via the mach_port_allocate_qos interface.
typedefmach_port_qos_t
typedef struct mach_port_qos mach_port_qos_t;
macroMACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN
Structure used to pass information about the service port
#define MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN 255
Maximum length of the port string name buffer
structmach_service_port_info
| char[255] | mspi_string_name | Service port's string name |
| uint8_t | mspi_domain_type | Service port domain |
typedefmach_service_port_info_data_t
typedef struct mach_service_port_info mach_service_port_info_data_t;
macroMACH_SERVICE_PORT_INFO_COUNT
#define MACH_SERVICE_PORT_INFO_COUNT ((char) (sizeof(mach_service_port_info_data_t)/sizeof(char)))
typedefmach_service_port_info_t
typedef struct mach_service_port_info * mach_service_port_info_t
macroMACH_PORT_CONNECTION_PORT_WITH_PORT_ARRAY
Platform binaries are not allowed to send OOL port array to any port.
MACH_MSG_OOL_PORTS_DESCRIPTOR are allowed to be sent ONLY to receive
rights that are explicitly allow to receive that descriptor.
Such ports have a dedicated port type, and are created using the
MPO_CONNECTION_PORT_WITH_PORT_ARRAY flag.
Creation of such ports requires the binary to have the following entitlement.
#define MACH_PORT_CONNECTION_PORT_WITH_PORT_ARRAY "com.apple.developer.allow-connection-port-with-port-array"
macroMACH_PORT_WEAK_REPLY_ENTITLEMENT
Allows 1p process to create weak reply port
#define MACH_PORT_WEAK_REPLY_ENTITLEMENT "com.apple.private.allow-weak-reply-port"
macroMPO_IMPORTANCE_RECEIVER
#define MPO_IMPORTANCE_RECEIVER 0x08
Mark the port as importance receiver
macroMPO_IMMOVABLE_RECEIVE
#define MPO_IMMOVABLE_RECEIVE 0x80
Mark the port as immovable; protected by the guard context
macroMPO_TG_BLOCK_TRACKING
#define MPO_TG_BLOCK_TRACKING 0x200
Track blocking relationship for thread group during sync IPC
macroMPO_ENFORCE_REPLY_PORT_SEMANTICS
#define MPO_ENFORCE_REPLY_PORT_SEMANTICS 0x2000
When talking to this port, local port of mach msg needs to follow reply port semantics.
macroMPO_STRICT_SERVICE_PORT
This service port has requested security hardening
#define MPO_STRICT_SERVICE_PORT (MPO_SERVICE_PORT | MPO_ENFORCE_REPLY_PORT_SEMANTICS)
macroMPO_OPTIONS_MASK
#define MPO_OPTIONS_MASK (MPO_CONTEXT_AS_GUARD | MPO_QLIMIT | MPO_TEMPOWNER | MPO_IMPORTANCE_RECEIVER | MPO_INSERT_SEND_RIGHT | MPO_STRICT | MPO_DENAP_RECEIVER | MPO_IMMOVABLE_RECEIVE | MPO_FILTER_MSG | MPO_TG_BLOCK_TRACKING | MPO_ENFORCE_REPLY_PORT_SEMANTICS)
macroMPO_MAKE_PORT_TYPE
MPO port type flags
#define MPO_MAKE_PORT_TYPE(a, b) (((a & 0x7) << 14) | ((b & 0x7) << 10))
macroMPO_PORT
These need to be defined for libxpc and other clients who `#ifdef`
#define MPO_PORT MPO_PORT
macroMPO_SERVICE_PORT
#define MPO_SERVICE_PORT MPO_SERVICE_PORT
macroMPO_CONNECTION_PORT
#define MPO_CONNECTION_PORT MPO_CONNECTION_PORT
macroMPO_REPLY_PORT
#define MPO_REPLY_PORT MPO_REPLY_PORT
macroMPO_WEAK_REPLY_PORT
#define MPO_WEAK_REPLY_PORT MPO_WEAK_REPLY_PORT
macroMPO_NOTIFICATION_PORT
#define MPO_NOTIFICATION_PORT MPO_NOTIFICATION_PORT
macroMPO_EXCEPTION_PORT
#define MPO_EXCEPTION_PORT MPO_EXCEPTION_PORT
macroMPO_CONNECTION_PORT_WITH_PORT_ARRAY
#define MPO_CONNECTION_PORT_WITH_PORT_ARRAY MPO_CONNECTION_PORT_WITH_PORT_ARRAY
enummpo_flags_t
| MPO_PORT | 0 | |
| MPO_SERVICE_PORT | 1024 | |
| MPO_CONNECTION_PORT | 2048 | |
| MPO_REPLY_PORT | 4096 | |
| MPO_WEAK_REPLY_PORT | 16384 | |
| MPO_NOTIFICATION_PORT | 17408 | |
| MPO_EXCEPTION_PORT | 32768 | |
| MPO_CONNECTION_PORT_WITH_PORT_ARRAY | 65536 |
typedefmpo_flags_t
typedef enum mpo_flags_t mpo_flags_t;
macroMPO_PROVISIONAL_REPLY_PORT
For bincompat: weak reply port used to be called provisional reply port
#define MPO_PROVISIONAL_REPLY_PORT MPO_WEAK_REPLY_PORT
macroMPO_UNUSED_BITS
#define MPO_UNUSED_BITS ~(MPO_OPTIONS_MASK | MPO_PORT_TYPE_MASK)
macroMPO_ANONYMOUS_SERVICE
Denotes an anonymous service
#define MPO_ANONYMOUS_SERVICE (MACH_PORT_DEAD - 1)
structmach_port_options
Structure to define optional attributes for a newly
constructed port.
| uint32_t | flags | |
| mach_port_limits_t | mpl | Message queue limit for port |
typedefmach_port_options_t
typedef struct mach_port_options mach_port_options_t;
typedefmach_port_options_ptr_t
typedef mach_port_options_t *mach_port_options_ptr_t
macroGUARD_TYPE_MACH_PORT
EXC_GUARD represents a guard violation for both
mach ports and file descriptors. GUARD_TYPE_ is used
to differentiate among them.
#define GUARD_TYPE_MACH_PORT 0x1
enummach_port_guard_exception_codes
Reasons for exception for a guarded mach port
Arguments are documented in doc/mach_ipc/guard_exceptions.md,
please update when adding a new type.
Note: these had been designed as bitfields,
hence the weird spaced values,
but are truly an enum, please add new values in the "holes".
| kGUARD_EXC_NONE | 0 | never sent |
| kGUARD_EXC_DESTROY | 1 | |
| kGUARD_EXC_MOD_REFS | 2 | |
| kGUARD_EXC_INVALID_OPTIONS | 3 | |
| kGUARD_EXC_SET_CONTEXT | 4 | |
| kGUARD_EXC_THREAD_SET_STATE | 5 | |
| kGUARD_EXC_EXCEPTION_BEHAVIOR_ENFORCE | 6 | |
| kGUARD_EXC_SERVICE_PORT_VIOLATION_FATAL | 7 | |
| kGUARD_EXC_UNGUARDED | 8 | |
| kGUARD_EXC_KOBJECT_REPLY_PORT_SEMANTICS | 9 | |
| kGUARD_EXC_REQUIRE_REPLY_PORT_SEMANTICS | 10 | |
| kGUARD_EXC_INCORRECT_GUARD | 16 | |
| kGUARD_EXC_IMMOVABLE | 32 | |
| kGUARD_EXC_STRICT_REPLY | 64 | |
| kGUARD_EXC_INVALID_NOTIFICATION_REQ | 65 | |
| kGUARD_EXC_INVALID_MPO_ENTITLEMENT | 66 | |
| kGUARD_EXC_DESCRIPTOR_VIOLATION | 67 | |
| kGUARD_EXC_MSG_FILTERED | 128 | |
| kGUARD_EXC_INVALID_RIGHT | 256 | start of [optionally] non-fatal guards |
| kGUARD_EXC_INVALID_NAME | 512 | |
| kGUARD_EXC_INVALID_VALUE | 1024 | |
| kGUARD_EXC_INVALID_ARGUMENT | 2048 | really kGUARD_EXC_ALREADY_GUARDED |
| kGUARD_EXC_RIGHT_EXISTS | 4096 | unused |
| kGUARD_EXC_KERN_NO_SPACE | 8192 | unused |
| kGUARD_EXC_KERN_FAILURE | 16384 | really kGUARD_EXC_INVALID_PDREQUEST |
| kGUARD_EXC_KERN_RESOURCE | 32768 | unused |
| kGUARD_EXC_SEND_INVALID_REPLY | 65536 | |
| kGUARD_EXC_SEND_INVALID_VOUCHER | 131072 | |
| kGUARD_EXC_SEND_INVALID_RIGHT | 262144 | |
| kGUARD_EXC_RCV_INVALID_NAME | 524288 | |
| kGUARD_EXC_RCV_GUARDED_DESC | 1048576 | start of always non-fatal guards for development only |
| kGUARD_EXC_SERVICE_PORT_VIOLATION_NON_FATAL | 1048577 | unused |
| kGUARD_EXC_INVALID_NOTIFICATION_PORT | 1048582 | |
| kGUARD_EXC_MACH_EXC_THREAD_SET_STATE | 1048583 | |
| kGUARD_EXC_CV_NOTIFICATION_PORT_REQ | 1048584 | |
| kGUARD_EXC_WEAK_REPLY_PORT | 1048578 | unused |
| kGUARD_EXC_OOL_PORT_ARRAY_CREATION | 1048579 | unused |
| kGUARD_EXC_MOVE_WEAK_REPLY_PORT | 1048580 | |
| kGUARD_EXC_REPLY_PORT_SINGLE_SO_RIGHT | 1048581 | |
| kGUARD_EXC_MOD_REFS_NON_FATAL | 2097152 | |
| kGUARD_EXC_IMMOVABLE_NON_FATAL | 4194304 | unused |
macroMAX_FATAL_kGUARD_EXC_CODE
#define MAX_FATAL_kGUARD_EXC_CODE kGUARD_EXC_MSG_FILTERED
macroMAX_OPTIONAL_kGUARD_EXC_CODE
#define MAX_OPTIONAL_kGUARD_EXC_CODE kGUARD_EXC_RCV_INVALID_NAME
macrokGUARD_EXC_PROVISIONAL_REPLY_PORT
Temporary! Should be removed after rdar://166892063
#define kGUARD_EXC_PROVISIONAL_REPLY_PORT kGUARD_EXC_WEAK_REPLY_PORT
macrokGUARD_EXC_MOVE_PROVISIONAL_REPLY_PORT
#define kGUARD_EXC_MOVE_PROVISIONAL_REPLY_PORT kGUARD_EXC_MOVE_WEAK_REPLY_PORT
macroMPG_FLAGS_STRICT_REPLY_INVALID_VOUCHER
These flags are used as bits in the subcode of kGUARD_EXC_STRICT_REPLY exceptions.
#define MPG_FLAGS_STRICT_REPLY_INVALID_VOUCHER 0x04
macroMPG_FLAGS_STRICT_REPLY_MISMATCHED_PERSONA
#define MPG_FLAGS_STRICT_REPLY_MISMATCHED_PERSONA 0x10
macroMPG_FLAGS_MOD_REFS_PINNED_DEALLOC
These flags are used as bits in the subcode of kGUARD_EXC_MOD_REFS exceptions.
#define MPG_FLAGS_MOD_REFS_PINNED_DEALLOC 0x01
macroMPG_FLAGS_MOD_REFS_PINNED_DESTROY
#define MPG_FLAGS_MOD_REFS_PINNED_DESTROY 0x02
macroMPG_FLAGS_MOD_REFS_PINNED_COPYIN
#define MPG_FLAGS_MOD_REFS_PINNED_COPYIN 0x03
macroMPG_FLAGS_INVALID_RIGHT_RECV
These flags are used as bits in the subcode of kGUARD_EXC_INVALID_RIGHT exceptions.
#define MPG_FLAGS_INVALID_RIGHT_RECV 0x01
does not have receive right
macroMPG_FLAGS_INVALID_RIGHT_DESTRUCT
#define MPG_FLAGS_INVALID_RIGHT_DESTRUCT 0x03
ipc_right_destruct()
macroMPG_FLAGS_INVALID_RIGHT_DEALLOC_KERNEL
#define MPG_FLAGS_INVALID_RIGHT_DEALLOC_KERNEL 0x06
mach_port_deallocate_kernel()
macroMPG_FLAGS_INVALID_RIGHT_TRANSLATE_PORT
#define MPG_FLAGS_INVALID_RIGHT_TRANSLATE_PORT 0x07
port in ipc_object_translate_port_pset()
macroMPG_FLAGS_INVALID_RIGHT_TRANSLATE_PSET
#define MPG_FLAGS_INVALID_RIGHT_TRANSLATE_PSET 0x08
pset in ipc_object_translate_port_pset()
macroMPG_FLAGS_INVALID_VALUE_PEEK
These flags are used as bits in the subcode of kGUARD_EXC_INVALID_VALUE exceptions.
#define MPG_FLAGS_INVALID_VALUE_PEEK 0x01
macroMPG_FLAGS_INVALID_VALUE_DESTRUCT
#define MPG_FLAGS_INVALID_VALUE_DESTRUCT 0x03
ipc_right_destruct()
macroMPG_FLAGS_KERN_FAILURE_TASK
These flags are used as bits in the subcode of kGUARD_EXC_KERN_FAILURE exceptions.
#define MPG_FLAGS_KERN_FAILURE_TASK 0x01
task other than launchd arm pd on service ports
macroMPG_FLAGS_KERN_FAILURE_NOTIFY_TYPE
#define MPG_FLAGS_KERN_FAILURE_NOTIFY_TYPE 0x02
not using IOT_NOTIFICATION_PORT for pd notification
macroMPG_FLAGS_KERN_FAILURE_NOTIFY_RECV
#define MPG_FLAGS_KERN_FAILURE_NOTIFY_RECV 0x03
notification port not owned by launchd
macroMPG_FLAGS_KERN_FAILURE_MULTI_NOTI
#define MPG_FLAGS_KERN_FAILURE_MULTI_NOTI 0x04
register multiple pd notification
macroMPG_FLAGS_SEND_INVALID_RIGHT_PORT
These flags are used as bits in the subcode of kGUARD_EXC_SEND_INVALID_RIGHT exceptions.
#define MPG_FLAGS_SEND_INVALID_RIGHT_PORT 0x01
ipc_kmsg_copyin_port_descriptor()
macroMPG_FLAGS_SEND_INVALID_RIGHT_OOL_PORT
#define MPG_FLAGS_SEND_INVALID_RIGHT_OOL_PORT 0x02
ipc_kmsg_copyin_ool_ports_descriptor()
macroMPG_FLAGS_SEND_INVALID_RIGHT_GUARDED
#define MPG_FLAGS_SEND_INVALID_RIGHT_GUARDED 0x03
ipc_kmsg_copyin_guarded_port_descriptor
macroMPG_FLAGS_INVALID_OPTIONS_OOL_DISP
These flags are used as bits in the subcode of kGUARD_EXC_INVALID_OPTIONS exceptions.
#define MPG_FLAGS_INVALID_OPTIONS_OOL_DISP 0x01
ipc_kmsg_copyin_ool_ports_descriptor()
macroMPG_FLAGS_INVALID_OPTIONS_OOL_ARRAYS
#define MPG_FLAGS_INVALID_OPTIONS_OOL_ARRAYS 0x02
ipc_validate_kmsg_header_from_user()
macroMPG_FLAGS_INVALID_OPTIONS_OOL_RIGHT
#define MPG_FLAGS_INVALID_OPTIONS_OOL_RIGHT 0x03
ipc_validate_kmsg_header_from_user()
macroMPG_STRICT
Flags for mach_port_guard_with_flags. These flags extend
the attributes associated with a guarded port.
#define MPG_STRICT 0x01
Apply strict guarding for a port
macroMPG_IMMOVABLE_RECEIVE
#define MPG_IMMOVABLE_RECEIVE 0x02
Receive right cannot be moved out of the space