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 /* Predicate: Get Dexts 136 * Arguments: (None) 137 * InfoKeysArguments: Group of dexts to retrive - kOSBundleDextActiveKey, 138 * kOSBundleDextLoadedKey, kOSBundleDextUnLoadedKey 139 * or kOSBundleDextPendingUpgradeKey. 140 * Response: A dictionary of dext groups with information about the dexts in 141 * that group. 142 * If no group is requested it defaults to kOSBundleDextActiveKey and 143 * kOSBundleDextPendingUpgradeKey. 144 * 145 * Op result: OSReturn indicating any errors in processing (see OSKextLib.h) 146 * 147 * Retrieves an array of dictionaries whose properties describe every dext 148 * present in the group requested. 149 */ 150 #define kKextRequestPredicateGetDexts "Get Dexts" 151 152 153 /********************************************************************* 154 * Privileged requests from user -> kernel 155 * 156 * These requests all do something with kexts in the kernel or to 157 * the OSKext system overall. The user-space caller of kext_request() 158 * must have access to a privileged host port or these requests result 159 * in an op_result of kOSKextReturnNotPrivileged. 160 **********/ 161 162 /* Predicate: Get Kernel Requests 163 * Argument: (None) 164 * Response: An array of kernel requests (see below). 165 * Op result: OSReturn indicating any errors in processing (see OSKextLib.h) 166 * 167 * Retrieve the list of deferred load (and other) requests from OSKext. 168 * This predicate is reserved for kextd, and we may be enforcing access 169 * to the kextd process only. 170 */ 171 #define kKextRequestPredicateGetKernelRequests "Get Kernel Requests" 172 173 /* Predicate: Load 174 * Argument: kKextRequestArgumentLoadRequestsKey 175 * Response: None (yet, may become an array of log message strings) 176 * Op result: OSReturn indicating processing/load+start result (see OSKextLib.h) 177 * 178 * Load one or more kexts per the load requests in the arguments dict. 179 * See kKextRequestArgumentLoadRequestsKey for more info. 180 */ 181 #define kKextRequestPredicateLoad "Load" 182 183 /* Predicate: LoadFromKC 184 * Argument: kKextRequestPredicateLoadFromKC 185 * Response: None (yet, may become an array of log message strings) 186 * Op result: OSReturn indicating processing/load+start result (see OSKextLib.h) 187 * 188 * Load one kexts which already exists in the kernel's address space as part 189 * of a kext collection. By default, the kext will start and have all of its 190 * personalities sent to the IOCatalogue for matching. 191 */ 192 #define kKextRequestPredicateLoadFromKC "LoadFromKC" 193 194 /* Predicate: LoadCodelessKext 195 * Argument: kKextRequestPredicateLoadCodeless 196 * Response: None (yet, may become an array of log message strings) 197 * Op result: OSReturn indicating processing/load+start result (see OSKextLib.h) 198 * 199 * Load one codeless kext. The input to this request is a single kext 200 * Info.plist dictionary contained in the kKextRequestArgumentCodelessInfoKey 201 * key. The personalities will be sent to the IOCatalogue for matching. 202 * 203 * See kKextRequestArgumentCodelessInfoKey for more info. 204 */ 205 #define kKextRequestPredicateLoadCodeless "LoadCodelessKext" 206 207 /* Predicate: Start 208 * Argument: kKextRequestArgumentBundleIdentifierKey (CFBundleIdentifier) 209 * Response: None (yet, may become an array of log message strings) 210 * Op result: OSReturn indicating start result (see OSKextLib.h) 211 * 212 * Start a kext by bundle id. If it's already started, returns success. 213 * If a kext's dependencies need to be started, they are also started. 214 */ 215 #define kKextRequestPredicateStart "Start" 216 217 /* Predicate: Stop 218 * Argument: kKextRequestArgumentBundleIdentifierKey (CFBundleIdentifier) 219 * Response: None (yet, may become an array of log message strings) 220 * Op result: OSReturn indicating stop result (see OSKextLib.h) 221 * 222 * Stop a kext by bundle id if it can be stoppoed. 223 * If it's already stopped, returns success. 224 * Does not attempt to stop dependents; that will return an error. 225 */ 226 #define kKextRequestPredicateStop "Stop" 227 228 /* Predicate: Unload 229 * Argument: kKextRequestArgumentBundleIdentifierKey (CFBundleIdentifier) 230 * Response: None (yet, may become an array of log message strings) 231 * Op result: OSReturn indicating stop+unload result (see OSKextLib.h) 232 * 233 * Stop and unload a kext by bundle id if it can be. 234 * Does not attempt to stop dependents; that will return an error. 235 */ 236 #define kKextRequestPredicateUnload "Unload" 237 238 /* Predicate: LoadFileSetKC 239 * Argument: kKextRequestArgument 240 * Response: None (yet, may become an array of log message strings) 241 * Op result: OSReturn indicating load result of kext collections 242 * 243 * Load Pageable and Aux kext collection. 244 */ 245 #define kKextRequestPredicateLoadFileSetKC "loadfilesetkc" 246 247 /* Predicate: MissingAuxKCBundles 248 * Argument: kKextRequestArgumentMissingBundleIDs 249 * Response: None 250 * Op result: OSReturn indicating success or failure 251 * 252 * Set the list of bundle IDs which may exist in the AuxKC, but 253 * which are missing from disk. This list represents kexts whose 254 * code exists in the AuxKC, but should not be loadable. 255 */ 256 #define kKextRequestPredicateMissingAuxKCBundles "MissingAuxKCBundles" 257 258 /* Predicate: AuxKCBundleAvailable 259 * Arguments: kKextRequestArgumentBundleIdentifierKey (CFBundleIdentifier) 260 * Boolean - kKextRequestArgumentBundleAvailability (optional) 261 * Response: None 262 * Op result: OSReturn indicating success or failure 263 * 264 * Set the availability of an individual kext in the AuxKC. 265 */ 266 #define kKextRequestPredicateAuxKCBundleAvailable "AuxKCBundleAvailable" 267 268 /* Predicate: DaemonReady 269 * Arguments: None 270 * Response: None 271 * Op result: OSReturn indicating whether daemon has already checked in 272 * 273 * Check whether the daemon has previously checked into the kernel. 274 */ 275 #define kKextRequestPredicateDaemonReady "DaemonReady" 276 277 #if PRAGMA_MARK 278 /********************************************************************/ 279 #pragma mark Requests Predicates - Kernel to User Space (kextd) 280 /********************************************************************/ 281 #endif 282 /* Predicate: Send Resource 283 * Argument: kKextRequestArgumentRequestTagKey 284 * Argument: kKextRequestArgumentBundleIdentifierKey 285 * Argument: kKextRequestArgumentNameKey 286 * Argument: kKextRequestArgumentValueKey 287 * Argument: kKextRequestArgumentResult 288 * Response: None 289 * Op result: OSReturn indicating result (see OSKextLib.h) 290 * 291 * Retrieves a resource file from a kext bundle. The callback corresponding 292 * to the request will be invoked. 293 */ 294 #define kKextRequestPredicateSendResource "Send Resource" 295 296 /********************************************************************* 297 * Kernel Requests: from the kernel or loaded kexts up to kextd 298 * 299 * These requests come from within the kernel, and kextd retrieves 300 * them using kKextRequestPredicateGetKernelRequests. 301 **********/ 302 303 /* Predicate: Kext Load Request 304 * Argument: kKextRequestArgumentBundleIdentifierKey 305 * Response: Asynchronous via a kKextRequestPredicateLoad from kextd 306 * Op result: OSReturn indicating result (see OSKextLib.h) 307 * 308 * Requests that kextd load the kext with the given identifier. 309 * When kexts loads the kext, it informs the IOCatalogue of the load. 310 * If the kext cannot be loaded, kextd or OSKext removes its personalities 311 * from the kernel. 312 */ 313 #define kKextRequestPredicateRequestLoad "Kext Load Request" 314 315 /* Predicate: Kext Load Notification 316 * Argument: kext identifier 317 * Response: None 318 * Op result: OSReturn indicating result (see OSKextLib.h) 319 * 320 * Informs kextd that the kernel has successfully loaded and started 321 * a kext. 322 */ 323 #define kKextRequestPredicateLoadNotification "Kext Load Notification" 324 325 /* Predicate: Kext Unload Notification 326 * Argument: kext identifier 327 * Response: None 328 * Op result: OSReturn indicating result (see OSKextLib.h) 329 * 330 * Informs kextd that the kernel has successfully stopped and unloaded 331 * a kext. 332 */ 333 #define kKextRequestPredicateUnloadNotification "Kext Unload Notification" 334 335 /* Predicate: Prelinked Kernel Request 336 * Argument: None 337 * Response: None 338 * Op result: OSReturn indicating result (see OSKextLib.h) 339 * 340 * Notifies kextd that the kernel we booted from was not prelinked, therefore 341 * that kextd should try to create a prelinked kernel now. 342 */ 343 #define kKextRequestPredicateRequestPrelink "Kext Prelinked Kernel Request" 344 345 /* Predicate: Kext Resource Request 346 * Argument: kKextRequestArgumentRequestTagKey 347 * Argument: kKextRequestArgumentBundleIdentifierKey 348 * Argument: kKextRequestArgumentNameKey 349 * Response: Asynchronous via a kKextRequestPredicateSendResource from kextd 350 * Op result: OSReturn indicating result (see OSKextLib.h) 351 * 352 * Requests a resource file from a kext bundle by identifier + filename. 353 */ 354 #define kKextRequestPredicateRequestResource "Kext Resource Request" 355 356 357 /* Predicate: IOKit Daemon Exit Request 358 * Argument: None 359 * Response: None 360 * Op result: OSReturn indicating result (see OSKextLib.h) 361 * 362 * Requests that the IOKit daemon (kernelmanagerd) exit for system shutdown. 363 */ 364 #define kKextRequestPredicateRequestDaemonExit "IOKit Daemon Exit" 365 366 /* For source compatibility 367 */ 368 #define kKextRequestPredicateRequestKextdExit kKextRequestPredicateRequestDaemonExit 369 370 371 /* Predicate: Dext Daemon Launch 372 * Argument: kKextRequestArgumentBundleIdentifierKey 373 * Argument: kKextRequestArgumentDriverExtensionServerName 374 * Argument: kKextRequestArgumentDriverExtensionServerTag 375 * Argument: kKextRequestArgumentDriverExtensionReslideSharedCache 376 * Argument: (optional) kKextRequestArgumentDriverUniqueIdentifier 377 * Response: Asynchronous via a DriverKit daemon checking in 378 * Op result: OSReturn indicating result (see OSKextLib.h) 379 * 380 * Requests kextd to launch a driver extension userspace daemon. 381 */ 382 #define kKextRequestPredicateRequestDaemonLaunch "Dext Daemon Launch" 383 384 /* Predicate: Dext Daemon Upgrade 385 * Argument: kKextRequestArgumentBundleIdentifierKey 386 * Argument: kKextRequestArgumentDriverUniqueIdentifier 387 * Response: None 388 * Op result: OSReturn indicating result (see OSKextLib.h) 389 * 390 * Informs kextd of an upgrade of driver extension userspace daemon. 391 */ 392 #define kKextRequestPredicateRequestDaemonUpgradeNotification "Dext Daemon Upgrade" 393 394 395 #if PRAGMA_MARK 396 /********************************************************************/ 397 #pragma mark - 398 #pragma mark Generic Request Arguments 399 /********************************************************************/ 400 #endif 401 /* Argument: Kext Load Requests 402 * Type: Array of dictionaries (see Load Request Arguments below) 403 * Used by: kKextRequestPredicateLoad 404 * 405 * An array of dictionaries, each describing a single load operation to 406 * be performed with its options. A kext load request is effectively a 407 * nested series requests. Currently only one load request is embedded 408 * in a user-space Load request, so the result is unambiguous. We might 409 * change this, specifically for kernelmanagerd, to allow all pending kernel 410 * load requests to be rolled up into one blob. Might not be much win 411 * in that, however. The nested logic makes the code difficult to read. 412 */ 413 #define kKextRequestArgumentLoadRequestsKey "Kext Load Requests" 414 415 /* Argument: CFBundleIdentifier 416 * Type: String 417 * Used by: several 418 * 419 * Any request that takes a bundle identifier uses this key. 420 */ 421 #define kKextRequestArgumentBundleIdentifierKey "CFBundleIdentifier" 422 423 /* Argument: OSReturn 424 * Type: Dictionary 425 * Used by: OSKext::copyInfo() 426 * 427 * Used to specify a subset of all possible info to be returned. 428 */ 429 #define kKextRequestArgumentInfoKeysKey "Kext Request Info Keys" 430 431 /* Argument: OSReturn 432 * Type: Number (OSReturn) 433 * Used by: several 434 * 435 * Contains the OSReturn/kern_return_t result of the request. 436 */ 437 #define kKextRequestArgumentResultKey "Kext Request Result Code" 438 439 /* Argument: Address 440 * Type: Number (OSReturn) 441 * Used by: OSKextGetUUIDByAddress 442 * 443 * Contains the address that needs to be looked up 444 */ 445 #define kKextRequestArgumentLookupAddressKey "Kext Request Lookup Address" 446 447 /* Argument: Value 448 * Type: Varies with the predicate 449 * Used by: several 450 * 451 * Used for all the Set-Enabled predicates, and also for Send Resource (OSData). 452 */ 453 #define kKextRequestArgumentValueKey "Value" 454 455 /* Argument: Filename 456 * Type: String 457 * Used by: kKextRequestPredicateSendResource 458 * 459 * Names the resource being sent to the kext 460 */ 461 #define kKextRequestArgumentNameKey "Name" 462 463 /* Argument: Filename 464 * Type: Data 465 * Used by: kKextRequestPredicateSendResource 466 * 467 * Contains the contents of the resource file being sent. 468 */ 469 #define kKextRequestArgumentFileContentsKey "File Contents" 470 471 /* Argument: Delay Autounload 472 * Type: Boolean 473 * Default: false 474 * 475 * Normally all kexts loaded are subject to normal autounload behavior: 476 * when no OSMetaClass instances remain for a kext that defines an IOService 477 * subclass, or when a non-IOService kext turns on autounload and its reference 478 * count drops to zero (external) references. 479 * 480 * Setting this property to true in a load request makes the kext being loaded 481 * skip ONE autounload pass, giving about an extra minute of time before the 482 * kext is subject to autounload. This is how kextutil(8) to delays autounload 483 * so that there's more time to set up a debug session. 484 * 485 * Setting this property in any other request causes OSKext::considerUnloads() 486 * to be called before processing the request, ensuring a window where kexts 487 * will not be unloaded. The user-space kext library uses this so that it can 488 * avoid including kexts that are already loaded in a load request. 489 */ 490 #define kKextRequestArgumentDelayAutounloadKey "Delay Autounload" 491 492 #if PRAGMA_MARK 493 #pragma mark Load Request Arguments 494 #endif 495 496 /********************************************************************* 497 * Kext Load Request Properties 498 * 499 * In addition to a bundle identifier, load requests can contain 500 * these optional keys. 501 * 502 * These properties are used primarily by kextutil(8) to alter default 503 * load behavior, but the OSKext user-level library makes them all 504 * available in OSKextLoadWithOptions(). 505 **********/ 506 507 /* Argument: StartExclude 508 * Type: Integer, corresponding to OSKextExcludeLevel 509 * Default: kOSKextExcludeNone if not specified 510 * 511 * Normally all kexts in the load list for a load request are started. 512 * This property is used primarily by kextutil(8) to delay start of 513 * either the primary kext, or the whole load list (any that weren't 514 * already loaded & started). 515 */ 516 #define kKextRequestArgumentStartExcludeKey "Start Exclude Level" 517 518 /* Argument: Start Matching Exclude Level 519 * Type: Integer, corresponding to OSKextExcludeLevel 520 * Default: kOSKextExcludeAll if not specified 521 * 522 * Normally no personalities are sent to the IOCatalogue for a regular 523 * kext load; the assumption is that they are already there and triggered 524 * the load request in the first place. 525 * 526 * This property is used primarily by kextutil(8) to delay matching for 527 * either the primary kext, or the whole load list (any that didn't 528 * already have personalities in the IOCatalogue). 529 */ 530 #define kKextRequestArgumentStartMatchingExcludeKey "Start Matching Exclude Level" 531 532 // see also Delay Autounload 533 534 /* Argument: Personality Names 535 * Type: Array of strings 536 * Default: All personalities are used 537 * 538 * Normally when personalities are sent to the IOCatalogue, they are all sent. 539 * This property restricts the personalities sent, for the primary kext 540 * being loaded, to those named. Personalities for dependencies are all sent, 541 * and there is currently no mechanism to filter them. 542 * 543 * This property is used primarily by kextutil(8) to help debug matching 544 * problems. 545 */ 546 #define kKextRequestArgumentPersonalityNamesKey "Personality Names" 547 548 /* Argument: Codeless Kext Info 549 * Type: Dictionary (Info.plist of codeless kext) 550 * Default: <none> (required) 551 * 552 * When loading a codeless kext, this request argument's value should be set 553 * to the entire contents of the Info.plist of the codeless kext. 554 * 555 * NOTE: One additional key should be injected into the codeless kext's 556 * plist: kKextRequestArgumentCodelessInfoBundlePathKey 557 */ 558 #define kKextRequestArgumentCodelessInfoKey "Codeless Kext Info" 559 560 561 /* Argument: _CodelessKextBundlePath 562 * Type: String <path> 563 * Default: <none> (required) 564 * 565 * This argument is a plist key that must be injected into the dictionary sent 566 * as the kKextRequestArgumentCodelessInfoKey value. It specifies the 567 * filesystem path to the codeless kext bundle, and will be used in kext 568 * diagnostic information. 569 */ 570 #define kKextRequestArgumentCodelessInfoBundlePathKey "_CodelessKextBundlePath" 571 572 #if PRAGMA_MARK 573 #pragma mark Unload Request Arguments 574 #endif 575 576 /* Argument: Terminate 577 * Type: Boolean 578 * Default: false 579 * 580 * An unload request may optionally specify via this key that all IOService 581 * objects are to be terminated before attempting to unload. Kexts with 582 * dependents will not attempt to terminate and will return kOSKextReturnInUse. 583 */ 584 #define kKextRequestArgumentTerminateIOServicesKey "Terminate IOServices" 585 586 #if PRAGMA_MARK 587 #pragma mark Daemon Launch Request Arguments 588 #endif 589 590 /* Argument: Server tag 591 * Type: Integer 592 * Default: N/A 593 * 594 * A DriverKit daemon launch request must include a "server tag" that 595 * is unique to every launch request. Userspace daemons include this 596 * tag in their messages when attempting to rendez-vous with IOKit. 597 */ 598 #define kKextRequestArgumentDriverExtensionServerTag "Driver Extension Server Tag" 599 600 /* Argument: Server name 601 * Type: String 602 * Default: N/A 603 * 604 * A DriverKit daemon launch request must include a "server name" that 605 * can be used to identify what personality the driver is matching on. 606 * This name is also used for the launchd service name of the daemon. 607 */ 608 #define kKextRequestArgumentDriverExtensionServerName "Driver Extension Server Name" 609 610 /* Argument: DriverKit Reslide Shared Cache 611 * Type: Boolean 612 * Default: N/A 613 * 614 * Set this option to reslide the DriverKit shared cache. This helps prevent ASLR circumvention 615 * with brute-forcing attacks. 616 */ 617 #define kKextRequestArgumentDriverExtensionReslideSharedCache "DriverKit Reslide Shared Cache" 618 619 /* Argument: DriverKit dext unique identifier 620 * Type: Data 621 * Default: N/A 622 * 623 * A DriverKit daemon launch request can include the dext unique identifier 624 * This name is also used for the upgrade notifation. 625 */ 626 #define kKextRequestArgumentDriverUniqueIdentifier kOSBundleDextUniqueIdentifierKey 627 628 #if PRAGMA_MARK 629 #pragma mark Missing AuxKC Bundles Arguments 630 #endif 631 632 /* Argument: Missing Bundle IDs 633 * Type: Array 634 * Default: N/A 635 * Used by: kKextRequestPredicateMissingAuxKCBundles 636 * 637 * This array of bundle IDs represents the list of kexts which have been 638 * removed from disk, but still exist in the AuxKC. 639 */ 640 #define kKextRequestArgumentMissingBundleIDs "Missing Bundle IDs" 641 642 /* Argument: Bundle Availability 643 * Type: Boolean 644 * Default: true 645 * Used by: kKextRequestPredicateAuxKCBundleAvailable 646 * 647 * If present, this argument can indicate that the specified bundle ID 648 * is no longer available for loading from the AuxKC 649 */ 650 #define kKextRequestArgumentBundleAvailability "Bundle Availability" 651 652 #if PRAGMA_MARK 653 #pragma mark Internal Tracking Properties 654 #endif 655 /********************************************************************* 656 * Internal Tracking Properties 657 **********/ 658 659 /* Argument: Request Tag 660 * Type: Number (uint32_t) 661 * Used by: internal tracking for requests with callbacks 662 * 663 * Most requests to get resources (files) use this. 664 */ 665 #define kKextRequestArgumentRequestTagKey "Request Tag" 666 667 /* Argument: Request Callback 668 * Type: Data (pointer) 669 * Used by: internal tracking 670 * 671 * Most requests to get resources (files) use this. 672 */ 673 #define kKextRequestArgumentCallbackKey "Request Callback" 674 675 /* Argument: Request context. 676 * Type: OSData (wraps a void *) 677 * Used by: several 678 */ 679 #define kKextRequestArgumentContextKey "Context" 680 681 /* Argument: Request Stale 682 * Type: Boolean 683 * Used by: internal tracking 684 * 685 * _OSKextConsiderUnloads sets this on any callback record lacking 686 * it, and deletes any callback record that has it. 687 */ 688 #define kKextRequestStaleKey "Request Stale" 689 690 /* Argument: Check In Token 691 * Type: Mach Send Right 692 * Used by: DriverKit daemon launch 693 */ 694 #define kKextRequestArgumentCheckInToken "Check In Token" 695 696 #if PRAGMA_MARK 697 #pragma mark fileset load request arguments 698 #endif 699 700 /* Argument: PageableKCName 701 * Type: String (path) 702 * Used by: kKextRequestPredicateLoadFileSetKC 703 * 704 * Name of the Pageable fileset kext collection 705 */ 706 #define kKextRequestArgumentPageableKCFilename "PageableKCName" 707 708 /* Argument: AuxKCName 709 * Type: String (path) 710 * Used by: kKextRequestPredicateLoadFileSetKC 711 * 712 * Name of the Aux fileset kext collection 713 */ 714 #define kKextRequestArgumentAuxKCFilename "AuxKCName" 715 716 /* Argument: Codeless Personalities 717 * Type: Array of Dictionaries 718 * Used by: kKextRequestPredicateLoadFileSetKC 719 * 720 * Any array of DriverKit driver (and codeless kext) personalities 721 */ 722 #define kKextRequestArgumentCodelessPersonalities "Codeless Personalities" 723 724 #if PRAGMAA_MARK 725 #pragma mark kext collection request arguments 726 #endif 727 728 /* Argument: Collection 729 * Type: String 730 * Used by: kKextRequestPredicateGetKextsInCollection 731 * 732 * Contains a string describing the type of kext collection 733 */ 734 #define kKextRequestArgumentCollectionTypeKey "Collection Type" 735 736 /* Argument: LoadedState 737 * Type: String 738 * Values: Any, Loaded, Unloaded 739 * Default: Any 740 * Used by: kKextRequestPredicateGetKextsInCollection 741 * 742 * If present, this argument limits the GetKextsInCollection output to: 743 * Loaded -- only kexts which have been loaded 744 * Unloaded -- only kexts which have been unloaded 745 * Any -- return all kexts in a collection 746 */ 747 #define kKextRequestArgumentLoadedStateKey "Loaded State" 748 749 #ifdef __cplusplus 750 }; 751 #endif /* __cplusplus */ 752 753 #endif /* _LIBKERN_KEXT_REQUEST_KEYS_H */ 754