-
Notifications
You must be signed in to change notification settings - Fork 112
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
Change representation of the SeqSet #568
Conversation
This changes the representation of SeqSet to be doubly linked. This is required to enable tracking fully used slabs. * Currently debug_check_empty can say empty when it isn't as a slab is fully used. * Implementing a heap walk we will also need to track fully used slabs. Future PR will use this to track fully used slabs.
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.
LGTM but I'm sorry you had to go through all that. I suspect moving back to an AuthMap
design will simplify some of this and the unfortunate interaction with the StrictProvenance
arena
s. I did not foresee this (and other fun) when #402 was being developed.
NextPtr* end{&head}; | ||
}; | ||
// We could use -static_cast<ptrdiff_t>(offsetof(T, node)) here but CHERI | ||
// compiler complains. So we restrict to first entries only. |
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.
It's not really the CHERI compiler's fault per se, it's just that StrictProvenanceSlabMetadataMixin
defines members atop the FrontendSlabMetadata
parameter and so makes the Pagemap
's SlabMetadata
parameter not a Standard Layout type, and so offsetof
is not defined.
I'm kind of surprised it works in the static_assert
below.... oh, because T
here is the superclass and the caller's done the non-Standard-Layout shift for us. It looks like we never need to perform the downcast?
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.
I think T
is StrictProvenanceSlabMetadata
for CHERI here. That class ties the parameter back in using F-Bounded polymorphism.
This changes the representation of SeqSet to be doubly linked. This is required to enable tracking fully used slabs.
Future PR will use this to track fully used slabs.