These functions are used to read to or write from the address space of the
process
p.
The
proc_rwmem()
function requires the caller to specify the I/O parameters using a
struct uio,
described in
uio(9).
The
proc_readmem()
and
proc_writemem()
functions provide a simpler, less general interface which allows the caller to
read into or write the kernel buffer
buf
of size
len
from or to the memory at offset
va
in the address space of
p.
The operation is performed on behalf of thread
td,
which will most often be the current thread.
These functions may sleep and thus may not be called with any non-sleepable
locks held.
The process
p
must be held by the caller using
PHOLD(9).