Messages in this thread | | | Date | Fri, 29 Jan 1999 01:29:35 -0500 | From | Josh Oakes <> | Subject | User/Kernel communication |
| |
I'm a little lost on how to accomplish some userspace <-> kernelspace ipc. If anyone can help me out with advice or links to documentation, it would be very helpful.
I have a kernel module and a userspace program. Each need to be able to send messages to the other. I've looked into get_user and put_user but they require an address argument from userland. If the address is from userland, wouldn't the address be virtual in the process address space? How would the kernel know from which process the pointer came and thus be able to translate it to an absolute address? Also, any code that I've seen seems to assume that the user code is calling the kernel code and can hence pass a pointer. Well what if the kernel wants to initiate communication with the user process? How can they set up a meeting place?
My other thought was to use /proc and attempt to send messages by creating a /proc/videomessage file. Two way communication would require the userland portion to run as root, but that doesn't bother me. Finding documentation on how to write proc files from a module has been more difficult than I thought.
Once again, any code, links to code, or advice is welcome.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |