How to walk page table manually to know the PTE on RHEL7/RHEL8 x86_64?
Issue
- I know I can run
vtopto translate a user or kernel virtual address to its physical address and to know the PGD/PUD/PMD/PTE.
crash> vtop -u 7f09cd705000
VIRTUAL PHYSICAL
7f09cd705000 2322db000
PGD: 235d707f0 => 800000023489f067
PUD: 23489f138 => 234727067
PMD: 234727358 => 35eba067
PTE: 35eba828 => 2322db025
PAGE: 2322db000
PTE PHYSICAL FLAGS
2322db025 2322db000 (PRESENT|USER|ACCESSED)
VMA START END FLAGS FILE
ffff8d75b4c3f510 7f09cd705000 7f09cd8c9000 8000075 /usr/lib64/libc-2.17.so
PAGE PHYSICAL MAPPING INDEX CNT FLAGS
fffff1ea48c8b6c0 2322db000 ffff8d7535ace818 0 47 2fffff0002006c referenced,uptodate,lru,active,mappedtodisk
- How to walk page table manually to know the PTE?
Environment
- Red Hat Enterprise Linux 7 x86_64
- Red Hat Enterprise Linux 8 x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.