I'm currently writing a Linux kernel module, and have problems implementing its communication with user space programs.
This kernel module needs to receive tasks issued by a user space program, and send results back to user space program after completion. The user space program should be blocked while the kernel module is doing its job.
I think a kernel-user space IPC or an Unix socket would be sweet, but I had no luck finding an example by Google.
Currently my ugly solution is to export a chardev
and let user space program write requests to the device file, and read results from it. But I can only issue one request per open()
call, and this is causing new problems. I really need an IPC or socket-like thing. Thanks!