Date: Mon, 1 Dec 2008 17:33:54 +0100 From: Alexej Sokolov <bsd.quest@googlemail.com> To: freebsd-hackers@freebsd.org Subject: Re: remapping kernel buffer in VMS of user process Message-ID: <20081201163354.GA5282@debian.samsung.router> In-Reply-To: <20081201101232.42d55473@kan.dnsalias.net> References: <20081201013851.GA20549@debian.samsung.router> <20081201101232.42d55473@kan.dnsalias.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 01, 2008 at 10:12:09AM -0500, Alexander Kabaev wrote: > On Mon, 1 Dec 2008 02:38:51 +0100 > Alexej Sokolov <bsd.quest@googlemail.com> wrote: > > > Hello, > > > > I would like to remap some buffers allocated in kernel space to memory > > space of certain process. > > > The simplest way is to expose this buffer through device pager. > Implement the driver callback and let userland to simply mmap the page. > Sorry, but I don't understand how to do it. I know how to implement mmap through character device. But I am working with network driver. Network devices doesn't appear in file system and they don't have any interface for mmaping. I think I can try to solve with task with: vm_map_lookup - to get a vm_object of allocated space and then vm_map_find (map_of_process, ... founded_object ...) - allocate a new space in the vms of process. I try to do it now with a small hope of success :-) > -- > Alexander Kabaev -- Alexej Sokolov <bsd.quest@googlemail.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081201163354.GA5282>