I built a self-made kernel extension (named KAuthTest.kext
) and would like to test it out. So in a VM running macOS 10.12.3, I did the followings:
- disable SIP by running
csrutil disable
in recovery mode, and reboot. - disable kext signing check by running
sudo nvram kext-dev-mode=1
and reboot - give it permission:
sudo chown -R root:wheel KAuthTest.kext
Then I load it using sudo kextload KAuthTest.kext
.
However,
- in the system log, I didn't see the log from its start function
- when I run
kextstat | grep -v com.apple
to see all third party kexts, I didn't see my kernel extension.
So did I miss something? How I can successfully load this into the kernel?
Note:
kextutil -n -print-diagnostics KAuthTest.kext
gives this:Diagnostics for KAuthTest.kext: Code Signing Failure: code signature is invalid KAuthTest.kext appears to be loadable (including linkage for on-disk libraries).
- I did try rebooting, but still no luck
- If it matters, here's the source code for the kext
$ sudo nvram boot-args="kext-dev-mode=1"
# Has No Effect ... – l'L'lkext
codesigned by chance? – l'L'l/Library/Extensions
since El Capitan. Only unsigned kexts could ever be in/System/Library/Extensions
, but unsigned kexts are no longer allowed to load.", that coming from here: lists.apple.com/archives/darwin-kernel/2016/Jun/msg00010.html. So I'm guessing that it does need to be codesigned. – l'L'l