Hi gurus,
Background:-
I have a thorny issue in a storport miniport, where a system thread tries to access a buffer which is no longer valid. My research has led me to the virtual memory structures, and the magic !pte command in WinDbg. If I do !pte , I get something like (I’m at home so can’t cut-and-paste?)
PXE at fffff6fd’7bdedf88 PPE at fffff6fd’7e123456 PDE at fffff6fd’7ea12345 PTE at fffff6fd’880abcde
contains 11b6cf863 contains 1234863 contains 2345863 contains 431200
PFN 11b6cf PFN 1234 PFN (…etc).
The PTE for my bad address looks corrupt - the values don’t look like valid PFNs, so I’m trying to catch whatever corrupted it, unmapped the memory, etc?
I understand how the CPU reads this structure, starting at known physical address in CR3, and traversing the PFNs in the four-level PTE structure.
In 32-bit, I understand how to calculate the virtual addresses at all points in the chain, from fixed starting point, and knowing the base of the PDEs.
Question:-
---------------
How do I determine the virtual addresses of the PPE/PDE/PTE tables in 64-bit? (Clearly it’s possible, as the !pte extension can do it).
All I’ve found is the !pfn extension, which just seems to backpoint to the PTE that owns it.
Thanks,
Andy
PS If it helps, I have attended an OSR course some years ago, but no longer have access to the email address I was registered with.