Details
-
New Feature
-
Resolution: Postponed
-
Major
-
None
Description
MmBadPointer would seem to be an NT6+ feature...
Does the KmTest code (when activated) compile with MS-DK and work on W2K3/Vista?
Does ReactOS actually want to support this feature? Maybe #if ... >= Vista?
—
From KmTest point of view:
https://git.reactos.org/?p=reactos.git&a=search&h=HEAD&st=grep&s=MmBadPointer
modules/rostests/kmtests/rtl/RtlException.c
|
128 /* TODO: Find where MmBadPointer is defined - gives an unresolved external */
|
130 /* Read from MmBadPointer - must cause an access violation */
|
132 (void)*(volatile CHAR *)MmBadPointer;
|
135 /* Write to MmBadPointer - must cause an access violation */
|
137 *(volatile CHAR *)MmBadPointer = 5;
|
|
sdk/include/xdk/mmtypes.h
|
154 extern NTKERNELAPI PVOID MmBadPointer;
|
–
From Core point of view:
PVOID MmBadPointer;
Declared in Wdm.h
...
The operating system generates a bug check
...
All addresses within PAGE_SIZE of MmBadPointer are guaranteed to be invalid.
...
...
However, an access of the MM_BAD_POINTER address is guaranteed to cause a bug check, which cannot be masked by an exception handler.
...
Starting with Windows 8.1, the MM_BAD_POINTER macro is defined in the Wdm.h header file. However, driver code that uses this macro definition can run in previous versions of Windows starting with Windows Vista.
Starting with Windows Vista, the MmBadPointer global variable is available as a pointer to a pointer value that is guaranteed to be an invalid address
....
0xBAD0B0B0 was replaced by MmBadPointer in win 8.1.which is initialized during startup by reserving PTEs. smart!