Does anyone know how to send data from a kernel module to a userspace app, via signals? Actually, I have a kernel module that uses the function send_sig_info() to notify a userspace app (registered through ioctl) about some events happening in the kernel space. I would like to include some data that describe those events in the siginfo data structure (particularly, via the si_ptr field, if I'm not mistaken). Is there any sample code that does that? Besides, what about memory freeing? Normally, it should be done by the userspace app, right ?! So, how can the userspace app frees memory that was allocated by the kernel? Any hint related to this problem is most welcomed. Thank you.
P.S.: This post is focused on using signals and not other IPC techniques, such as Netlink or shared memory.