Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jan 2009 11:27:05 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.rg>
To:        Gerry Weaver <gerryw@compvia.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Headers files included by vnode.h
Message-ID:  <alpine.BSF.2.00.0901021124520.56000@fledge.watson.org>
In-Reply-To: <20081223201626.caa483ad@mail01.compvia.com>
References:  <20081223201626.caa483ad@mail01.compvia.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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



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