Why do you have to be this way? I gave you a link to 3 PDFs and our
own Wiki that explain these functions. Did you even read them?
Don't be an asshole just for fun.
Best regards,
Alex Ionescu
On Sun, Jul 3, 2011 at 1:11 AM, <tkreuzer(a)svn.reactos.org> wrote:
Author: tkreuzer
Date: Sat Jul 2 23:11:06 2011
New Revision: 52507
URL:
http://svn.reactos.org/svn/reactos?rev=52507&view=rev
Log:
[NTOSKNRL]
- Change an ASSERT to a KeBugCheck, since the assertion can fail for any invalid memory
access and this is not an internal Mm failure.
- Remove 2 cases, that "Should NEVER happen on ARM3!!!", but can very well
happen.
- Do NOT make the code cleaner, by releasing the PFN lock in the same function that
acquires it, but keep it 2 functions down. This is because it *SHOULD* be that way, since
some internal undocumented functions, that we do not implement but that are
(theoretically) called from here, also do release the PFN lock. Thanks Alex for explaining
this.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pagfault.…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] Sat Jul 2 23:11:06 2011
@@ -583,10 +583,19 @@
}
//
- // The PTE must be invalid, but not totally blank
+ // The PTE must be invalid
//
ASSERT(TempPte.u.Hard.Valid == 0);
- ASSERT(TempPte.u.Long != 0);
+
+ /* Check if the PTE is completely empty */
+ if (TempPte.u.Long == 0)
+ {
+ KeBugCheckEx(PAGE_FAULT_IN_NONPAGED_AREA,
+ (ULONG_PTR)Address,
+ StoreInstruction,
+ (ULONG_PTR)TrapInformation,
+ 2);
+ }
//
// No prototype, transition or page file software PTEs in ARM3 yet
@@ -727,11 +736,6 @@
// Writing to a read-only page (the stuff ARM3 works with is write,
// so again, moot point).
//
- if (StoreInstruction)
- {
- DPRINT1("Should NEVER happen on ARM3!!!\n");
- return STATUS_ACCESS_VIOLATION;
- }
//
// Otherwise, the PDE was probably invalid, and all is good now
@@ -776,11 +780,6 @@
// Writing to a read-only page (the stuff ARM3 works with is write,
// so again, moot point.
//
- if (StoreInstruction)
- {
- DPRINT1("Should NEVER happen on ARM3!!!\n");
- return STATUS_ACCESS_VIOLATION;
- }
/* Release the working set */
MiUnlockWorkingSet(CurrentThread, WorkingSet);