Repository navigation
capdl: fail-closed capability rights in spec - #375
Merged
Merged
Conversation
Per seL4's `maskCapRights` function (and `Arch_` variant), only caps for Endpoints, Notifications, Replies, and Frames have rights which seL4 cares about (or can be stored inside the capability). Currently, rust-seL4 does not support setting rights on Reply caps in the capDL specification, but there is a 'capReplyCanGrant' bit in the Reply capability which controls capability transfer. In case we miss more of these, or more are added, default right-less caps in the spec to being minted with `CapRights::none()`, which gives them no rights by default. For most cap types, this does not actually matter; for cap types where it does matter the `rights()` method should return `Some()` as per the implementation. Perform a similar change for mint_iospace_cap (internal helper, not exposed to users, and it does not care about the rights), and document `CapRights::all` for copying to the notification bound to an IRQ (which does need Send/Write permissions). Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
Only the 'Grant' bit of the Rights means anything for the Reply Cap, which controls 'capReplyCanGrant' bit. Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
midnightveil
force-pushed
the
julia/rights-default-none
branch
from
October 1, 2026 08:23
f98d2f2 to
12d0fde
Compare
nspin
approved these changes
Oct 1, 2026
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.
Per seL4's
maskCapRightsfunction (andArch_variant), only capsfor Endpoints, Notifications, Replies, and Frames have rights
which seL4 cares about (or can be stored inside the capability).
Currently, rust-seL4 does not support setting rights on Reply caps
in the capDL specification, but there is a 'capReplyCanGrant' bit
in the Reply capability which controls capability transfer.
In case we miss more of these, or more are added, default right-less
caps in the spec to being minted with
CapRights::none(), whichgives them no rights by default. For most cap types, this does not
actually matter; for cap types where it does matter the
rights()method should return
Some()as per the implementation.Perform a similar change for mint_iospace_cap (internal helper,
not exposed to users, and it does not care about the rights),
and document
CapRights::allfor copying to the notification boundto an IRQ (which does need Send/Write permissions).
Then fix the reply cap rights thing.