lkml.org 
[lkml]   [1998]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectmmap oddness
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

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.198 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site