Deciding Whether to Create a Kernel Extension

There are often safer, easier alternatives to creating a kernel extension (kext). It is important to make sure creating a kext is absolutely necessary before doing so.

Make Sure Your Code Needs to Run in Kernel Space

The only reason to write a kext instead of a user-level application or plug-in is to use functionality that is unique to kernel space. The following cases require kernel-resident code:

If your code does not meet any of the above criteria, do not write a kext. Use one of the following user-level solutions instead:

Proceed with Caution

If you have determined that a kext is the proper solution for your issue, keep in mind that developing a kext is riskier and more difficult than developing a user-level application for many reasons, including the following: