Hello! Can anybody, please help me with my problem.
I decided to write a driver that will map zero virtual address to 0 physical page. To do this, I wrote dword 0x00000001 to VA 0xC0000000. After it, i check result:
kd> dd 0xC0000000
c0000000 00000001 00000000 00000000 00000000
kd> !pte 0
VA 00000000
PDE at C0300000 PTE at C0000000
contains 2FA62867 contains 00000001
pfn 2fa62 —DA–UWEV pfn 0 -------KREV
kd> **!**db 0
0 53 ff 00 f0 53 ff 00 f0-c3 e2 00 f0 53 ff 00 f0 S…S…S…
check VA 0:
kd> db 0
0 53 ff 00 f0 53 ff 00 f0-c3 e2 00 f0 53 ff 00 f0 S…S…S…
everything works in the kernel debugger. Now 0 VA is mapped to 0 physical address. I get the same result if I attach to program through the user mode debugger in guest vm. Its mean, that it work! But this only works in the debuggers, because, after that, when my program tries to read 0 and to get 0x53, it throws an exception, although now it should not be.
Tell me, please, what could be the problem? Could it be TLB? How i can view tlb from windbg?
P.S I’m testing on a Windows 7 x86 without PAF, for simplicity.
UPD: i solv it. I forget to set U/S fkag