Alternative for Virtual file system (VFS) kernel extension

Hello,

we have developed a kernel extension (KEXT) for a virtual file system (VFS) to integrate our software with external programs like Adobe InDesign or Microsoft Word. Our software and the KEXT are used by many of our customers.

As it looks like KEXTs are deprecated and may be removed completely in future versions of macOS, particularly on Apple Silicon based computers. See e.g. Apple's announcement in its security guide:

"This is why developers are being strongly encouraged to adopt system extensions before kext support is removed from macOS for future Mac computers with Apple silicon"

Therefore we are currently investigating in possible alternatives.

Apple suggests to migrate to System Extensions instead of KEXTs. However, the only VFS related API we found is to implement a File Provider that is based on an NSFileProviderReplicatedExtension.

Unfortunately that NSFileProviderReplicatedExtension has several flaws:

  1. Files can either be in the cloud or downloaded. It is not possible to download/read only a portion of a file. This is a big performance problem for us, since we work with large images (> 1GB). The programs we integrate with typically only read a part of the image, e.g. the embedded preview. The API does not offer a way to access selected blocks of a file (random access file).
  2. The File Provider learns about the file system content via enumerators. So everything that is inside a folder must be enumerated (listed) first. Otherwise it cannot be accessed. However, we cannot enumerate our VFS. Most of the content of our VFS is fully dynamic. It only exists when it is accessed by a client the first time. Such dynamic content also includes dynamic parameters like the client's locale or the size of a box where the image will be placed. Since we do not know those parameters in advance, we cannot enumerate the VFS's content in advance.

This means, an NSFileProviderReplicatedExtension in its current state isn't a replacement for a "real" VFS and therefore cannot be used by us as a replacement for our current VFS KEXT.

My questions:

  1. Will Apple allow kernel extensions also in future versions of (Apple Silicon/M1 based) operating systems? Or is there at least a clear deadline?
  2. If not, what is Apple's officially suggested replacement for KEXT based VFS solutions?
  3. Will the API of an NSFileProviderReplicatedExtension be improved to behave like a "real" file system so that above mentioned flaws will no longer be an issue?

Many thanks for any answers or comments!

Best regards,

Michael

Will Apple allow kernel extensions also in future versions of (Apple Silicon/M1 based) operating systems? Or is there at least a clear deadline?

No concrete deadline has been announced. Moving away from KEXTs is a long-term process. Some KEXT technologies have already been removed, some still work but have been deprecated in favour of a user-space alternative, and some are still waiting for their user-space alternative to be announced.

The situation with VFS plug-ins is nuanced. Many of the existing VFS plug-ins can be replaced by a file provider but, as you’ve pointed out, that’s not universally true. My advice is that you file bugs about all the sticking points you encounter. That’s the best way to ensure that the team working on this understands your unique requirements before they finally pull the plug (so to speak :–) on VFS plug-ins.

Please post the bug numbers for any bugs you file, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thank you for the answer, Quinn! As suggested, I opened tickets via Feedback Assistant. Here are the IDs and links for reference:

  • FB9126200 (NSFileProviderReplicatedExtension does not allow to read/download partial file)
  • FB9126221 (NSFileProviderReplicatedExtension enumerators limit its use cases as replacement for "real" VFSs)

Have you gotten any response on the tickets you raised, @Michael? It seems those were closed, and I cannot view them.

Alternative for Virtual file system (VFS) kernel extension
 
 
Q