Don't allow code to access the PFN database directly -- instead, always go through...
authorReactOS Portable Systems Group <ros-arm-bringup@svn.reactos.org>
Thu, 14 Feb 2008 21:19:30 +0000 (21:19 +0000)
committerReactOS Portable Systems Group <ros-arm-bringup@svn.reactos.org>
Thu, 14 Feb 2008 21:19:30 +0000 (21:19 +0000)
commitc47af2fcdf0e292abf42ec098f01f7e4baed1dbf
treeed87436b87f0856833dbce7910ee06597ea49830
parent93c66fb50d49b97aaa4c93a9463952f052c97fbd
Don't allow code to access the PFN database directly -- instead, always go through MiGetPfnEntry to have a controlled path.
Add assertions to this function, to make sure PFN access is always valid (previous code would sometimes KEBUGCHECK(0) without a real explenation if such cases were encounted -- but developers randomly chose which functions would be protected).
Also, since PFNs are 0-based, do allow Pfn == MmPageArraySize if someone is reading the last PFN on the system.
Finally, protect some of the functions which were accessing the PFN entries outside the PFN list lock.

svn path=/trunk/; revision=32365
reactos/config.template.rbuild
reactos/ntoskrnl/mm/freelist.c