Headers files included by vnode.h
Robert Watson
rwatson at FreeBSD.rg
Fri Jan 2 11:27:06 UTC 2009
On Tue, 23 Dec 2008, Gerry Weaver wrote:
> Perfect. Yes, I am building a kernel module. This is exactly what I was
> looking for. I really appreciate your help.
>
> I am also trying to figure out a zero copy approach to kernel memory access
> from user space. Would you happen to know which list I should post the
> question to?
Hi Gerry:
It depends a bit what you want to accomplish with zero-copy. Are you just
looking for a temporary mapping into kernel space for a user page, or a
mapping of a kernel page into userspace? Is it only for use by privileged
processes, or is this general-purpose? There are a number of concerns to
think about, such as where the page comes from, whether leaked information
that might also be present in the same page, if allocated from a general user
of kernel pool, might be an issue, and how to tell when you're done with the
page. If you just want a kernel facility to borrow a page from a user process
temporarily, take a look at src/sys/net/bpf_zerocopy.c in 8.x, which borrows a
set of user pages to use in-kernel for the duration of a BPF session.
Robert N M Watson
Computer Laboratory
University of Cambridge
More information about the freebsd-fs
mailing list