简体   繁体   English

如何在Linux中获取进程的页表内容?

[英]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? 如何在Linux中编写的模块中获取进程的页表内容?

I'm using Ubuntu 14.04 LTS virtual machine on a Windows 8 host with 64-bit Intel architecture. 我在具有64位Intel体系结构的Windows 8主机上使用Ubuntu 14.04 LTS虚拟机。

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). 您应该查阅过程描述符,该描述符包含指向存储器描述符(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. 我想为您的问题检查pgd,它是指向该进程的全局页面目录的指针。
  2. hopefully your written module would be a virtualization driver if so then also check the mmap_base field of the memory descriptor 希望您编写的模块将是虚拟化驱动程序,如果是的话,那么还要检查内存描述符的mmap_base字段

if you already know the answer please share here; 如果您已经知道答案,请在这里分享; i am looking the same 我看起来一样

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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