xref: /xnu-8020.140.41/libkern/libkern/kext_request_keys.h (revision 27b03b360a988dfd3dfdf34262bb0042026747cc)
1 /*
2  * Copyright (c) 2008 Apple Inc. All rights reserved.
3  *
4  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5  *
6  * This file contains Original Code and/or Modifications of Original Code
7  * as defined in and that are subject to the Apple Public Source License
8  * Version 2.0 (the 'License'). You may not use this file except in
9  * compliance with the License. The rights granted to you under the License
10  * may not be used to create, or enable the creation or redistribution of,
11  * unlawful or unlicensed copies of an Apple operating system, or to
12  * circumvent, violate, or enable the circumvention or violation of, any
13  * terms of an Apple operating system software license agreement.
14  *
15  * Please obtain a copy of the License at
16  * http://www.opensource.apple.com/apsl/ and read it before using this file.
17  *
18  * The Original Code and all software distributed under the License are
19  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23  * Please see the License for the specific language governing rights and
24  * limitations under the License.
25  *
26  * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27  */
28 
29 #ifndef _LIBKERN_KEXT_REQUEST_KEYS_H
30 #define _LIBKERN_KEXT_REQUEST_KEYS_H
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35 
36 /*********************************************************************
37 * This file defines keys (and values) for properties in kext_request
38 * collections and mkext archives used for loading in the kernel.
39 * An incoming request is always a serialized XML plist with at least
40 * a predicate, and optionally a dictionary of arguments.
41 *
42 * Some requests generate serialized XML plist responses, while others
43 * return raw data. See the predicate description for more.
44 *
45 * All of these keys are strictly for internal run-time communication
46 * between IOKitUser's OSKext module and xnu's OSKext class.
47 * Keys and values may change at any time without notice.
48 *********************************************************************/
49 
50 #if PRAGMA_MARK
51 /********************************************************************/
52 #pragma mark Top-Level Request Properties
53 /********************************************************************/
54 #endif
55 
56 /* The Predicate Key
57  * The value of this key indicates the operation to perform or the
58  * information desired.
59  */
60 #define kKextRequestPredicateKey                   "Kext Request Predicate"
61 
62 /* The Arguments Key
63  * The value of this key is a dictionary containing the arguments
64  * for the request.
65  */
66 #define kKextRequestArgumentsKey                   "Kext Request Arguments"
67 
68 #if PRAGMA_MARK
69 /********************************************************************/
70 #pragma mark Request Predicates - User-Space to Kernel
71 /********************************************************************/
72 #endif
73 
74 /*********************************************************************
75  * Nonprivileged requests from user -> kernel
76  *
77  * These requests do not require a privileged host port, as they just
78  * return information about loaded kexts.
79  **********/
80 
81 /* Predicate: Get Loaded Kext Info
82  * Argument:  (None)
83  * Response:  An array of information about loaded kexts (see OSKextLib.h).
84  * Op result: OSReturn indicating any errors in processing (see OSKextLib.h)
85  *
86  * Retrieves an array of dictionaries whose properties describe every kext
87  * loaded at the time of the call.
88  */
89 #define kKextRequestPredicateGetLoaded             "Get Loaded Kext Info"
90 
91 /* Predicate: Get Loaded Kext Info By UUID
92  * Argument:  (None)
93  * Response:  An array of information about loaded kexts (see OSKextLib.h).
94  * Op result: OSReturn indicating any errors in processing (see OSKextLib.h)
95  *
96  * Retrieves an array of dictionaries whose properties describe every kext
97  * loaded at the time of the call.
98  */
99 #define kKextRequestPredicateGetLoadedByUUID       "Get Loaded Kext Info By UUID"
100 
101 /* Predicate: Get Loaded Kext UUID By Address
102  * Argument:  An address to lookup
103  * Response:  A UUID of the kext
104  * Op result: OSReturn indicating any errors in processing (see OSKextLib.h)
105  *
106  * Retrieves the uuid of a loaded kext in whose address range the given
107  * lookup address falls into.
108  */
109 #define kKextRequestPredicateGetUUIDByAddress      "Get Kext UUID by Address"
110 
111 /* Predicate: Get All Load Requests
112  * Argument:  None
113  * Response:  A set of bundle identifiers of all requested kext loads..
114  * Op result: OSReturn indicating any errors in processing (see OSKextLib.h)
115  *
116  * Retrieves the bundle identifiers of all kexts that were requested to be
117  * loaded since power on.
118  *
119  */
120 #define kKextRequestPredicateGetAllLoadRequests    "Get All Load Requests"
121 
122 /* Predicate: Get Kexts in Collection
123  * Arguments: Name of the collection: All, Primary, System, Auxiliary
124  *            Boolean - RequestLoadedOnly
125  * Response:  An array of information about the kexts in the given collection
126  *            (see OSKextLib.h).
127  * Op result: OSReturn indicating any errors in processing (see OSKextLib.h)
128  *
129  * Retrieves an array of dictionaries whose properties describe every kext
130  * present in the given kext collection type
131  * loaded at the time of the call.
132  */
133 #define kKextRequestPredicateGetKextsInCollection   "Get Kexts in Collection"
134 
135 
136 /*********************************************************************
137  * Privileged requests from user -> kernel
138  *
139  * These requests all do something with kexts in the kernel or to
140  * the OSKext system overall. The user-space caller of kext_request()
141  * must have access to a privileged host port or these requests result
142  * in an op_result of kOSKextReturnNotPrivileged.
143  **********/
144 
145 /* Predicate: Get Kernel Requests
146  * Argument:  (None)
147  * Response:  An array of kernel requests (see below).
148  * Op result: OSReturn indicating any errors in processing (see OSKextLib.h)
149  *
150  * Retrieve the list of deferred load (and other) requests from OSKext.
151  * This predicate is reserved for kextd, and we may be enforcing access
152  * to the kextd process only.
153  */
154 #define kKextRequestPredicateGetKernelRequests     "Get Kernel Requests"
155 
156 /* Predicate: Load
157  * Argument:  kKextRequestArgumentLoadRequestsKey
158  * Response:  None (yet, may become an array of log message strings)
159  * Op result: OSReturn indicating processing/load+start result (see OSKextLib.h)
160  *
161  * Load one or more kexts per the load requests in the arguments dict.
162  * See kKextRequestArgumentLoadRequestsKey for more info.
163  */
164 #define kKextRequestPredicateLoad                  "Load"
165 
166 /* Predicate: LoadFromKC
167  * Argument:  kKextRequestPredicateLoadFromKC
168  * Response:  None (yet, may become an array of log message strings)
169  * Op result: OSReturn indicating processing/load+start result (see OSKextLib.h)
170  *
171  * Load one kexts which already exists in the kernel's address space as part
172  * of a kext collection. By default, the kext will start and have all of its
173  * personalities sent to the IOCatalogue for matching.
174  */
175 #define kKextRequestPredicateLoadFromKC            "LoadFromKC"
176 
177 /* Predicate: LoadCodelessKext
178  * Argument:  kKextRequestPredicateLoadCodeless
179  * Response:  None (yet, may become an array of log message strings)
180  * Op result: OSReturn indicating processing/load+start result (see OSKextLib.h)
181  *
182  * Load one codeless kext. The input to this request is a single kext
183  * Info.plist dictionary contained in the kKextRequestArgumentCodelessInfoKey
184  * key. The personalities will be sent to the IOCatalogue for matching.
185  *
186  * See kKextRequestArgumentCodelessInfoKey for more info.
187  */
188 #define kKextRequestPredicateLoadCodeless          "LoadCodelessKext"
189 
190 /* Predicate: Start
191  * Argument:  kKextRequestArgumentBundleIdentifierKey (CFBundleIdentifier)
192  * Response:  None (yet, may become an array of log message strings)
193  * Op result: OSReturn indicating start result (see OSKextLib.h)
194  *
195  * Start a kext by bundle id. If it's already started, returns success.
196  * If a kext's dependencies need to be started, they are also started.
197  */
198 #define kKextRequestPredicateStart                 "Start"
199 
200 /* Predicate: Stop
201  * Argument:  kKextRequestArgumentBundleIdentifierKey (CFBundleIdentifier)
202  * Response:  None (yet, may become an array of log message strings)
203  * Op result: OSReturn indicating stop result (see OSKextLib.h)
204  *
205  * Stop a kext by bundle id if it can be stoppoed.
206  * If it's already stopped, returns success.
207  * Does not attempt to stop dependents; that will return an error.
208  */
209 #define kKextRequestPredicateStop                  "Stop"
210 
211 /* Predicate: Unload
212  * Argument:  kKextRequestArgumentBundleIdentifierKey (CFBundleIdentifier)
213  * Response:  None (yet, may become an array of log message strings)
214  * Op result: OSReturn indicating stop+unload result (see OSKextLib.h)
215  *
216  * Stop and unload a kext by bundle id if it can be.
217  * Does not attempt to stop dependents; that will return an error.
218  */
219 #define kKextRequestPredicateUnload                "Unload"
220 
221 /* Predicate: LoadFileSetKC
222  * Argument:  kKextRequestArgument
223  * Response:  None (yet, may become an array of log message strings)
224  * Op result: OSReturn indicating load result of kext collections
225  *
226  * Load Pageable and Aux kext collection.
227  */
228 #define kKextRequestPredicateLoadFileSetKC        "loadfilesetkc"
229 
230 /* Predicate: MissingAuxKCBundles
231  * Argument:  kKextRequestArgumentMissingBundleIDs
232  * Response:  None
233  * Op result: OSReturn indicating success or failure
234  *
235  * Set the list of bundle IDs which may exist in the AuxKC, but
236  * which are missing from disk. This list represents kexts whose
237  * code exists in the AuxKC, but should not be loadable.
238  */
239 #define kKextRequestPredicateMissingAuxKCBundles  "MissingAuxKCBundles"
240 
241 /* Predicate: AuxKCBundleAvailable
242  * Arguments: kKextRequestArgumentBundleIdentifierKey (CFBundleIdentifier)
243  *            Boolean - kKextRequestArgumentBundleAvailability (optional)
244  * Response:  None
245  * Op result: OSReturn indicating success or failure
246  *
247  * Set the availability of an individual kext in the AuxKC.
248  */
249 #define kKextRequestPredicateAuxKCBundleAvailable  "AuxKCBundleAvailable"
250 
251 /* Predicate: DaemonReady
252  * Arguments: None
253  * Response:  None
254  * Op result: OSReturn indicating whether daemon has already checked in
255  *
256  * Check whether the daemon has previously checked into the kernel.
257  */
258 #define kKextRequestPredicateDaemonReady "DaemonReady"
259 
260 #if PRAGMA_MARK
261 /********************************************************************/
262 #pragma mark Requests Predicates - Kernel to User Space (kextd)
263 /********************************************************************/
264 #endif
265 /* Predicate: Send Resource
266  * Argument:  kKextRequestArgumentRequestTagKey
267  * Argument:  kKextRequestArgumentBundleIdentifierKey
268  * Argument:  kKextRequestArgumentNameKey
269  * Argument:  kKextRequestArgumentValueKey
270  * Argument:  kKextRequestArgumentResult
271  * Response:  None
272  * Op result: OSReturn indicating result (see OSKextLib.h)
273  *
274  * Retrieves a resource file from a kext bundle. The callback corresponding
275  * to the request will be invoked.
276  */
277 #define kKextRequestPredicateSendResource          "Send Resource"
278 
279 /*********************************************************************
280  * Kernel Requests: from the kernel or loaded kexts up to kextd
281  *
282  * These requests come from within the kernel, and kextd retrieves
283  * them using kKextRequestPredicateGetKernelRequests.
284  **********/
285 
286 /* Predicate: Kext Load Request
287  * Argument:  kKextRequestArgumentBundleIdentifierKey
288  * Response:  Asynchronous via a kKextRequestPredicateLoad from kextd
289  * Op result: OSReturn indicating result (see OSKextLib.h)
290  *
291  * Requests that kextd load the kext with the given identifier.
292  * When kexts loads the kext, it informs the IOCatalogue of the load.
293  * If the kext cannot be loaded, kextd or OSKext removes its personalities
294  * from the kernel.
295  */
296 #define kKextRequestPredicateRequestLoad           "Kext Load Request"
297 
298 /* Predicate: Kext Load Notification
299  * Argument:  kext identifier
300  * Response:  None
301  * Op result: OSReturn indicating result (see OSKextLib.h)
302  *
303  * Informs kextd that the kernel has successfully loaded and started
304  * a kext.
305  */
306 #define kKextRequestPredicateLoadNotification      "Kext Load Notification"
307 
308 /* Predicate: Kext Unload Notification
309  * Argument:  kext identifier
310  * Response:  None
311  * Op result: OSReturn indicating result (see OSKextLib.h)
312  *
313  * Informs kextd that the kernel has successfully stopped and unloaded
314  * a kext.
315  */
316 #define kKextRequestPredicateUnloadNotification    "Kext Unload Notification"
317 
318 /* Predicate: Prelinked Kernel Request
319  * Argument:  None
320  * Response:  None
321  * Op result: OSReturn indicating result (see OSKextLib.h)
322  *
323  * Notifies kextd that the kernel we booted from was not prelinked, therefore
324  * that kextd should try to create a prelinked kernel now.
325  */
326 #define kKextRequestPredicateRequestPrelink        "Kext Prelinked Kernel Request"
327 
328 /* Predicate: Kext Resource Request
329  * Argument:  kKextRequestArgumentRequestTagKey
330  * Argument:  kKextRequestArgumentBundleIdentifierKey
331  * Argument:  kKextRequestArgumentNameKey
332  * Response:  Asynchronous via a kKextRequestPredicateSendResource from kextd
333  * Op result: OSReturn indicating result (see OSKextLib.h)
334  *
335  * Requests a resource file from a kext bundle by identifier + filename.
336  */
337 #define kKextRequestPredicateRequestResource       "Kext Resource Request"
338 
339 
340 /* Predicate: IOKit Daemon Exit Request
341  * Argument:  None
342  * Response:  None
343  * Op result: OSReturn indicating result (see OSKextLib.h)
344  *
345  * Requests that the IOKit daemon (kernelmanagerd) exit for system shutdown.
346  */
347 #define kKextRequestPredicateRequestDaemonExit     "IOKit Daemon Exit"
348 
349 /* For source compatibility
350  */
351 #define kKextRequestPredicateRequestKextdExit      kKextRequestPredicateRequestDaemonExit
352 
353 
354 /* Predicate: Dext Daemon Launch
355  * Argument: kKextRequestArgumentBundleIdentifierKey
356  * Argument: IOUserServerName
357  * Response: Asynchronous via a DriverKit daemon checking in
358  * Op result: OSReturn indicating result (see OSKextLib.h)
359  *
360  * Requests kextd to launch a driver extension userspace daemon.
361  */
362 #define kKextRequestPredicateRequestDaemonLaunch "Dext Daemon Launch"
363 
364 #if PRAGMA_MARK
365 /********************************************************************/
366 #pragma mark -
367 #pragma mark Generic Request Arguments
368 /********************************************************************/
369 #endif
370 /* Argument:  Kext Load Requests
371  * Type:      Array of dictionaries (see Load Request Arguments below)
372  * Used by:   kKextRequestPredicateLoad
373  *
374  * An array of dictionaries, each describing a single load operation to
375  * be performed with its options. A kext load request is effectively a
376  * nested series requests. Currently only one load request is embedded
377  * in a user-space Load request, so the result is unambiguous. We might
378  * change this, specifically for kernelmanagerd, to allow all pending kernel
379  * load requests to be rolled up into one blob. Might not be much win
380  * in that, however. The nested logic makes the code difficult to read.
381  */
382 #define kKextRequestArgumentLoadRequestsKey        "Kext Load Requests"
383 
384 /* Argument:  CFBundleIdentifier
385  * Type:      String
386  * Used by:   several
387  *
388  * Any request that takes a bundle identifier uses this key.
389  */
390 #define kKextRequestArgumentBundleIdentifierKey    "CFBundleIdentifier"
391 
392 /* Argument:  OSReturn
393  * Type:      Dictionary
394  * Used by:   OSKext::copyInfo()
395  *
396  * Used to specify a subset of all possible info to be returned.
397  */
398 #define kKextRequestArgumentInfoKeysKey          "Kext Request Info Keys"
399 
400 /* Argument:  OSReturn
401  * Type:      Number (OSReturn)
402  * Used by:   several
403  *
404  * Contains the OSReturn/kern_return_t result of the request.
405  */
406 #define kKextRequestArgumentResultKey              "Kext Request Result Code"
407 
408 /* Argument:  Address
409  * Type:      Number (OSReturn)
410  * Used by:   OSKextGetUUIDByAddress
411  *
412  * Contains the address that needs to be looked up
413  */
414 #define kKextRequestArgumentLookupAddressKey       "Kext Request Lookup Address"
415 
416 /* Argument:  Value
417  * Type:      Varies with the predicate
418  * Used by:   several
419  *
420  * Used for all the Set-Enabled predicates, and also for Send Resource (OSData).
421  */
422 #define kKextRequestArgumentValueKey               "Value"
423 
424 /* Argument:  Filename
425  * Type:      String
426  * Used by:   kKextRequestPredicateSendResource
427  *
428  * Names the resource being sent to the kext
429  */
430 #define kKextRequestArgumentNameKey                "Name"
431 
432 /* Argument:  Filename
433  * Type:      Data
434  * Used by:   kKextRequestPredicateSendResource
435  *
436  * Contains the contents of the resource file being sent.
437  */
438 #define kKextRequestArgumentFileContentsKey        "File Contents"
439 
440 /* Argument:  Delay Autounload
441  * Type:      Boolean
442  * Default:   false
443  *
444  * Normally all kexts loaded are subject to normal autounload behavior:
445  * when no OSMetaClass instances remain for a kext that defines an IOService
446  * subclass, or when a non-IOService kext turns on autounload and its reference
447  * count drops to zero (external) references.
448  *
449  * Setting this property to true in a load request makes the kext being loaded
450  * skip ONE autounload pass, giving about an extra minute of time before the
451  * kext is subject to autounload. This is how kextutil(8) to delays autounload
452  * so that there's more time to set up a debug session.
453  *
454  * Setting this property in any other request causes OSKext::considerUnloads()
455  * to be called before processing the request, ensuring a window where kexts
456  * will not be unloaded. The user-space kext library uses this so that it can
457  * avoid including kexts that are already loaded in a load request.
458  */
459 #define kKextRequestArgumentDelayAutounloadKey         "Delay Autounload"
460 
461 #if PRAGMA_MARK
462 #pragma mark Load Request Arguments
463 #endif
464 
465 /*********************************************************************
466  * Kext Load Request Properties
467  *
468  * In addition to a bundle identifier, load requests can contain
469  * these optional keys.
470  *
471  * These properties are used primarily by kextutil(8) to alter default
472  * load behavior, but the OSKext user-level library makes them all
473  * available in OSKextLoadWithOptions().
474  **********/
475 
476 /* Argument:  StartExclude
477  * Type:      Integer, corresponding to OSKextExcludeLevel
478  * Default:   kOSKextExcludeNone if not specified
479  *
480  * Normally all kexts in the load list for a load request are started.
481  * This property is used primarily by kextutil(8) to delay start of
482  * either the primary kext, or the whole load list (any that weren't
483  * already loaded & started).
484  */
485 #define kKextRequestArgumentStartExcludeKey        "Start Exclude Level"
486 
487 /* Argument:  Start Matching Exclude Level
488  * Type:      Integer, corresponding to OSKextExcludeLevel
489  * Default:   kOSKextExcludeAll if not specified
490  *
491  * Normally no personalities are sent to the IOCatalogue for a regular
492  * kext load; the assumption is that they are already there and triggered
493  * the load request in the first place.
494  *
495  * This property is used primarily by kextutil(8) to delay matching for
496  * either the primary kext, or the whole load list (any that didn't
497  * already have personalities in the IOCatalogue).
498  */
499 #define kKextRequestArgumentStartMatchingExcludeKey    "Start Matching Exclude Level"
500 
501 // see also Delay Autounload
502 
503 /* Argument:  Personality Names
504  * Type:      Array of strings
505  * Default:   All personalities are used
506  *
507  * Normally when personalities are sent to the IOCatalogue, they are all sent.
508  * This property restricts the personalities sent, for the primary kext
509  * being loaded, to those named. Personalities for dependencies are all sent,
510  * and there is currently no mechanism to filter them.
511  *
512  * This property is used primarily by kextutil(8) to help debug matching
513  * problems.
514  */
515 #define kKextRequestArgumentPersonalityNamesKey        "Personality Names"
516 
517 /* Argument:  Codeless Kext Info
518  * Type:      Dictionary (Info.plist of codeless kext)
519  * Default:   <none> (required)
520  *
521  * When loading a codeless kext, this request argument's value should be set
522  * to the entire contents of the Info.plist of the codeless kext.
523  *
524  * NOTE: One additional key should be injected into the codeless kext's
525  * plist: kKextRequestArgumentCodelessInfoBundlePathKey
526  */
527 #define kKextRequestArgumentCodelessInfoKey            "Codeless Kext Info"
528 
529 
530 /* Argument: _CodelessKextBundlePath
531  * Type: String <path>
532  * Default: <none> (required)
533  *
534  * This argument is a plist key that must be injected into the dictionary sent
535  * as the kKextRequestArgumentCodelessInfoKey value. It specifies the
536  * filesystem path to the codeless kext bundle, and will be used in kext
537  * diagnostic information.
538  */
539 #define kKextRequestArgumentCodelessInfoBundlePathKey   "_CodelessKextBundlePath"
540 
541 #if PRAGMA_MARK
542 #pragma mark Unload Request Arguments
543 #endif
544 
545 /* Argument:  Terminate
546  * Type:      Boolean
547  * Default:   false
548  *
549  * An unload request may optionally specify via this key that all IOService
550  * objects are to be terminated before attempting to unload. Kexts with
551  * dependents will not attempt to terminate and will return kOSKextReturnInUse.
552  */
553 #define kKextRequestArgumentTerminateIOServicesKey     "Terminate IOServices"
554 
555 #if PRAGMA_MARK
556 #pragma mark Daemon Launch Request Arguments
557 #endif
558 
559 /* Argument: Server tag
560  * Type:     Integer
561  * Default:  N/A
562  *
563  * A DriverKit daemon launch request must include a "server tag" that
564  * is unique to every launch request. Userspace daemons include this
565  * tag in their messages when attempting to rendez-vous with IOKit.
566  */
567 #define kKextRequestArgumentDriverExtensionServerTag   "Driver Extension Server Tag"
568 
569 /* Argument: Server name
570  * Type:     String
571  * Default:  N/A
572  *
573  * A DriverKit daemon launch request must include a "server name" that
574  * can be used to identify what personality the driver is matching on.
575  * This name is also used for the launchd service name of the daemon.
576  */
577 #define kKextRequestArgumentDriverExtensionServerName  "Driver Extension Server Name"
578 
579 #if PRAGMA_MARK
580 #pragma mark Missing AuxKC Bundles Arguments
581 #endif
582 
583 /* Argument: Missing Bundle IDs
584  * Type:     Array
585  * Default:  N/A
586  * Used by:  kKextRequestPredicateMissingAuxKCBundles
587  *
588  * This array of bundle IDs represents the list of kexts which have been
589  * removed from disk, but still exist in the AuxKC.
590  */
591 #define kKextRequestArgumentMissingBundleIDs           "Missing Bundle IDs"
592 
593 /* Argument: Bundle Availability
594  * Type:     Boolean
595  * Default:  true
596  * Used by:  kKextRequestPredicateAuxKCBundleAvailable
597  *
598  * If present, this argument can indicate that the specified bundle ID
599  * is no longer available for loading from the AuxKC
600  */
601 #define kKextRequestArgumentBundleAvailability         "Bundle Availability"
602 
603 #if PRAGMA_MARK
604 #pragma mark Internal Tracking Properties
605 #endif
606 /*********************************************************************
607  * Internal Tracking Properties
608  **********/
609 
610 /* Argument:  Request Tag
611  * Type:      Number (uint32_t)
612  * Used by:   internal tracking for requests with callbacks
613  *
614  * Most requests to get resources (files) use this.
615  */
616 #define kKextRequestArgumentRequestTagKey              "Request Tag"
617 
618 /* Argument:  Request Callback
619  * Type:      Data (pointer)
620  * Used by:   internal tracking
621  *
622  * Most requests to get resources (files) use this.
623  */
624 #define kKextRequestArgumentCallbackKey                "Request Callback"
625 
626 /* Argument:  Request context.
627  * Type:      OSData (wraps a void *)
628  * Used by:   several
629  */
630 #define kKextRequestArgumentContextKey                 "Context"
631 
632 /* Argument:  Request Stale
633  * Type:      Boolean
634  * Used by:   internal tracking
635  *
636  * _OSKextConsiderUnloads sets this on any callback record lacking
637  * it, and deletes any callback record that has it.
638  */
639 #define kKextRequestStaleKey                           "Request Stale"
640 
641 /* Argument:  Check In Token
642  * Type:      Mach Send Right
643  * Used by:   DriverKit daemon launch
644  */
645 #define kKextRequestArgumentCheckInToken               "Check In Token"
646 
647 #if PRAGMA_MARK
648 #pragma mark fileset load request arguments
649 #endif
650 
651 /* Argument:  PageableKCName
652  * Type:      String (path)
653  * Used by:   kKextRequestPredicateLoadFileSetKC
654  *
655  * Name of the Pageable fileset kext collection
656  */
657 #define kKextRequestArgumentPageableKCFilename         "PageableKCName"
658 
659 /* Argument:  AuxKCName
660  * Type:      String (path)
661  * Used by:   kKextRequestPredicateLoadFileSetKC
662  *
663  * Name of the Aux fileset kext collection
664  */
665 #define kKextRequestArgumentAuxKCFilename              "AuxKCName"
666 
667 /* Argument:  Codeless Personalities
668  * Type:      Array of Dictionaries
669  * Used by:   kKextRequestPredicateLoadFileSetKC
670  *
671  * Any array of DriverKit driver (and codeless kext) personalities
672  */
673 #define kKextRequestArgumentCodelessPersonalities       "Codeless Personalities"
674 
675 #if PRAGMAA_MARK
676 #pragma mark kext collection request arguments
677 #endif
678 
679 /* Argument:  Collection
680  * Type:      String
681  * Used by:   kKextRequestPredicateGetKextsInCollection
682  *
683  * Contains a string describing the type of kext collection
684  */
685 #define kKextRequestArgumentCollectionTypeKey         "Collection Type"
686 
687 /* Argument:  LoadedState
688  * Type:      String
689  * Values:    Any, Loaded, Unloaded
690  * Default:   Any
691  * Used by:   kKextRequestPredicateGetKextsInCollection
692  *
693  * If present, this argument limits the GetKextsInCollection output to:
694  *     Loaded   -- only kexts which have been loaded
695  *     Unloaded -- only kexts which have been unloaded
696  *     Any      -- return all kexts in a collection
697  */
698 #define kKextRequestArgumentLoadedStateKey             "Loaded State"
699 
700 /* Argument:  Enable DriverKit Shared Region
701  * Type:      Number
702  * Default:   0
703  *
704  * If this is 1, this enables using a separate shared region for DriverKit processes.
705  *
706  */
707 #define kKextRequestEnableDriverKitSharedRegionKey     "Enable DriverKit Shared Region"
708 
709 #ifdef __cplusplus
710 };
711 #endif /* __cplusplus */
712 
713 #endif /* _LIBKERN_KEXT_REQUEST_KEYS_H */
714