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

igvmbld: Zero stage2 stack page before populating it #217

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

roy-hopkins
Copy link
Collaborator

The stage2 stack page memory is allocated with a call to construct_mem_data_object(). This function zeros any padding outside of the requested data size but does not zero the memory where the data resides.

The stage2 stack is allocated as a full page, meaning the stack is not initialised to zero. This results in uninitialised data being present below the populated stack frame and in the _reserved part of the stack.

This commit zeroes the entire stack page to ensure it is initialised.

The stage2 stack page memory is allocated with a call to
construct_mem_data_object(). This function zeros any padding outside of
the requested data size but does not zero the memory where the data
resides.

The stage2 stack is allocated as a full page, meaning the stack is not
initialised to zero. This results in uninitialised data being present
below the populated stack frame and in the _reserved part of the stack.

This commit zeroes the entire stack page to ensure it is initialised.

Signed-off-by: Roy Hopkins <roy.hopkins@suse.com>
@joergroedel joergroedel merged commit 9c60aaf into coconut-svsm:main Jan 19, 2024
2 checks passed
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.

2 participants