remapping kernel buffer in VMS of user process
Alexej Sokolov
bsd.quest at googlemail.com
Mon Dec 1 08:34:28 PST 2008
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 at 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 at googlemail.com>
More information about the freebsd-hackers
mailing list