-
Notifications
You must be signed in to change notification settings - Fork 167
Remove HyperlightPEB file mappings #1380
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,7 @@ pub(crate) struct PreparedFileMapping { | |
| /// The page-aligned size of the mapping in bytes. | ||
| pub(crate) size: usize, | ||
| /// Null-terminated C-style label for this mapping (max 63 chars + null). | ||
| #[cfg_attr(not(feature = "nanvix-unstable"), allow(unused))] | ||
| #[allow(unused)] | ||
| pub(crate) label: [u8; hyperlight_common::mem::FILE_MAPPING_LABEL_MAX_LEN + 1], | ||
| /// Host-side OS resources. `None` after successful consumption | ||
|
Comment on lines
58
to
63
|
||
| /// by the apply step (ownership transferred to the VM layer). | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addr - base_vacan underflow (or wrap in release) for NOBITS sections whosesh_addris below the first PT_LOAD vaddr (or for non-ALLOC NOBITS sections withsh_addr == 0). This can lead to panics/out-of-bounds slicing and also allows zero-filling the wrong part oftarget. Filter NOBITS ranges toSHF_ALLOC, and during zero-fill guardaddr >= base_vaand clamp the [start,end) range totarget.len()instead of skipping the whole fill when it extends past the loaded image.