Hi Doug,
Pl. find my answers below:
Also, a way that I can resolve this value to find what
"vm_area_struct" references this portion of memory for the specific
process?
Answering your second Q first, to determine which Virtual Memory Area (VMA)
the address you retrieved it is only necessary to traverse the
vm_area_structs , it is not necessary to go through the page
table/ddirectories etc.
Quote:> In the kernel source, the "thread_struct" reflects has values that
> reflect the computers registers. One of these values is "eip", which is
> the value for the instruction pointer. Does anyone one know what level
> of the page tables (x86 architecture) this value refers to (pte, pmd,
> pgd)?
Any linear address , in your case that given by EIP , will be split into
three parts(I do not remember offhand how many bits each of the three has
out of the 32 bits).The first part will be the offset into the page
directory, (the base of which is pointed to by CR3 register).At this offset
in the page dir, the base address(physical) of the pmd can be found.The
second part of EIP will now be an offset into the pmd. At this offset, the
base (phy) address of the actual physical page in memory can be found. The
third section of the EIP is an offset into the page
Anand .K