Skip to content
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

How to achieve page_protect in kvmi #22

Open
qth1991 opened this issue Oct 30, 2019 · 1 comment
Open

How to achieve page_protect in kvmi #22

qth1991 opened this issue Oct 30, 2019 · 1 comment

Comments

@qth1991
Copy link

qth1991 commented Oct 30, 2019

Hi,I'm interested in introspected VM, I find that you make "kvm_slot_page_track_add_page" to set one slot of write_protect.But I can't find what new processes have you added in "handle_ept_violation" if this slot trigger write_protect. Could you tell me ? By the way I can't find the function implementation code of "trace_kvm_page_faule"、"trace_kvmi_set_gfn_access"...etc. Thank you!

@adlazar
Copy link
Collaborator

adlazar commented Oct 30, 2019

From handle_ept_violation()/kvm_mmu_page_fault() the instruction (which caused the vmexit) will be emulated. The write callbacks (e.g. emulator_write_phys()) used by the emulator will call kvm_page_track_prewrite() which calls kvmi_track_prewrite().

You can find the trace functions in arch/x86/kvm/trace.h and include/trace/events/kvmi.h.

You can browse the introspection patches starting with 40d62ae from Aug 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants