xref: /xnu-8019.80.24/bsd/sys/reason.h (revision a325d9c4a84054e40bbe985afedcb50ab80993ea)
1*a325d9c4SApple OSS Distributions /*
2*a325d9c4SApple OSS Distributions  * Copyright (c) 2019 Apple Inc. All rights reserved.
3*a325d9c4SApple OSS Distributions  *
4*a325d9c4SApple OSS Distributions  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5*a325d9c4SApple OSS Distributions  *
6*a325d9c4SApple OSS Distributions  * This file contains Original Code and/or Modifications of Original Code
7*a325d9c4SApple OSS Distributions  * as defined in and that are subject to the Apple Public Source License
8*a325d9c4SApple OSS Distributions  * Version 2.0 (the 'License'). You may not use this file except in
9*a325d9c4SApple OSS Distributions  * compliance with the License. The rights granted to you under the License
10*a325d9c4SApple OSS Distributions  * may not be used to create, or enable the creation or redistribution of,
11*a325d9c4SApple OSS Distributions  * unlawful or unlicensed copies of an Apple operating system, or to
12*a325d9c4SApple OSS Distributions  * circumvent, violate, or enable the circumvention or violation of, any
13*a325d9c4SApple OSS Distributions  * terms of an Apple operating system software license agreement.
14*a325d9c4SApple OSS Distributions  *
15*a325d9c4SApple OSS Distributions  * Please obtain a copy of the License at
16*a325d9c4SApple OSS Distributions  * http://www.opensource.apple.com/apsl/ and read it before using this file.
17*a325d9c4SApple OSS Distributions  *
18*a325d9c4SApple OSS Distributions  * The Original Code and all software distributed under the License are
19*a325d9c4SApple OSS Distributions  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20*a325d9c4SApple OSS Distributions  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21*a325d9c4SApple OSS Distributions  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22*a325d9c4SApple OSS Distributions  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23*a325d9c4SApple OSS Distributions  * Please see the License for the specific language governing rights and
24*a325d9c4SApple OSS Distributions  * limitations under the License.
25*a325d9c4SApple OSS Distributions  *
26*a325d9c4SApple OSS Distributions  * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27*a325d9c4SApple OSS Distributions  */
28*a325d9c4SApple OSS Distributions 
29*a325d9c4SApple OSS Distributions #ifndef _REASON_H_
30*a325d9c4SApple OSS Distributions #define _REASON_H_
31*a325d9c4SApple OSS Distributions 
32*a325d9c4SApple OSS Distributions #include <stdint.h>
33*a325d9c4SApple OSS Distributions 
34*a325d9c4SApple OSS Distributions __BEGIN_DECLS
35*a325d9c4SApple OSS Distributions 
36*a325d9c4SApple OSS Distributions #ifdef KERNEL_PRIVATE
37*a325d9c4SApple OSS Distributions 
38*a325d9c4SApple OSS Distributions #include <kern/kern_cdata.h>
39*a325d9c4SApple OSS Distributions #include <os/refcnt.h>
40*a325d9c4SApple OSS Distributions 
41*a325d9c4SApple OSS Distributions #ifdef XNU_KERNEL_PRIVATE
42*a325d9c4SApple OSS Distributions #include <kern/locks.h>
43*a325d9c4SApple OSS Distributions 
44*a325d9c4SApple OSS Distributions typedef struct os_reason {
45*a325d9c4SApple OSS Distributions 	decl_lck_mtx_data(, osr_lock);
46*a325d9c4SApple OSS Distributions 	os_refcnt_t                     osr_refcount;
47*a325d9c4SApple OSS Distributions 	uint32_t                        osr_namespace;
48*a325d9c4SApple OSS Distributions 	uint64_t                        osr_code;
49*a325d9c4SApple OSS Distributions 	uint64_t                        osr_flags;
50*a325d9c4SApple OSS Distributions 	uint32_t                        osr_bufsize;
51*a325d9c4SApple OSS Distributions 	struct kcdata_descriptor        osr_kcd_descriptor;
52*a325d9c4SApple OSS Distributions 	char                            *osr_kcd_buf;
53*a325d9c4SApple OSS Distributions } *os_reason_t;
54*a325d9c4SApple OSS Distributions 
55*a325d9c4SApple OSS Distributions #define OS_REASON_NULL ((os_reason_t) 0)
56*a325d9c4SApple OSS Distributions 
57*a325d9c4SApple OSS Distributions /* We only include 800 bytes of the exit reason description to not blow through the panic buffer */
58*a325d9c4SApple OSS Distributions #define LAUNCHD_PANIC_REASON_STRING_MAXLEN "800"
59*a325d9c4SApple OSS Distributions 
60*a325d9c4SApple OSS Distributions void os_reason_init(void);
61*a325d9c4SApple OSS Distributions 
62*a325d9c4SApple OSS Distributions os_reason_t build_userspace_exit_reason(uint32_t reason_namespace, uint64_t reason_code, user_addr_t payload, uint32_t payload_size,
63*a325d9c4SApple OSS Distributions     user_addr_t reason_string, uint64_t reason_flags);
64*a325d9c4SApple OSS Distributions char *launchd_exit_reason_get_string_desc(os_reason_t exit_reason);
65*a325d9c4SApple OSS Distributions 
66*a325d9c4SApple OSS Distributions /* The blocking allocation is currently not exported to KEXTs */
67*a325d9c4SApple OSS Distributions int os_reason_alloc_buffer(os_reason_t cur_reason, uint32_t osr_bufsize);
68*a325d9c4SApple OSS Distributions 
69*a325d9c4SApple OSS Distributions #else /* XNU_KERNEL_PRIVATE */
70*a325d9c4SApple OSS Distributions 
71*a325d9c4SApple OSS Distributions typedef void * os_reason_t;
72*a325d9c4SApple OSS Distributions 
73*a325d9c4SApple OSS Distributions #endif /* XNU_KERNEL_PRIVATE */
74*a325d9c4SApple OSS Distributions 
75*a325d9c4SApple OSS Distributions os_reason_t os_reason_create(uint32_t osr_namespace, uint64_t osr_code);
76*a325d9c4SApple OSS Distributions int os_reason_alloc_buffer_noblock(os_reason_t cur_reason, uint32_t osr_bufsize);
77*a325d9c4SApple OSS Distributions struct kcdata_descriptor * os_reason_get_kcdata_descriptor(os_reason_t cur_reason);
78*a325d9c4SApple OSS Distributions void os_reason_ref(os_reason_t cur_reason);
79*a325d9c4SApple OSS Distributions void os_reason_free(os_reason_t cur_reason);
80*a325d9c4SApple OSS Distributions void os_reason_set_flags(os_reason_t cur_reason, uint64_t flags);
81*a325d9c4SApple OSS Distributions void os_reason_set_description_data(os_reason_t cur_reason, uint32_t type, void *reason_data, uint32_t reason_data_len);
82*a325d9c4SApple OSS Distributions #endif /* KERNEL_PRIVATE */
83*a325d9c4SApple OSS Distributions 
84*a325d9c4SApple OSS Distributions /*
85*a325d9c4SApple OSS Distributions  * Reason namespaces.
86*a325d9c4SApple OSS Distributions  */
87*a325d9c4SApple OSS Distributions #define OS_REASON_INVALID       0
88*a325d9c4SApple OSS Distributions #define OS_REASON_JETSAM        1
89*a325d9c4SApple OSS Distributions #define OS_REASON_SIGNAL        2
90*a325d9c4SApple OSS Distributions #define OS_REASON_CODESIGNING   3
91*a325d9c4SApple OSS Distributions #define OS_REASON_HANGTRACER    4
92*a325d9c4SApple OSS Distributions #define OS_REASON_TEST          5
93*a325d9c4SApple OSS Distributions #define OS_REASON_DYLD          6
94*a325d9c4SApple OSS Distributions #define OS_REASON_LIBXPC        7
95*a325d9c4SApple OSS Distributions #define OS_REASON_OBJC          8
96*a325d9c4SApple OSS Distributions #define OS_REASON_EXEC          9
97*a325d9c4SApple OSS Distributions #define OS_REASON_SPRINGBOARD   10
98*a325d9c4SApple OSS Distributions #define OS_REASON_TCC           11
99*a325d9c4SApple OSS Distributions #define OS_REASON_REPORTCRASH   12
100*a325d9c4SApple OSS Distributions #define OS_REASON_COREANIMATION 13
101*a325d9c4SApple OSS Distributions #define OS_REASON_AGGREGATED    14
102*a325d9c4SApple OSS Distributions #define OS_REASON_RUNNINGBOARD  15
103*a325d9c4SApple OSS Distributions #define OS_REASON_ASSERTIOND    OS_REASON_RUNNINGBOARD  /* old name */
104*a325d9c4SApple OSS Distributions #define OS_REASON_SKYWALK       16
105*a325d9c4SApple OSS Distributions #define OS_REASON_SETTINGS      17
106*a325d9c4SApple OSS Distributions #define OS_REASON_LIBSYSTEM     18
107*a325d9c4SApple OSS Distributions #define OS_REASON_FOUNDATION    19
108*a325d9c4SApple OSS Distributions #define OS_REASON_WATCHDOG      20
109*a325d9c4SApple OSS Distributions #define OS_REASON_METAL         21
110*a325d9c4SApple OSS Distributions #define OS_REASON_WATCHKIT      22
111*a325d9c4SApple OSS Distributions #define OS_REASON_GUARD         23
112*a325d9c4SApple OSS Distributions #define OS_REASON_ANALYTICS     24
113*a325d9c4SApple OSS Distributions #define OS_REASON_SANDBOX       25
114*a325d9c4SApple OSS Distributions #define OS_REASON_SECURITY      26
115*a325d9c4SApple OSS Distributions #define OS_REASON_ENDPOINTSECURITY      27
116*a325d9c4SApple OSS Distributions #define OS_REASON_PAC_EXCEPTION 28
117*a325d9c4SApple OSS Distributions #define OS_REASON_BLUETOOTH_CHIP 29
118*a325d9c4SApple OSS Distributions #define OS_REASON_PORT_SPACE    30
119*a325d9c4SApple OSS Distributions #define OS_REASON_WEBKIT        31
120*a325d9c4SApple OSS Distributions #define OS_REASON_BACKLIGHTSERVICES 32
121*a325d9c4SApple OSS Distributions #define OS_REASON_MEDIA 33
122*a325d9c4SApple OSS Distributions 
123*a325d9c4SApple OSS Distributions /*
124*a325d9c4SApple OSS Distributions  * Update whenever new OS_REASON namespaces are added.
125*a325d9c4SApple OSS Distributions  */
126*a325d9c4SApple OSS Distributions #define OS_REASON_MAX_VALID_NAMESPACE OS_REASON_MEDIA
127*a325d9c4SApple OSS Distributions 
128*a325d9c4SApple OSS Distributions #define OS_REASON_BUFFER_MAX_SIZE 5120
129*a325d9c4SApple OSS Distributions 
130*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_NO_CRASH_REPORT          0x1   /* Don't create a crash report */
131*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_GENERATE_CRASH_REPORT    0x2   /* Create a crash report - the default for userspace requests */
132*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_FROM_USERSPACE           0x4   /* Reason created from a userspace syscall */
133*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_FAILED_DATA_COPYIN       0x8   /* We failed to copyin data from userspace */
134*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_PAYLOAD_TRUNCATED        0x10  /* The payload was truncated because it was longer than allowed */
135*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_BAD_PARAMS               0x20  /* Invalid parameters were passed involved with creating this reason */
136*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_CONSISTENT_FAILURE       0x40  /* Whatever caused this reason to be created will happen again */
137*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_ONE_TIME_FAILURE         0x80  /* Whatever caused this reason to be created was a one time issue */
138*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_NO_CRASHED_TID           0x100 /* Don't include the TID that processed the exit in the crash report */
139*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_ABORT                    0x200 /* Reason created from abort_* rather than terminate_* */
140*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_SHAREDREGION_FAULT       0x400 /* Fault happened within the shared cache region */
141*a325d9c4SApple OSS Distributions 
142*a325d9c4SApple OSS Distributions /*
143*a325d9c4SApple OSS Distributions  * Set of flags that are allowed to be passed from userspace
144*a325d9c4SApple OSS Distributions  */
145*a325d9c4SApple OSS Distributions #define OS_REASON_FLAG_MASK_ALLOWED_FROM_USER (OS_REASON_FLAG_CONSISTENT_FAILURE | OS_REASON_FLAG_ONE_TIME_FAILURE | OS_REASON_FLAG_NO_CRASH_REPORT | OS_REASON_FLAG_ABORT)
146*a325d9c4SApple OSS Distributions 
147*a325d9c4SApple OSS Distributions /*
148*a325d9c4SApple OSS Distributions  * Macros to encode the exit reason namespace and first 32 bits of code in exception code
149*a325d9c4SApple OSS Distributions  * which is used by Report Crash as a hint. It should be only used as a hint since it
150*a325d9c4SApple OSS Distributions  * looses higher 32 bits of exit reason code.
151*a325d9c4SApple OSS Distributions  */
152*a325d9c4SApple OSS Distributions #define ENCODE_OSR_NAMESPACE_TO_MACH_EXCEPTION_CODE(code, osr_namespace) \
153*a325d9c4SApple OSS Distributions 	(code) = (code) | (((osr_namespace) & ((uint64_t)UINT32_MAX)) << 32)
154*a325d9c4SApple OSS Distributions #define ENCODE_OSR_CODE_TO_MACH_EXCEPTION_CODE(code, osr_code) \
155*a325d9c4SApple OSS Distributions 	(code) = (code) | ((osr_code) & ((uint64_t)UINT32_MAX))
156*a325d9c4SApple OSS Distributions 
157*a325d9c4SApple OSS Distributions #ifndef KERNEL
158*a325d9c4SApple OSS Distributions /*
159*a325d9c4SApple OSS Distributions  * abort_with_reason: Used to exit the current process and pass along
160*a325d9c4SApple OSS Distributions  *                    specific information about why it is being terminated.
161*a325d9c4SApple OSS Distributions  *
162*a325d9c4SApple OSS Distributions  * Inputs:              args->reason_namespace - OS_REASON namespace specified for the reason
163*a325d9c4SApple OSS Distributions  *                      args->reason_code - code in the specified namespace for the reason
164*a325d9c4SApple OSS Distributions  *                      args->reason_string - additional string formatted information about the request
165*a325d9c4SApple OSS Distributions  *                      args->reason_flags - options requested for how the process should be terminated (see OS_REASON_FLAG_* above).
166*a325d9c4SApple OSS Distributions  *
167*a325d9c4SApple OSS Distributions  * Outputs:             Does not return.
168*a325d9c4SApple OSS Distributions  */
169*a325d9c4SApple OSS Distributions void abort_with_reason(uint32_t reason_namespace, uint64_t reason_code, const char *reason_string, uint64_t reason_flags)
170*a325d9c4SApple OSS Distributions __attribute__((noreturn, cold));
171*a325d9c4SApple OSS Distributions 
172*a325d9c4SApple OSS Distributions /*
173*a325d9c4SApple OSS Distributions  * abort_with_payload: Used to exit the current process and pass along
174*a325d9c4SApple OSS Distributions  *                     specific information about why it is being terminated. The payload pointer
175*a325d9c4SApple OSS Distributions  *                     should point to structured data that can be interpreted by the consumer of
176*a325d9c4SApple OSS Distributions  *                     exit reason information.
177*a325d9c4SApple OSS Distributions  *
178*a325d9c4SApple OSS Distributions  * Inputs:              args->reason_namespace - OS_REASON namespace specified for the reason
179*a325d9c4SApple OSS Distributions  *                      args->reason_code - code in the specified namespace for the reason
180*a325d9c4SApple OSS Distributions  *                      args->payload - pointer to payload structure in user space
181*a325d9c4SApple OSS Distributions  *                      args->payload_size - length of payload buffer (this will be truncated to EXIT_REASON_PAYLOAD_MAX_LEN)
182*a325d9c4SApple OSS Distributions  *                      args->reason_string - additional string formatted information about the request
183*a325d9c4SApple OSS Distributions  *                      args->reason_flags - options requested for how the process should be terminated (see OS_REASON_FLAG_* above).
184*a325d9c4SApple OSS Distributions  *
185*a325d9c4SApple OSS Distributions  * Outputs:             Does not return.
186*a325d9c4SApple OSS Distributions  */
187*a325d9c4SApple OSS Distributions void abort_with_payload(uint32_t reason_namespace, uint64_t reason_code, void *payload, uint32_t payload_size, const char *reason_string,
188*a325d9c4SApple OSS Distributions     uint64_t reason_flags) __attribute__((noreturn, cold));
189*a325d9c4SApple OSS Distributions 
190*a325d9c4SApple OSS Distributions /*
191*a325d9c4SApple OSS Distributions  * terminate_with_reason: Used to terminate a specific process and pass along
192*a325d9c4SApple OSS Distributions  *                        specific information about why it is being terminated.
193*a325d9c4SApple OSS Distributions  *
194*a325d9c4SApple OSS Distributions  * Inputs:              args->pid - the PID of the process to be terminated
195*a325d9c4SApple OSS Distributions  *                      args->reason_namespace - OS_REASON namespace specified for the reason
196*a325d9c4SApple OSS Distributions  *                      args->reason_code - code in the specified namespace for the reason
197*a325d9c4SApple OSS Distributions  *                      args->reason_string - additional string formatted information about the request
198*a325d9c4SApple OSS Distributions  *                      args->reason_flags - options requested for how the process should be terminated (see OS_REASON_FLAG_* above)
199*a325d9c4SApple OSS Distributions  *
200*a325d9c4SApple OSS Distributions  * Outputs:             returns -1 and sets errno to EINVAL if the PID requested is the same as that of the calling process, invalid or the namespace provided is invalid.
201*a325d9c4SApple OSS Distributions  *                      returns -1 and sets errno to ESRCH if we couldn't find a live process with the requested PID
202*a325d9c4SApple OSS Distributions  *                      returns -1 and sets errno to EPERM if the caller is not privileged enough to kill the process with the requested PID
203*a325d9c4SApple OSS Distributions  *                      returns 0 otherwise
204*a325d9c4SApple OSS Distributions  */
205*a325d9c4SApple OSS Distributions int terminate_with_reason(int pid, uint32_t reason_namespace, uint64_t reason_code, const char *reason_string, uint64_t reason_flags);
206*a325d9c4SApple OSS Distributions 
207*a325d9c4SApple OSS Distributions /*
208*a325d9c4SApple OSS Distributions  * terminate_with_payload: Used to terminate a specific process and pass along
209*a325d9c4SApple OSS Distributions  *                         specific information about why it is being terminated. The payload pointer
210*a325d9c4SApple OSS Distributions  *                         should point to structured data that can be interpreted by the consumer of
211*a325d9c4SApple OSS Distributions  *                         exit reason information.
212*a325d9c4SApple OSS Distributions  *
213*a325d9c4SApple OSS Distributions  * Inputs:              args->pid - the PID of the process to be terminated.
214*a325d9c4SApple OSS Distributions  *                      args->reason_namespace - OS_REASON namespace specified for the reason
215*a325d9c4SApple OSS Distributions  *                      args->reason_code - code in the specified namespace for the reason
216*a325d9c4SApple OSS Distributions  *                      args->payload - pointer to payload structure in user space
217*a325d9c4SApple OSS Distributions  *                      args->payload_size - length of payload buffer (this will be truncated to EXIT_REASON_PAYLOAD_MAX_LEN)
218*a325d9c4SApple OSS Distributions  *                      args->reason_string - additional string formatted information about the request
219*a325d9c4SApple OSS Distributions  *                      args->reason_flags - options requested for how the process should be terminated (see OS_REASON_FLAG_* above)
220*a325d9c4SApple OSS Distributions  *
221*a325d9c4SApple OSS Distributions  * Outputs:             returns -1 and sets errno to EINVAL if the PID requested is the same as that of the calling process, is invalid or the namespace provided is invalid.
222*a325d9c4SApple OSS Distributions  *                      returns -1 and sets errno to ESRCH if we couldn't find a live process with the requested PID
223*a325d9c4SApple OSS Distributions  *                      returns -1 and sets errno to EPERM if the caller is not privileged enough to kill the process with the requested PID
224*a325d9c4SApple OSS Distributions  *                      returns 0 otherwise
225*a325d9c4SApple OSS Distributions  */
226*a325d9c4SApple OSS Distributions int terminate_with_payload(int pid, uint32_t reason_namespace, uint64_t reason_code, void *payload, uint32_t payload_size,
227*a325d9c4SApple OSS Distributions     const char *reason_string, uint64_t reason_flags);
228*a325d9c4SApple OSS Distributions #endif /* KERNEL */
229*a325d9c4SApple OSS Distributions 
230*a325d9c4SApple OSS Distributions /*
231*a325d9c4SApple OSS Distributions  * codesigning exit reasons
232*a325d9c4SApple OSS Distributions  */
233*a325d9c4SApple OSS Distributions #define CODESIGNING_EXIT_REASON_TASKGATED_INVALID_SIG 1
234*a325d9c4SApple OSS Distributions #define CODESIGNING_EXIT_REASON_INVALID_PAGE          2
235*a325d9c4SApple OSS Distributions #define CODESIGNING_EXIT_REASON_TASK_ACCESS_PORT      3
236*a325d9c4SApple OSS Distributions 
237*a325d9c4SApple OSS Distributions /*
238*a325d9c4SApple OSS Distributions  * exec path specific exit reasons
239*a325d9c4SApple OSS Distributions  */
240*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_BAD_MACHO          1
241*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_SUGID_FAILURE      2
242*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_ACTV_THREADSTATE   3
243*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_STACK_ALLOC        4
244*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_APPLE_STRING_INIT  5
245*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_COPYOUT_STRINGS    6
246*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_COPYOUT_DYNLINKER  7
247*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_SECURITY_POLICY    8
248*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_TASKGATED_OTHER    9
249*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_FAIRPLAY_DECRYPT   10
250*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_DECRYPT            11
251*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_UPX                12
252*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_NO32EXEC           13
253*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_WRONG_PLATFORM     14
254*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_MAIN_FD_ALLOC      15
255*a325d9c4SApple OSS Distributions #define EXEC_EXIT_REASON_COPYOUT_ROSETTA    16
256*a325d9c4SApple OSS Distributions /*
257*a325d9c4SApple OSS Distributions  * guard reasons
258*a325d9c4SApple OSS Distributions  */
259*a325d9c4SApple OSS Distributions #define GUARD_REASON_VNODE       1
260*a325d9c4SApple OSS Distributions #define GUARD_REASON_VIRT_MEMORY 2
261*a325d9c4SApple OSS Distributions #define GUARD_REASON_MACH_PORT   3
262*a325d9c4SApple OSS Distributions 
263*a325d9c4SApple OSS Distributions __END_DECLS
264*a325d9c4SApple OSS Distributions 
265*a325d9c4SApple OSS Distributions #endif /* _REASON_H_ */
266