Suggestions for communication between FreeBSD user-space and kernel modules
Yue Chen
ycyc321 at gmail.com
Sun Feb 15 01:44:04 UTC 2015
Dear all,
I am working on a project that needs to read some text or binary files, and
let my kernel module get the information.
What is the best (convenient and efficient) way to implement this?
It seems painful if reading files in a kernel module directly.
For Linux, there are ways like netlink, virtual filesystems, e.g. /proc,
/sys, configfs, relayfs, debugfs, poll() / epoll() / select() related; to
send info to/from kernel space.
I searched the Internet but most results are for Linux only. One possible
way for FreeBSD is to use /dev/kmem, but that is to write information
directly to a certain memory address, seems to be error-prone.
Any help would be highly appreciated.
Best,
Yue
More information about the freebsd-hackers
mailing list