Post

Replies

Boosts

Views

Activity

Example driver project crashes
Hi, I am trying to run an example driver project from https://developer.apple.com/documentation/driverkit/communicating_between_a_driverkit_extension_and_a_client_app?language=objc The project compiles fine, the driver extension is successfully installed and running, however when the client application tries to communicate with the driver (calls IOConnectCallScalarMethod CppUserClient/main.cpp, line 236), the driver crashes, even though there are no modifications of the example code. Does anybody know how to fix it? The project doesn't use any provisioning profile, all three targets are signed to run locally as described in the link. My system: MacOS 11.5.2 BigSur Apple M1 chip XCode 13.2.1 System Integrity Protection status: disabled. systemextensionsctl developer: Developer mode is on also ran command "sudo nvram boot-args=-arm64e_preview_abi" crash report program CppUserClient output
4
0
2.0k
Feb ’22
Read a file in DriverKit
I am working on a USBDriverKit project and would like to ask if it is possible in driver's code to read a file which is stored outside of the driver bundle? The reason, why the file has to be stored somewhere else than inside of the driver bundle, is that the file's contents should be written by a client app. Therefore it is not possible to use for reading e.g. OSBundle::loadResource method, as the driver bundle inside the /Library/SystemExtensions directory is not writeable by the client app.
1
0
762
Jun ’22
Missing documentation for OSMappedFile
I am working on a DriverKit project and the new class OSMappedFile sounds like something I am looking for, at least from what I understood from the description in the header file. https://developer.apple.com/documentation/driverkit/osmappedfile I've tried different combinations, however the method OSMappedFile::createFromPath always returns an error 0xe00002bc (general error), which is not helpful at all. Could you please provide more details about the class and how to use it? Is it possible to open an arbitrary file in an arbitrary location? Does the owner of the file matter? Does the entitlements have to be modified somehow? Thanks for reply I am testing it on Monterey 12.3.1, my driver is linking DriverKit 21.0, no provisioning profile, SIP is off.
3
0
1.2k
May ’22