mmap oddness

yodaiken@chelm.cs.nmt.edu
Thu, 2 Apr 1998 11:47:26 -0700


mmap does not map /dev/mem or /dev/kmem correctly or I don't understand
what it is supposed to do.

1. insmod a module that kmallocs a page and writes an identifier
on the page and then printks the virt_to_phys and address.
2. a user task opens /dev/mem or /dev/kmem and reads every page
looking for the identifier -- the identifier is found at exactly
the expected position.
3. a user task opens /dev/mem or /dev/kmem and mmaps the page with the
identifier -- no identifier found.
4. the task in (3) is modified to try every page in mem or kmem -- no
identifier found.
5. If the kernel buffer is allocated statically, everything works as
expected.

This is on 2.1.89, but is the same on a couple of other versions.

Explanations?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu