How to communicate with a Linux kernel module from user space without littering /dev with new nodes?

后端 未结 6 1684
孤城傲影
孤城傲影 2020-12-28 21:26

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

6条回答
  •  隐瞒了意图╮
    2020-12-28 22:06

    You could also read/write from /dev device nodes.

    IMHO, /dev is already littered with stuff and adding your own nodes there isn't a big issue. Don't forget that you can have lots of ioctl codes for a single device node, and the ioctl paramters are passed by reference so can be as big as you like.

提交回复
热议问题