tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Interface for communicating from kernel to user mode
On Wed, Mar 05, 2025 at 01:53:22PM +0100, Peter Skvarka wrote:
> Thank you, I have this commit on my machine and investigating it.
>
> Described AF_LOCAL sockets are for me candidate no.1.
> I am also considering using signal (siginfo.h and signalvar.h) for sending
> signal from kernel to user process with small data.
> But like I described I need bidirectional communications,
> does provide signal interface in siginfo.h and signalvar.h also sending
> signal from user space to kernel module ?
> Or what do you thing about this idea at all ?
In the past, I have used a cloning device node, and ioctl, for this. You
can define and implement arbitrary message-passing interfaces in that way.
And you can either have the ioctl block waiting for kernel response, or
you can implement select/poll/kevent.
The other super quick way to do this, though it's a little hacky, is with
our dynamic sysctl(3)/sysctl(9) framework. However, in that case, you
will have to poll for changes originated on the kernel side.
--
Thor Lancelot Simon tls%panix.com@localhost
"The liberties...lose much of their value whenever those who have greater
private means are permitted to use their advantages to control the course
of public debate." -John Rawls
Home |
Main Index |
Thread Index |
Old Index