-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add vmi_get_va_pages #14
Conversation
03d5b51
to
69ef2e6
Compare
Ready for review. |
dtb = vmi.get_vcpu_reg(CR3, 0)
va_pages = vmi.get_va_pages(dtb)
for page in va_pages:
print('Page: dtb {} vaddr {} size {}'.format(
hex(page.dtb),
hex(page.vaddr),
hex(page.size))) Result
Why the |
I would agree that result seems incorrect |
Can i merge this one ? |
@smaresca it seems there is an issue in Libvmi /* initialize the libvmi library */
if (VMI_FAILURE == vmi_init_complete(&vmi, name, VMI_INIT_DOMAINNAME, NULL, VMI_CONFIG_GLOBAL_FILE_ENTRY, NULL, NULL)) {
printf("Failed to init LibVMI library.\n");
return 1;
}
printf("LibVMI init succeeded!\n");
uint64_t dtb;
vmi_get_vcpureg(vmi, &dtb, CR3, 0);
GSList *va_pages = vmi_get_va_pages(vmi, dtb);
GSList *loop = va_pages;
while (loop)
{
page_info_t *page = loop->data;
printf("vaddr: %p dtb: %p\n", page->vaddr, page->dtb);
loop = loop->next;
}
return 0;
|
@smaresca i opened an issue on libvmi about this empty dtb field, this is not related to |
I will merge this PR as it contains changes that I need, and the changes are quite straightforward. |
Implement
vmi_get_va_pages
fromlibvmi_extra.h
glib_build.py
, and integrated the glib functions into the main libvmi CFFI moduleget_va_pages
inlibvmi.py
PageInfo
inlibvmi.py