1) The usermode process has its own "address context" that maps user-mode virtual addresses to a unique collection of physical pages. That is, the value of any particular virtual address changes from one moment to another, as the Windows XP Scheduler switches threads.
Part of the work of "switching threads" is to modify the page tables to refer to the context of the inbound process.
_
2) The driver in Windows kernel mode runs in an "arbitrary thread context".
A driver can create a system thread and work in its context ... but I'm talking about a situation where a system thread is not created.
The driver can use "ExAllocatePoolWithTag" to allocate paged pages (memory in volatile storage).
_
3) So, how does a driver access paged memory without any context ?
As can be seen from paragraph 1, access to paged memory is through tables of pages that are "Contextual".
when the driver starts in the context of other threads ... i.e. Page table entries point to the corresponding phy threads. mem, how then can a driver access their paged memory?
PS: me noob when programming the kernel. Do not get angry.
source share