mmap() of /dev/kmem - can it work?
Hello:
I am trying to see if it is possible to read/write Linux kernel memory from a userland program by calling mmap() on /dev/kmem. I know there is code in the kernel intended to support this (/drivers/char/mem.c, function called mmap_kmem()), but I also know it has been broken at some points in the kernel's development. For example, Torvalds indicated that it was broken in 2.6.12 (he committed a partial fix).
What I want to know is what is the state of support for mmap()ing /dev/kmem in the latest versions of the kernel (2.4.x or 2.6.x branches)? Or, alternatively, is there a particular kernel version in which this works?
The fix Torvalds committed for 2.6.13 (still there as of 2.6.15.2) only partly works. I've been able to read from the kernel's base address using that version, but not from any offset within the kernel.
Does anyone know anything about this issue?
|