Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Dec 2008 18:05:34 -0600
From:      "Gerry Weaver" <gerryw@compvia.com>
To:        freebsd-hackers@freebsd.org
Subject:   How to access kernel memory from user space
Message-ID:  <20081223000534.f740ca8a@mail01.compvia.com>

next in thread | raw e-mail | index | archive | help
Hello All,

I am working on a driver that collects various network statistics via pf=
il. I have a simple array of structures that I use to store the statisti=
cs. I also have a user space process that needs to collect these statist=
ics every second or so. A copy operation from kernel to user space would=
 be too expensive. Is there a mechanism that would allow me to gain dire=
ct access to my kernel array from user space=3F The user process would o=
nly need read access. It seems like maybe this could be done with mmap, =
but since this is not a character driver, there is no device file etc.. =
I'm a newbie, so I apologize if this is something that should be obvious=
.


Thanks in advance,
Gerry



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