Questions tagged [driverkit]

DriverKit is a device driver development framework for Apple's macOS and iPadOS operating systems, introduced with macOS 10.15 "Catalina" and later added to iPadOS in version 16.

General information

DriverKit is a device driver development framework for Apple's macOS operating system, introduced with macOS 10.15 "Catalina." It was later also added to iPadOS in version 16.

The DriverKit SDK is contained in Apple's Xcode IDE distribution (from version 11 onwards), and is used to build so-called "driver extensions" or "dext" which run in special privileged user space processes. These extensions are installed by apps using the system extensions mechanism.

The DriverKit SDK interfaces with the wider IOKit infrastructure, both in kernel and general user space.

Features

As of macOS 10.15, the following types of driver can be implemented using DriverKit:

As of macOS 10.15.4, the following types of driver can additionally be implemented:

macOS 11.3 added support for:

macOS 12 added APIs for:

iPadOS 16 supports:

  • USBDriverKit
  • PCIDriverKit (Thunderbolt)
  • AudioDriverKit

Relevant question topics

  • Questions about which driver technology is the correct one to for implementing a driver for a particular device. In addition to DriverKit, drivers on macOS may also be implemented using a kext (kernel extension) or as a regular user space process, depending on the underlying device technology (USB, PCI, Firewire, etc.), the type of device (storage, network, audio, display, etc.), and the macOS version(s) targeted.
  • Questions related to the process of building, code signing, and packaging dexts. There is some overlap with macos-system-extension tag, using both can be appropriate when talking about the installation/activation process and APIs.
  • Code-level questions for implementing DriverKit based drivers. Co-tag with hid, usb, pci, etc. as appropriate when discussing specific types of device.
  • Questions about interaction of DriverKit drivers with the rest of the system, be it kexts or user space (app) clients. This will typically overlap with the iokit tag.
102 questions
3
votes
1 answer

PCIE DriverKit cannot be loaded correctly due to entitlements issues

My question I already have the correct entitlements, provisioning profile and development certification, and I have turned off SIP, turned on systemextensions developer on, but it still shows provider entitlements check failed. Similar…
xmx
  • 51
  • 3
3
votes
1 answer

macOS DriverKit: Making PCI dext to replace built-in driver

I'm trying to write a user-space PCI driver in DriverKit for educational/research purposes. I've found an example from WorthDoingBadly which has the boilerplate code for a PCI device dext (I've removed the exploit code). I've modified it to match a…
Mads Y
  • 342
  • 1
  • 4
  • 12
3
votes
1 answer

MacOS custom Audio Driver doesn't override the default Driver

We are developing a custom audio driver for a USB microphone in order to do simple processing (EQs) on the input audio stream (comparable to an APO for Windows). After some help, we managed to assign our Driver (based on the SimpleAudioDriver) to…
kinaar
  • 51
  • 4
3
votes
0 answers

Can't get Driver properties using IORegistryEntryCreateCFProperties on iPadOS 16.1

We are developing our Driver using DriverKit. In client App we successfully discover our driver but can't get IORegistry properties except IOClass. So in a client App we use following code to read properties: private func debugRegistry(device:…
Myurik
  • 53
  • 2
3
votes
1 answer

MacOS PCI dext: scatter-gather DMA to application buffer

I am porting a MacOS PCI driver written with IOKit to the new PCIDriverKit framework. I am able to perform DMA with a contiguous buffer allocated inside the dext (with IOBufferMemoryDescriptor::Create). But I would also like to perform DMA to and…
3
votes
0 answers

When can I expect OSAction::Cancel handler to be called?

I have a Driverkit driver that takes care of a USB device. The driver unpacks data in the USB packets, and writes the data to buffers that are shared between the app and the driver. The shared buffers are created by the app with…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
3
votes
1 answer

How to implement and publish virtual audio driver to Apple App Store?

At 3:38-4:00 in the session video, it seems Baek San Chang says that AudioDriverKit will not be allowed to be used for virtual audio devices Video: https://developer.apple.com/videos/play/wwdc2021/10190/ Here is what he says: Keep in mind that the…
user1884325
  • 2,530
  • 1
  • 30
  • 49
3
votes
1 answer

PCIDriverKit Entitlement check failed (migrate KEXT to DEXT)

kernel: DK: MyDriver-0x100000f45: provider entitlements check failed kernel: DK: IOUserServer(com.MyDriver-0x100000f45)::exit(Entitlements check failed) kernel: (com.MyDriver.dext) Kernel requested exit (Entitlements check failed) I'm trying to…
jreing
  • 281
  • 1
  • 11
3
votes
1 answer

DEXT crashes on macOS 10.15.7

I successfully built and ran Apple's sample Communicateing Between a DriverKit Extension and a Client App on macOS 11, meaning I can install the DEXT and also control it via it's client. On macOS 10.15.7 though, I can build it and install the DEXT,…
cro76
  • 33
  • 4
3
votes
1 answer

How to get DriverKit System Extension log output

In this part of the 2019 WWDC session demo of DriverKit System Extensions you can see the driver and only the driver's log output being streamed using this command: log stream --predicate 'sender = "MyUserUSBInterfaceDriver.dext"' --style syslog I…
Rhythmic Fistman
  • 34,352
  • 5
  • 87
  • 159
3
votes
1 answer

Migrating from codeless KEXT to DEXT. Usb interfaces disappeared

I'm trying to migrate from KEXT to DEXT. My USB device should not be matched by the classic driver (in the other case, it does not allow to open the device and interface). I am using a sample USB application for testing. So, before installing the…
sskoryn
  • 31
  • 1
3
votes
1 answer

How to allocate memory in a DriverKit system extension and map it to another process?

I have allocated memory in my application and passed its pointer and size to IOConnectCallStructMethod. Using IOMemoryDescriptor::CreateMapping I have then mapped this memory to the DriverKit system extension process, and it is possible to write to…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
3
votes
1 answer

Performance issue after migrating from codeless KEXT to DEXT

I am working on migrating a codeless KEXT to DriverKit. It is used to disable the IOKit HID driver for USB devices that present themselves as HID compliant in firmware upgrade mode. So far I have managed to match an empty subclass of IOService to…
3
votes
1 answer

How should "NewUserClient" be implemented

I am trying to interact with a dext from an application. I am able to find the service using IOServiceOpen and I get a call to NewUserClient of my dext (I can see the type parameter passed being output in the log). After this I am a bit lost.…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
2
votes
1 answer

Check if a DriverKit driver has been enabled in the iOS settings

I have an app that contains a DriverKit dext bundled in. I'm trying to check if the user has enabled the driver through the Settings in the app-specific settings page (under the DRIVERS subheading) or in Privacy & Security > Drivers. Unfortunately…
thoms
  • 55
  • 5