Skip to content

Commit 638bcb7

Browse files
committed
fixup! snapshot: handle the scratch region correctly
Fix bug that resulted in the first page of scratch memory being unconditionally copied into the snapshot. Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
1 parent 2f5a4fb commit 638bcb7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/hyperlight_host/src/sandbox/snapshot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ fn filtered_mappings<'a>(
273273
}
274274
.filter_map(move |(gva, gpa, bm)| {
275275
// the scratch map doesn't count
276-
if gva > scratch_base_gva(scratch_size) {
276+
if gva >= scratch_base_gva(scratch_size) {
277277
return None;
278278
}
279279
// neither does the mapping of the snapshot's own page tables

0 commit comments

Comments
 (0)