Re: Asychronous messages to user-land

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This seems to be a pretty common theme, and though I'm no
expert, it would seem to me that it's due to the fact that we
are used to looking at the world from userspace.  That the
proc filesystem for example, which by the way is the way I
would smuggle some data out of the kernel if I didn't want it
in my logfile.  But still, the kernel is more like a servant
of programs than a program itself:  How do you write to a
file from the kernel?  Create a device node or a /proc file
and wait for somebody to come along and cat it!

The good news is so long as you're not doing something
nafarious, if you have sufficient access to the machine to hack
out a new file in the proc filesystem, you probably have enough
access to cat that file from userland once you've done it.

The world is just slightly inside out in kernel-land.

Anyway, I'm not an expert, I've done very little kernel hacking,
but that seems to be the philosophy I've seen espoused.

BTW, the kernel newbies site has a good write-up of the proc
filesystem.  Good luck.


Regards, Rich


On Mon, Mar 22, 2004 at 02:36:44AM -0800, Zeeshan Ali wrote:
> Hello,
>   I wanted to send asynchronous messages from my
> kernel module to applications through a device. From
> 'Linux Device Drivers', I get the idea that SIGIO is
> the method. But I wanted to pass some data along with
> it as well, which does'nt seem possible through SIGIO.
> Note that i need to pass the data EXACTLY along the
> asychronous signal.
> 
> =====
> ---------------------------------------------------------
> "To teach how to live without certainty, and yet without being paralysed by hesitation, is perhaps the chief thing that philosophy, in our age, can still do for those who study it." --Bertrand Russell
> 
> "We are convinced that freedom without Socialism is privilege and injustice, and that Socialism without freedom is slavery and brutality."  from the book: "The Political Philosophy of Bakunin".
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 

-- 
A message from the electronic hygene foundation:

Please do not send attachments in Word format.  Text is best, but if the
document contains graphics, just save it as HTML or convert to PDF.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux