Page 1 of 1

Is DriverKit a workable alternative to a kext on macOS ?

PostPosted: Fri Dec 23, 2022 3:25 am
by dafdaf
Are the alternatives Apple lists here workable for OpenZFS on macOS ? (That would be DriverKit, correct ?)

Alternatives to kexts (macOS 10.15 or later)

macOS 10.15 allows developers to extend the capabilities of macOS by installing and managing system extensions that run in user space rather than at the kernel level. By running in user space, system extensions increase the stability and security of macOS. Even though kexts inherently have full access to the entire operating system, extensions running in user space are granted only the privileges necessary to perform their specified function.

Developers can use frameworks, including DriverKit, EndpointSecurity, and NetworkExtension, to write USB and human interface drivers, endpoint security tools (like data loss prevention or other endpoint agents), and VPN and network tools, all without needing to write kexts. Third-party security agents should be used only if they take advantage of these APIs or have a robust road map to transition to them and away from kernel extensions.


Thanks

Re: Is DriverKit a workable alternative to a kext on macOS ?

PostPosted: Fri Dec 23, 2022 7:07 am
by jawbroken
As I understand it, and as it says there, DriverKit only handles "USB and human interface drivers" at the moment, and not file systems. I think they'll probably support it eventually, though, before killing off kernel extensions entirely.

Re: Is DriverKit a workable alternative to a kext on macOS ?

PostPosted: Mon Dec 26, 2022 3:46 pm
by lundman
Yeah at the moment, there is no file system support, and even if they do port over the iphone Kit it only deals with higher level things like a "file" or "directory", so nothing below. We will have to wait and see what they do.

Re: Is DriverKit a workable alternative to a kext on macOS ?

PostPosted: Thu Mar 16, 2023 2:26 pm
by Bottacco
There is another project on GitHub for a free iSCSI initiator that are having a similar problem. They are commenting that "IOUserSCSIParallelInterfaceController" can be used but Apple has not provided a mechanism for opening sockets from within system extensions (network sockets, that is) so they can't continue right now.

But I think that the OpenZFS on OS X transition to a System Extension instead of a kernel extension will probably go that route with "IOUserSCSIParallelInterfaceController".

Am I too far off?