This repository has been archived by the owner on Sep 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Map the large page to the pre-allocated page table, if it hasn't been mapped already. 2. Check if the large page has already been split. If not, split it into 4KB pages. 3. Check if the guest page is already processed. If not, map the guest page to the shadow page. Ensure the memory manager maintains a set of processed guest pages to track this mapping. 4. Copy the guest page to the shadow page if it hasn't been copied already, ensuring the shadow page contains the original function code. 5. Install the inline hook at the shadow function address if the hook type is `Function`. 6. Change the permissions of the guest page to read-write only. 7. Invalidate the EPT and VPID contexts to ensure the changes take effect. These operations are performed only once per guest page to avoid overwriting existing hooks on the same page.
- Loading branch information
Showing
2 changed files
with
80 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters