-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch between shadow and real page for sleep skipping #1545
Comments
So the problem you have is that you want to present two different versions of a page when it's being read from depending on the process that's doing the reading. I don't think your approach is going to work for that. Generally speaking the idx view has the shadow copies mapped as executable but not readable, so it knows it needs to switch to view 0 when its being read/written, for a single instruction, and then switch back to idx afterwards. In your case though you need to have the shadow page restricted (non-readable) so you can check what is the process accessing it. But then where do you switch where the permission is lifted? If you have the permission as readable only in view 0 with the original page then the shadow version will always be unreadable. What would be the easier solution is to just have the page non-readable in idx and then return a |
Thanks a lot, |
Hi guys, i'm trying to implement a kind of sleep skipping mechanism for some of the process under analysis.
I want to fake the ticks stored on KUSER_SHARED_DATA that can be read by any userspace process at a known virtual address.
My approach is to create a shadow page where i can alter the tick field and then switch between the shadow page and the original one based on which process requests that page.
I already created the shadow page and call vmi_slat_change_gfn like drakvuf does for
inject_trap_pa
, then i registered also a memory trap so i can filter the process that request the page in my callback invoked by pre_mem_cb.I want now to switch between those two pages in pre_mem_cb, but if i set the slat_id to altp2m_idx, my executable that i use for test never start and cause the vm crash at the end.
I don't understand how drakvuf perform the switch to hiding the breakpoints, Is it enuogh to set slat_id to 0 for real page and set to altp2m_idx for shadow one?
Should i use a different approach?
The text was updated successfully, but these errors were encountered: