Post not yet marked as solved
I understand that a
Company’s hardware vendor ID
is required for requesting Entitlements for DriverKit. Does this means DriverKit is only targeted for hardware vendors?
Does Apple allows third party (not the hardware vendor) entitlements for DriverKit? Our company is exploring the development of generic open source drivers on iPad for label printers such as those by Zebra. Is this allowed?
Post not yet marked as solved
With the advertisement of enhanced IO support on iPadOS16 - Will developers be able to take advantage of IOKit aswell?
Post not yet marked as solved
Will it be possible to create drivers on iPad for Human Interface Devices such as an external stylus?
How do we compile a driverkit as library. Does this need any special entitlements?
Post not yet marked as solved
As I understand, for Network packet transmission, IOKit use the following methods: 1. IOOutputQueue calls the outputPacket() method of network driver to send packets to the device. 2. IOGateOutputQueue dequeue packets on network driver's workloop (send packets to the network driver). And now, how does it implement using the DriverKit/NetworkingDriverKit framework? I have seen Networking has 4 packet queues: IOUserNetworkingRxSubmissionQueue, IOUserNetworkingRxCompletionQueue, IOUserNetworkingTxSubmissionQueue, IOUserNetworkingTxCompletionQueue; How to use them with IODispatchQueue? or IODataQueueDispatchSource?
Post not yet marked as solved
All dequed packets from sumbmission queues are enqued properly to completion queue after posting to stack.
But After running heavy traffic (running iperf -b 1000m) for few times, dequeue fails and always return 0. When I check error code with dequeuePacket API it gets error 2e7. (which is underrun error)
Why dequeue fails?
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.
Post not yet marked as solved
Hi,
With BigSur 11.6.5, the logs in the driver extension is not coming in console.
It works fine in Monterey and previous versions of BigSur. Is there any known issue related to kernel logs in BigSur 11.6.5?
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
Post not yet marked as solved
As the entitlement still not approved by Apple, I'm now testing the example "DriverkitUserClientSample" locally. I have disabled SIP , activate "systemextensionsctl developer on" , and also sign to run locally in build Settings. The thing is that i can build the project , but i still can see these log messages on my console.
"amfid ::Basic requirement validation failed, error: (null)",
"amfid:: driver signature not valid: -67050"
Is that means i still cant test example without the entitlements ? or anything i can do to go on ?
Post not yet marked as solved
I am porting some code with heavy use of stdlib and CF.
Linking against CF produces the error: CoreFoundation is not available when building for DriverKit.
I get errors like error: no member named 'clock_t' in the global namespace.
What is the correct approach here?
Could I statically link stdlib?
Should I move my processing code to a separate process?
Related:
https://stackoverflow.com/questions/61797150/can-i-use-stl-in-a-driverkit-driver/61820426#61820426
Post not yet marked as solved
Hi,
I'm looking for a developer to update a currently Intel-only legacy kext into a system extension so it works on M1 / ARM / Apple Silicon.
Here's the problem:
I'm a heavy user of a legacy software named ControllerMate. Unfortunately, it has been abandoned by the developer and he didn't make it open-source. The latest update was in late 2018 and the developer has stopped responding entirely and can not be reached, even to previous beta-testers. Confirmed by several power users who tried over the years.
The app basically allows creation of macros and cascades and is extremely powerful. It's used by many people in the video post production and music production space in their professional workflows, and people built individual workflows around this over the years to work faster and more efficiently.
Since it hasn't been updated, people are somewhat stuck and can't upgrade without breaking their workflows. Especially now with the new and powerful M1s, this becomes much more urgent and relevant again.
The kext might have to be reverse engineered or hacked - I know, not something people in an Apple developer forum wanna hear, but we're desperate to find somebody for this and keep this going.
I truly appreciate any input, insights and leads!
Thank you!
Post not yet marked as solved
I read the doc of installing system extensions
https://developer.apple.com/documentation/systemextensions/installing_system_extensions_and_drivers?language=objc
, but actually our product is a framework and installed by .pkg.
I/O Kit kext is installed by script in .pkg.
So I meet a problem :how to install DriverKit dext by script?
Post not yet marked as solved
On the same computer, using Xcode to run the APP to install DriverKit, my USB device can work, and I can see the output os_log.
But using Xcode archive Export Notarized App, installing DriverKit, the USB device does not work, and the system os_log cannot be seen.
Is there any difference between these two installations?
Run the systemextensionsctl command-line tool with the list option from Terminal, the two are the same DriverKit [activated enabled].
Post not yet marked as solved
Hi,
I need to develop a cross-plateform driver extension (similar to a Windows Audio Processing Object (APO)) for an Audio Device and I'm struggling with associating the driver to a USB Audio Device.
I'm using the SimpleAudioDriver example and override the device_uid with the Product ID and the manufacturer_uid with the Vendor ID.
As I understand it with this documentation :
https://developer.apple.com/news/?id=zk5xdwbn
it should associate my driver with the device but it creates a new device.
If you have any hints, please get back to me.
Thanks.
Post not yet marked as solved
I manage a system that automatically generates system extensions, and in order to ensure that every release's dext can be activated over top of any other release, I have it increment the dext's CFBundleVersion so that every release has a unique version number.
However I just hit an error where, once CFBundleVersion reached 10000, dext activation would fail with this error:
Property "CFBundleVersion" must be a valid kext version
Apparently the maximum value any one of the three digits can be for CFBundleVersion is 9999, at least for a dext. So if CFBundleVersion only uses one number as opposed to three, it can't go higher than 9999.
Note that I found this out from experimentation. No where in Apple's documentation have I found any mention of this restriction, including, most distressingly, in the docs for CFBundleVersion.
Since I'm programmatically assigning this value, now I need to know: Are there any other requirements or restrictions for CFBundleVersion?
I'm curious if there are any in the context of an app (be it on macOS, iOS, tvOS, and so on) or other types of extensions, as well as with a DriverKit extension.
Post not yet marked as solved
Dear all
I develop a driver for Mac OS . I have request the entitlement a long time( half year). but I can't get any message .
I want to know. how to get a pic driver of entitlement.
thanks !
I read the example "Communicating Between a DriverKit Extension and a Client App".
https://developer.apple.com/documentation/driverkit/communicating_between_a_driverkit_extension_and_a_client_app
But I still don't know, can I communicate with DriverKit through SwiftUI APP?
Instead of using IOServiceOpen in CppUserClient, can I use IOServiceOpen in SwiftUI APP like this?
Or are there other options?
Post not yet marked as solved
We have a set of storage devices communicating on the SCSI protocol and the NVMe protocol connected over USB3 and TB3. These devices support some custom management commands which we would like to issue from our management application. (Currently we use custom kexts to take control of the device and issue the management commands and then unload the kexts and release the device into the control of the OS storage stack. [Note that these management commands are not I/O related. All I/O takes place through the OS Storage stack].).
1- Given that kexts are deprecated in the future versions of Mac OS, Big Sur and upwards, what is the recommended solution strategy?
2- If dexts are developed and deployed how does one take control of the device exclusively for a period and then return it to the control of the OS storage stack once again using dexts?
3- Will the dext based architecture require any modifications in the future ARM based hardware platforms running Mac OS?
I've been creating a virtual ethernet interface. I've opened asynchronous communication with a controlling application and every time there are new packets, the controlling app is notified and then asks for the packet data. The packet data is stored in a simple struct, with uint8_t[1600] for the bytes, and uint32_t for the length. The dext is able to populate this struct with dummy data every time a packet is available, with the dummy data visible on the controlling application. However, I'm struggling to fill it with the real packet data.
The IOUserNetworkPacket provides metadata about a packet. It contains a packets timestamp, size, etc, but it doesn't seem to contain the packet's data. There are the GetDataOffset() and GetMemorySegmentOffset() methods which seem to return byte offsets for where the packet data is located in their memory buffer. My instinct tells me to add this offset to the pointer of wherever the packet data is stored. The problem is I have no idea where the packets are actually stored.
I know they are managed by the IOUserNetworkPacketBufferPool, but I don't think that's where their memory is. There is the CopyMemoryDescriptor() method which gives an IOMemoryDescriptor of its contents. I tried using the descriptor to create an IOMemoryMap, using it to call GetAddress(). The pointers to all the mentioned objects lead to junk data.
I must be approaching this entirely wrong. If anyone knows how to access the packet data, or has any ideas, I would appreciate any help. Thanks.