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

API: remove get_page_access #168

Open
Wenzel opened this issue Feb 19, 2021 · 2 comments
Open

API: remove get_page_access #168

Wenzel opened this issue Feb 19, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@Wenzel
Copy link
Owner

Wenzel commented Feb 19, 2021

get_page_access is actually not implemented by hypervisor. the library is supposed to maintain the state of page whose permissions have been modified, and return this state, via this API.
So it's a higher-level than we expected.

Example in Libvmi:
https://github.com/libvmi/libvmi/blob/master/libvmi/events.c#L667

@Wenzel Wenzel added the enhancement New feature or request label Feb 19, 2021
@rageagainsthepc
Copy link
Collaborator

rageagainsthepc commented Feb 23, 2021

The function you have linked is used to retrieve internally stored vmi events, so that's something entirely different. We are now unable to read page permissions via kvmi. In Xen this would still be possible though (see: https://github.com/Wenzel/libmicrovmi/pull/110/files#diff-80464c41fe16049f9a2f969fe95cb68d2209a0d760f8d7adfe002e260c443d8bR325). I would argue that this is pretty basic hypervisor level functionality.

@Wenzel
Copy link
Owner Author

Wenzel commented Feb 23, 2021

Indeed, good catch.
Then we keep this API in the trait, and leave it unimplemented for KVM.
The Libvmi Xen driver doesn't actually use the function in the driver implementation:
https://github.com/libvmi/libvmi/search?q=xc_get_mem_access

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

No branches or pull requests

2 participants