Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-31-2004, 01:37 AM   #1
LQ Newbie
Registered: Apr 2004
Posts: 4

Rep: Reputation: 0
User/Kernel Space Comms under Redhat 9.0

Howdy all,

I'm looking for some suggestions on how I can implement a virutal driver for Redhat 9.0. I'd like to replace the existing module character driver with one which will emulate the original whilst not requiring the device and allow the user to simulate different device contingencies. Ideally I'd like the driver to pipe all read and write function calls to a user space daemon.

I don't seem to be able to find any way to get data into user space from my driver outside the sanctioned read/write functions. Any ideas guys?

Old 08-31-2004, 11:44 AM   #2
Registered: Jul 2004
Location: Boston, MA, USA
Distribution: FreeBSD, Debian/AMD64, Ubuntu/i386
Posts: 59

Rep: Reputation: 15
People rarely do that. The problem is that there is one userlevel process using this driver. When the other userlevel process (the one behind the driver) screws up, then the original process is blocked in the systemcall forever.

But if somebody knows an example (not a filesystem, a char driver) I would be interested, too.
Old 09-06-2004, 06:07 PM   #3
LQ Newbie
Registered: Apr 2004
Posts: 4

Original Poster
Rep: Reputation: 0
By jove I've got it! Use the proc file system...
Old 09-07-2004, 05:24 AM   #4
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
You mean registering a file there and then intercepting all read(2) syscalls to that file, generating the "contents" on the fly? Yeah, that's a nice idea...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 12:32 PM
callback or notification from kernel to user space yhus Programming 5 09-18-2005 09:41 PM
Calling User-space program functions from Kernel modules shivanu Programming 1 03-05-2005 02:11 PM
user space daemons, kernel patches, modules ajitkth Linux - General 0 02-21-2005 08:01 AM
User Space - Kernel Space basu_arani Programming 3 05-25-2004 11:46 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration