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

Respect cap rights in capDL initialiser #104

Open
Ivan-Velickovic opened this issue Mar 4, 2024 · 2 comments
Open

Respect cap rights in capDL initialiser #104

Ivan-Velickovic opened this issue Mar 4, 2024 · 2 comments

Comments

@Ivan-Velickovic
Copy link
Contributor

Not urgent, but I have noticed some code in the capDL initaliser code that does not respect the rights for a capability that is outlined in the given spec:

cptr.mint(&orig_cptr, CapRights::all(), badge)?;

Just opening an issue to say we should look at all the points where cap rights are relevant and make sure they are respected.

@nspin
Copy link
Member

nspin commented Mar 5, 2024

You bring up a good point about that line.

I chose this behavior to match that of the C CapDL initializer:

https://github.com/seL4/capdl/blob/f7ef9ca4f9d3e1a8e86375deaf286a056698b9ce/capdl-loader-app/src/main.c#L1375-L1384

I agree that using logical_nfn_cap.rights() here would make for more sensible behavior. However, existing CapDL specs may depend on the C CapDL initializer's behavior here by not explicitly setting rights of notification caps that they bind to IRQ handlers.

Instead of modifying the Rust CapDL initializer immediately, perhaps it would be best to raise this as a larger issue for CapDL in general (that is, the C CapDL initializer, any other in-progress initializers, and CAmkES).

@Ivan-Velickovic
Copy link
Contributor Author

Instead of modifying the Rust CapDL initializer immediately, perhaps it would be best to raise this as a larger issue for CapDL in general (that is, the C CapDL initializer, any other in-progress initializers, and CAmkES).

Good point, I'll bring it up at the development hangout tomorrow.

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

No branches or pull requests

2 participants