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
> Thank you, I have this commit on my machine and investigating it.
Yes, I see the upload-pack connection in my logs. I'll be happy to
explain anything that's unclear there (well, as best I can; my memory
may be a bit fuzzy after twenty-plus years).
Of course, you probably will want only a small fraction of the kernel
code from that commit; what's there includes not just the basic "take
over one end of a socketpair" part but also the whole puffs-ish
filesystem thing.
> Described AF_LOCAL sockets are for me candidate no.1.
They're good in a lot of respects.
> I am also considering using signal (siginfo.h and signalvar.h) for
> sending signal from kernel to user process with small data.
Signals are designed to interrupt the receiving process even if it's in
the middle of some (possibly unrelated) computation; they also
generally aren't queued (sending the same signal again before the first
one gets handled will normally still deliver it only once; I've seen
some mention of queued signals, but I can't recall whether that was
even on NetBSD, much less any details). Signals are also suitable for
only very low bandwidth communication. Depending on what you're trying
to do, of course, these can be good things or bad things.
> 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 ?
No, not unless you create a kernel thread, and even then I'm not sure;
I've never even considered sending signals to kernel threads.
> Or what do you [think] about this idea at all ?
I'm not entirely clear what you mean by "this idea". Do you mean using
signals? Do you mean using a socketpair with the kernel taking over
one end of it? Do you mean the porting effort as a whole? Do you mean
something else?
You haven't described the interface you're trying to create in enough
detail for me to feel competent to offer an opinion on any of it.
Signals may be useful as part of it; the same is true of socketpairs
and probably various other things.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index