Skip to content

Document unsafe blocks in memory management code #747

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

Merged
merged 8 commits into from
Jul 9, 2025

Conversation

joergroedel
Copy link
Member

This PR documents all not-yet documented unsafe blocks in the memory management code.

@joergroedel joergroedel force-pushed the document-unsafe-blocks branch from 4663ac0 to 7563c01 Compare July 4, 2025 15:09
@joergroedel joergroedel requested a review from msft-jlange July 4, 2025 18:33
@msft-jlange msft-jlange added the in-review PR is under active review and not yet approved label Jul 8, 2025
@joergroedel joergroedel force-pushed the document-unsafe-blocks branch from 7563c01 to 7fc198d Compare July 9, 2025 07:23
@joergroedel joergroedel requested a review from msft-jlange July 9, 2025 07:30
Add SAFETY annotation to all unsafe blocks in the memory allocator
implementation.

Signed-off-by: Joerg Roedel <[email protected]>
Document GuestPtr and friends' unsafe blocks.

Signed-off-by: Joerg Roedel <[email protected]>
This removes the need to explicitly specify Send + Sync on the Mapping
and VMM data structures. Also the explicit Send + Sync annotations
where VirtualMapping is used are redundant.

Signed-off-by: Joerg Roedel <[email protected]>
Document the safety of the unsafe block in the PageBox
implementation.

Signed-off-by: Joerg Roedel <[email protected]>
Document the unsafe blocks in the page-table code which have not
documentation yet.

Signed-off-by: Joerg Roedel <[email protected]>
Document any undocumented unsafe blocks in the page-visibility code.
One usage is actually not safe and needs to be fixed in a follow-on
PR.

Signed-off-by: Joerg Roedel <[email protected]>
Document any undocumented unsafe blocks in the page-table guards code.

Signed-off-by: Joerg Roedel <[email protected]>
Document any undocumented unsafe blocks in kernel/src/mm/validate.rs.

Signed-off-by: Joerg Roedel <[email protected]>
@joergroedel joergroedel force-pushed the document-unsafe-blocks branch from 7fc198d to 195ef0e Compare July 9, 2025 09:22
@msft-jlange msft-jlange merged commit 9959d99 into coconut-svsm:main Jul 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-review PR is under active review and not yet approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants