Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Feb 2015 20:43:32 -0500
From:      Yue Chen <ycyc321@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Suggestions for communication between FreeBSD user-space and kernel modules
Message-ID:  <CAKtBrB47mCeTCFjrHpVww0LXJupDq_zYOy_z78pM8AV0U6hUkw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKtBrB47mCeTCFjrHpVww0LXJupDq_zYOy_z78pM8AV0U6hUkw>