Linux: Ways to communicate with kernel module from user space.

Posted by Inso Reiges on Stack Overflow See other posts from Stack Overflow or by Inso Reiges
Published on 2010-05-25T09:51:50Z Indexed on 2010/05/25 10:11 UTC
Read the original article Hit count: 273

Hello,

What are the ways to communicate with a kernel module from user space? By communication i mean sending information and commands between the module and a user space process.

I currently know of two way:

  1. open/close/read/write/ioctl on published device node.
  2. read/write on exported and hooked /proc file.

More specifically, can someone advice the best way to communicate with a kernel module that does not actually drives any hardware and therefore should not be littering /dev with stub nodes that exists solely for ioctl calls? I mostly need to check its various status variables and send it a block of data with a request type tag and see if the request succeeded.

Inso.

© Stack Overflow or respective owner

Related posts about linux-kernel

Related posts about linux-device-driver