Skip to content

Conversation

@simongdavies
Copy link
Contributor

When we supported loading guest binaries from PE files, we also supported autodetecting reasonable defaults for heap and stack size for the sandbox based on the loaded executable's stack/heap size hints. ELF files did not have a similar convention for stack/heap size hints embedded in the file, so when loading an ELF file, we just used some vaguely reasonable small defaults (64k stack and 128k heap). Now that PE support is gone, these are in fact the defaults used for /all/ files, so it doesn't make much sense that we bother putting them into an executable information structure and passing it around. This commit removes that vestigial use of the ExeInfo structure, replacing it with defaults inline in sandbox::config.

When we supported loading guest binaries from PE files, we also
supported autodetecting reasonable defaults for heap and stack size
for the sandbox based on the loaded executable's stack/heap size
hints.  ELF files did not have a similar convention for stack/heap
size hints embedded in the file, so when loading an ELF file, we just
used some vaguely reasonable small defaults (64k stack and 128k heap).
Now that PE support is gone, these are in fact the defaults used for
/all/ files, so it doesn't make much sense that we bother putting them
into an executable information structure and passing it around.  This
commit removes that vestigial use of the ExeInfo structure, replacing
it with defaults inline in `sandbox::config`.

Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
@simongdavies simongdavies added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Dec 9, 2025
@simongdavies simongdavies requested a review from danbugs as a code owner December 9, 2025 22:03
@simongdavies simongdavies added the Guest-COW PRs that form part of the Guest-COW change label Dec 9, 2025
@jsturtevant jsturtevant merged commit 0a29546 into hyperlight-dev:main Dec 10, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Guest-COW PRs that form part of the Guest-COW change kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants