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

1 compartment to N mappings #42

Merged
merged 1 commit into from
Dec 16, 2024
Merged

1 compartment to N mappings #42

merged 1 commit into from
Dec 16, 2024

Conversation

0152la
Copy link
Contributor

@0152la 0152la commented Dec 16, 2024

Move from a design of "one compartment has one mapping" to "one compartment can be mapped multiple times". This involves "staging" a compartment, with temporary internal relative relocations, after which the staging can be lifted to a "mapping", which has correct relocations and can be executed. This greatly reduces the overhead of creating the same compartment multiple times.

  • Remove some now unused functions

@0152la 0152la requested a review from ltratt December 16, 2024 13:45
include/compartment.h Outdated Show resolved Hide resolved
include/compartment.h Outdated Show resolved Hide resolved
@@ -55,7 +57,7 @@ intercept_wrapper();
void
setup_intercepts();

size_t
my_call_comp(size_t, char *, void *);
// size_t
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the comment for intercept.c. I can also add a TODO here, if it's worth it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A TODO would be good, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 887f644.

@ltratt
Copy link
Contributor

ltratt commented Dec 16, 2024

Only one comment left!

@ltratt
Copy link
Contributor

ltratt commented Dec 16, 2024

Please squash.

@0152la
Copy link
Contributor Author

0152la commented Dec 16, 2024

Squashed.

@ltratt ltratt added this pull request to the merge queue Dec 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 16, 2024
@0152la
Copy link
Contributor Author

0152la commented Dec 16, 2024

Seems there's further divergence between my local clang-format and the one in cheribuild. Ready for review.

@ltratt
Copy link
Contributor

ltratt commented Dec 16, 2024

Please squash.

Move from a design of "one compartment has one mapping" to "one
compartment can be mapped multiple times". This involves "staging" a
compartment, with temporary internal relative relocations, after which
the staging can be lifted to a "mapping", which has correct relocations
and can be executed. This greatly reduces the overhead of creating the
same compartment multiple times.

* Remove some now unused functions
@0152la
Copy link
Contributor Author

0152la commented Dec 16, 2024

Squashed.

@ltratt ltratt added this pull request to the merge queue Dec 16, 2024
Merged via the queue into capablevms:master with commit 85efbfd Dec 16, 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