Skip to content

About MemoryMapperReadMemorySafe instead of RtlCopyMemory #157

Answered by SinaKarvandi
L1B0 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,
Thanks a lot for asking.

Is it to prevent paging mechanism?

Nope, I assume by "paging" you mean that the page came from the disk to the RAM (page-fault handlers also handle other things like invalid access to the memory, like executing a memory that is not supposed to be executed).

We use MemoryMapperReadMemorySafe (and its write variant) for two reasons. First, bypass all of the page-attributes restrictions. For example, a page might not be accessible due to its writing restriction. So, we map its physical address to a kernel address and access the page safely with our new address's page attributes.
The second reason is that you cannot access a memory address that resides in use…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@L1B0
Comment options

Answer selected by L1B0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants