Date: Wed, 22 Feb 2012 17:24:17 +0000 From: Svetlin Manavski <svetlin.manavski@itrinegy.com> To: freebsd-hackers@freebsd.org Subject: How to access kernel memory from user space Message-ID: <CACRNAiv_huiJuzXHsEKNHdFdnpFuAK7fimjWbVVfmdRth2nVDA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi all, I have a very similar problem as described in this thread back in 2009: http://lists.freebsd.org/pipermail/freebsd-hackers/2009-January/027367.html I have a kernel module producing networking stats which I need to frequently read from the user space. A copy of the data structure would be too expensive so I need to access the kernel data directly from the user space. Unfortunately Alexej's code crashes in the following area: vm_map_lookup(&kmem_map, addr, VM_PROT_ALL, &myentry, &myobject, &mypindex, &myprot, &mywired); /* OUT */ vm_map_lookup_done(kmem_map, myentry); I am using 64bit FreeBSD 8.2 on Intel Xeon hardware. Any idea how to make a stable implementation on my platform? Thank you, Svetlin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACRNAiv_huiJuzXHsEKNHdFdnpFuAK7fimjWbVVfmdRth2nVDA>