LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Does vma linear address is strictly inside linear address pointed by task->mm (http://www.linuxquestions.org/questions/linux-kernel-70/does-vma-linear-address-is-strictly-inside-linear-address-pointed-by-task-mm-850796/)

Deep Narayan Dubey 12-16-2010 11:56 PM

Does vma linear address is strictly inside linear address pointed by task->mm
 
Hi,
I am making a kernel module for learning purpose. I have taken a running process's task structure and printed the contents of the task->mm->start_code, task->mm->end_code,
task->mm->start_data, task->mm->end_data etc which are as following -
Dec 17 05:11:22 localhost kernel: Start code = 8048000
Dec 17 05:11:22 localhost kernel: End code = 8048588
Dec 17 05:11:22 localhost kernel: Start data = 8049588
Dec 17 05:11:22 localhost kernel: End data = 8049688
Dec 17 05:11:22 localhost kernel: Start brk = 9147000
Dec 17 05:11:22 localhost kernel: Brk = 9168000
Dec 17 05:11:22 localhost kernel: Start stack = bf8ea1c0

I have iterated through the list of vma and printed the start address and end address and offset of the vma-
Dec 17 05:11:22 localhost kernel:
VMA: start = 93f000 ,end = 95f000 ,offset = 0
Dec 17 05:11:22 localhost kernel:
VMA: start = 960000 ,end = 961000 ,offset = 32
Dec 17 05:11:22 localhost kernel:
VMA: start = 961000 ,end = 962000 ,offset = 33
Dec 17 05:11:22 localhost kernel:
VMA: start = 964000 ,end = ad2000 ,offset = 0
Dec 17 05:11:22 localhost kernel:
VMA: start = ad2000 ,end = ad4000 ,offset = 366
Dec 17 05:11:22 localhost kernel:
VMA: start = ad4000 ,end = ad5000 ,offset = 368
Dec 17 05:11:22 localhost kernel:
VMA: start = ad5000 ,end = ad8000 ,offset = 2773
Dec 17 05:11:22 localhost kernel:
VMA: start = 9147000 ,end = 9168000 ,offset = 37191
Dec 17 05:11:22 localhost kernel:
VMA: start = b77a1000 ,end = b77a3000 ,offset = 751521
Dec 17 05:11:22 localhost kernel:
VMA: start = b77c2000 ,end = b77c3000 ,offset = 751554
Dec 17 05:11:22 localhost kernel:
VMA: start = bf456000 ,end = bf8eb000 ,offset = 785259


As obvious from the above that the vma addresses are not inside the linear addresses pointed by the task->mm except for the heap section.

My question is why the linear addresses of the vma is not inside any of the regions pointed by task->mm.


All times are GMT -5. The time now is 05:26 PM.