From c47af2fcdf0e292abf42ec098f01f7e4baed1dbf Mon Sep 17 00:00:00 2001 From: ReactOS Portable Systems Group Date: Thu, 14 Feb 2008 21:19:30 +0000 Subject: [PATCH] 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 | 2 +- reactos/ntoskrnl/mm/freelist.c | 249 +++++++++++++++++---------------- 2 files changed, 130 insertions(+), 121 deletions(-) diff --git a/reactos/config.template.rbuild b/reactos/config.template.rbuild index 4db88bbf992..3c3948af0c8 100644 --- a/reactos/config.template.rbuild +++ b/reactos/config.template.rbuild @@ -45,7 +45,7 @@ - +