On 10/16/07, rahul s <son.r.rahul@xxxxxxxxx> wrote: > Hi, > > I am new to Linux MM. Can someone answer my following questions? > > 1> Where is the process page table(mm->pgd) stored? Is it stored below > PAGE_OFFSET ? If yes, then wouldn't there > be a chance of the page tables getting accidentally corrupted by the user > process as it is in the user address space? When u are in protected mode, all memory access like "mov eax, 0xffff" always go through the pagetable to reach the actual physical memory. And since each user process has its own PGD (mm->pgd), which is page directory, located in different parts of the physical memory, there will be no collision, even if calculated linear address have the same value, but physically they will point to different parts of memory. > > 2> What will happen if the page containing the process page table(mm->pgd) > is swapped on the disk and the process is scheduled for execution ? > As the page pointed to by the cr3 itself is not in memory, how will the MMU > handle this case? > > The process pagetable (mm->pgd) is not stored together with the process, and so swapping out the process does not swap out the pagetable. In fact, the kernel will reuse the pagetable for a different purpose. Correct me if I am wrong? -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ