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

Bug fixes and readability improvements to guest memory handling #103

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

hlyytine
Copy link
Contributor

  • Fix behaviour (iterator resetting, return value) in map_vm_memory_reservation()
  • Avoid potential integer overflows, no matter how theoretical they may be
  • Remove duplicate code
  • Write complex comparisons in "simple English"

As far as I can see, the only potential side effect of these changes is that mapping done by map_vm_memory_reservation() is no longer allowed to overflow the region. But I can't think of situation where that could anything else than a bug.

hlyytine added 4 commits May 26, 2023 11:45
Comment in vm_map_reservation() about resetting the iterator was only
partially true. Return value did not report any errors either. Also
avoid integer overflows and fix a format string.

Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
LH side of comparison in vm_memory_handle_fault() uses wrong value.

Avoid potential overflows in other places as well.

Signed-off-by: Hannu Lyytinen <[email protected]>
@hlyytine hlyytine force-pushed the upstream/guestmem-fixes branch from 7aa142b to f58d054 Compare May 26, 2023 09:00
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

Successfully merging this pull request may close these issues.

1 participant