It is also a post of kernel function analysis, I personally think that the Windows kernel is the best teacher, when you want to implement a function can see how the Windows kernel is done, perhaps there is inspiration:)
First, take a look at the official comment notes:
/* ++routine Description: For a given virtual address this function returns TRUE if no page fault would occur for a read operation on the address , FALSE otherwise. Note that after this routine is called, if appropriate locks is not held, a non-faulting address could fault. Arguments: virtualaddress-supplies The virtual address to check. Return Value: TRUE If no page fault would be generated reading the virtual address, FALSE otherwise. Environment: Kernel mode.--* *
The function descriptions given in the WDK documentation are: The Mmisaddressvalid routine checks whether a page fault would occur for a read or write operation at a G Iven virtual Address. According to the description of the function is to check whether read and write operations will trigger a page fault, but as a common function, we often use this function to check the address of the law, this time in the source to see the specific process, the main purpose is to find out how this function is to determine whether a function will trigger the page error.
How to verify that an address can be analyzed using the--mmisaddressvalid function