How to access kernel memory from user space

Peter Jeremy peterjeremy at optushome.com.au
Sat Dec 27 15:48:01 PST 2008


On 2008-Dec-24 15:22:07 -0600, Gerry Weaver <gerryw at compvia.com> wrote:
>to keep it minimal. Is there any significant trade off in performance
>between the two approaches?

No.  In both cases, the actual access is managed through the normal
hardware translation the same as any other data.  About the only
difference is that the kmem approach will probably involve an
additional page of mapping because your data structure probably won't
be page-aligned by default.

> Also, Is there anything in the source or ports tree that I could
>use as an example for the device node case?

I presume you've been looking thru device drivers that initialise
d_mmap.  I've got an example but it only has 1 page of status info so
the allocation is a bit different.  I'll see what I can find.

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20081227/cbe0ee91/attachment.pgp


More information about the freebsd-hackers mailing list