简体   繁体   中英

How to get the page table content of a process in Linux?

I'm trying to display top-level page table of a process that I created.

How can I get the page table content of a process inside a module I write in Linux?

I'm using Ubuntu 14.04 LTS virtual machine on a Windows 8 host with 64-bit Intel architecture.

Even though i don't know the exact answer for your question and I have been looking for the same. The sum of my research so for is as below:

  1. you should consult the process descriptor which contains link to the memory descriptor (mm_struct). if you check the memory descriptor it contains very good information how process is using the memory. i think for your problem check pgd which is a pointer to the global page directory of the process.
  2. hopefully your written module would be a virtualization driver if so then also check the mmap_base field of the memory descriptor

if you already know the answer please share here; i am looking the same

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM