kemon icon indicating copy to clipboard operation
kemon copied to clipboard

Sending data from kext to user space synchronously

Open leochou0729 opened this issue 5 years ago • 1 comments

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!

leochou0729 avatar Jul 23 '19 06:07 leochou0729

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!

leochou0729 avatar Jul 23 '19 10:07 leochou0729