user-kernel memory mapping

pramodh mallipatna (pramodh@ittc.ukans.edu)
Tue, 15 Feb 2000 19:12:21 -0600 (CST)


Hello All,

I am doing user-kernel memory mapping.

Problem:
--------
I do not see the contents of the memory to be same what I had memset it to
in the user space.

Some Details:
-------------
I am not sure if it is mapped correctly. But, if I allocate a PAGE_SIZE
sized memory in the user and map it to the kernel and print the contents,
it prints a PAGE_SIZE worth data (but not what I expect). It does not Seg
Fault. If I try printing (PAGE_SIZE*2) worth data having allocated only
one PAGE_SIZE of memory, it prints the first page data (junk though)
and Seg Faults.

So, I think the mapping is happening. Am I right?

I even mlock the area after allocating in the user space. But that does
not help.

Question:
---------
1. Is the mapping happening properly? How can I check this?
2. What else should I do to see the contents in the kernel?

Thanks,
Pramodh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/