Repository navigation
tool: fix broken PD hierarchy - #605
Merged
Merged
Conversation
| } else { | ||
| unreachable!("internal bug: build_capdl_spec() got a non TCB object ID when trying to bind the fault Endpoint."); | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
Where did this come from? It wasn't in the previous code?
Collaborator
Author
There was a problem hiding this comment.
Previously in step 3-5 we just put the CTE inside caps_to_bind_to_tcb and then everything happen for us in step 3-13. But now this step is in a different scope we need to re-fetch the TCB and insert the fault EP CTE
Collaborator
There was a problem hiding this comment.
Right. That's somewhat ugly :/.
But alas...
Prior to commit c67227f, PDs are fed into step 3 of build_capdl_spec() as a flat vector in topological order. That is, a parent ID always appears before its children PDs. However, commit c67227f changed the Vec into a BTreeMap, so the ordering is now dictated by the Rust data structure implementation. Thus it is possible that a child will now be created before its parent. Causing the code to crash when it tries to find the parent's fault endpoint. This is fixed by moving the fault endpoint binding step into a separate "post processing" step that happens after all the PDs are created. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
For future reference Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
dreamliner787-9
force-pushed
the
hierarchy_fix
branch
from
September 17, 2026 04:51
b60e349 to
4d998b9
Compare
midnightveil
approved these changes
Sep 18, 2026
midnightveil
left a comment
Collaborator
There was a problem hiding this comment.
Approving as a hotfix for the issue. I think I'd like to restructure this a bit more sensibly but for now let's just fix the issue.
dreamliner787-9
added a commit
that referenced
this pull request
Oct 5, 2026
Now that seL4/rust-sel4#374 had been merged and the rust-seL4 commit updated in #616. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prior to commit c67227f, PDs are fed into step 3 of build_capdl_spec()
as a flat vector in topological order. That is, a parent ID always
appears before its children PDs. However, commit c67227f changed the Vec
into a BTreeMap, so the ordering is now dictated by the Rust data
structure implementation.
Thus it is possible that a child will now be created before its parent.
Causing the code to crash when it tries to find the parent's fault
endpoint.
This is fixed by moving the fault endpoint binding step into a separate
"post processing" step that happens after all the PDs are created.
Closes #604