I'm currently trying to wrap my head around some Windows lookaside lists, and I'm seeing some memory addresses that are confusing me.
From another question I posted, some code was produced, thanks to sergmat (original question):
lkd> !lookaside iopsmallirplookasidelist
Lookaside "" @ 82d5ffc0 "Irps"
....
lkd> dt _SINGLE_LIST_ENTRY 82d5ffc0
nt!_SINGLE_LIST_ENTRY
+0x000 Next : 0x86737e30 _SINGLE_LIST_ENTRY
....
lkd> !pool 0x86737e30
Pool page 86737e30 region is Nonpaged pool
*86737e28 size: a0 previous size: 48 (Allocated) *Irp
Pooltag Irp : Io, IRP packets
Essentially what can be seen from the WinDBG output above, is that there is a singly linked list at address 0x82d5ffc0. This output was generated on a 32-bit Windows 7 system.
However, and this is where I get confused, when performing the same operation on a Windows 7 64-bit system, this is the output (addresses are obviously different):
lkd> !lookaside iopsmallirplookasidelist
Lookaside "" @ fffff80002a14800 "Irps"
....
lkd> dt _SINGLE_LIST_ENTRY fffff80002a14800
ntdll!_SINGLE_LIST_ENTRY
+0x000 Next 0x00000000'01bf0003
....
!pool 0x0000000001bf0003
Pool page 000000001bf0003 region is unknown
...
It would appear that the Next
value of 0x0000000001bf0003
isn't a valid virtual address, and I've also tried performing a virtual-to-physical translation on it, which fails.
It looks like this value is some kind of offset into a page, but I'm not entirely sure how the address should be calculated.
There is additional data within the list header, an _SLIST_HEADER
structure, which preceeds the _SINGLE_LIST_ENTRY
. It contains the following data:
Alignment: 0x1bf0003
Region: 0xfffffa8001df5b01
After the initial header is a series of three unions, and as this is a 64-bit system, I believe the Header16
union should be used, which contains this:
Depth: 0x3
Sequence: 0x1bf
HeaderType: 0x1
Init: 0x0
Reserved: 0x0
NextEntry: 0xfffffa8001df5b0
The Header16.NextEntry
element does contain a valid virtual address, so I'm not sure if this is the actual value of the next list element, or something else.
So if anyone could help to clarify how the _SINGLE_LIST_ENTRY.Next
element is calculated on 64-bit systems, I'd greatly appreciate it.
Thanks