Skip to content

Bug fixes and readability improvements to guest memory handling#103

Open
hlyytine wants to merge 4 commits intoseL4:masterfrom
tiiuae:upstream/guestmem-fixes
Open

Bug fixes and readability improvements to guest memory handling#103
hlyytine wants to merge 4 commits intoseL4:masterfrom
tiiuae:upstream/guestmem-fixes

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 <hannux@ssrc.tii.ae>
Signed-off-by: Hannu Lyytinen <hannux@ssrc.tii.ae>
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 <hannux@ssrc.tii.ae>
Signed-off-by: Hannu Lyytinen <hannux@ssrc.tii.ae>
@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

Comments