Reputation: 1026
I have a Linux kernel module which contains the interrupt handler, and would like to somehow notify the user-space application after the interrupt was handled. Please tell me, how to do it?
Upvotes: 4
Views: 3626
Reputation: 2631
I'm directly answering this question as it's the top result in Google for "kernel send signal to user space".
I typically use signal to kill the userspace process to examine it's stack as it calls ioctls. Typically the following works for me:
force_sig(SIGSEGV, current);
Upvotes: 0
Reputation: 13626
/proc
or /sys
(see this question).Upvotes: 4
Reputation: 4188
Use the netlink.
Netlink socket is a special IPC used for transferring information between kernel and user-space processes. It provides a full-duplex communication link between the two by way of standard socket APIs for user-space processes and a special kernel API for kernel modules. Netlink socket uses the address family AF_NETLINK, as compared to AF_INET used by TCP/IP socket. Each netlink socket feature defines its own protocol type in the kernel header file include/linux/netlink.h.
Upvotes: 3