General questions on DriverKit

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?

Hi @ftabrizi Have you found any solution??

I have tried two types of DEXTs one using USBDriverKit for SCSI protocol and another using PCIDriverKIt for NVMe protocol. In both case I'm able to get exclusive access to device but in this case volume is not mounting. If for getting exclusive access Open ahs to be used and to release device Close has to be used.

But even if we use Close to release device, machine reboot is required to completely release device into the control of OS Storage stack. Also next time DEXT loads automatically so again Open call will get exclusive access to device so after Close call DEXT deactivation has to be done to completely release device and then reboot.

So this solution does not feel a working solution alternative to KEXT. Apple has not clarified whether DriverKit can be used for Storage device. Good thing is that custom KEXTs for storage devices still loads and works properly.

My question here to you is that in case of KEXT when you unload your KEXT then how device control goes to OS Storage stack without machine reboot?? Do you reboot your machine??

And if you have find KEXT alternative solution for SCSI and the NVMe protocol then please share the information you have. It would help others to for migrating from KEXT to DEXT.a

Thanks

General questions on DriverKit
 
 
Q