kemon
kemon copied to clipboard
Sending data from kext to user space synchronously
Hello, Thank you for writing a so great framework. I'm a new MacOS developer. I'm wondering if there is a way to send data from kext to user space daemon and wait there for response. My Kauth callback function needs some user space daemon processing to check whether a file open operation should be denied. I'd like to use the Kernel Control API because it's powerful as well as easy to understand. But according to documentation, ctl_enqueuedata() just puts data in a queue and return immediately. The use space daemon needs to call recv() to get the data. I have no idea how I can do to wait for response(for example, suspend the kernel thread by calling sleep() and wake up when I receive data). Could you please give me some suggestions? Thanks!
By the way, when I change DEFAULT_SETTING to "add com.apple.kauth.vnode", the console.app cannot show any logs. Could you share how I can switch the vnode listener on? Thanks!