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

v2? cgp as SCR #43

Open
nwf-msr opened this issue Feb 28, 2024 · 1 comment
Open

v2? cgp as SCR #43

nwf-msr opened this issue Feb 28, 2024 · 1 comment
Labels
maybe-v2 Tracking issues for possible changes for an ISAv2

Comments

@nwf-msr
Copy link
Contributor

nwf-msr commented Feb 28, 2024

Right now, CGP is just an ISA name for one of the GPRs reachable by all register selectors. We have contemplated instead converting it to a SCR. That SCR would likely be ambiently readable, via AUICGP as well as the existing SCR access instructions, but would require ASR to modify, restricting modification to the TCB switcher.1 As we already consider library code as running within the calling compartment,2 this does not change the security model.

The effect on code density should be investigated: does freeing up a GPR eliminate enough spills to offset the cost of fetching CGP via AUICGP in all cases?

Footnotes

  1. Requiring ASR to modify means that a compartment and the libraries it calls cannot foul up its CGP. The switcher could also rely on the constancy of this SCR outside itself, but it's not clear that there would be significant gains.

  2. Though the fast unsealer and perhaps other "privileged libraries" blur the text here, as they manipulate secrets not exposed to the calling compartment.

@nwf-msr nwf-msr added the maybe-v2 Tracking issues for possible changes for an ISAv2 label Feb 28, 2024
@nwf
Copy link
Member

nwf commented Oct 2, 2024

Readers should note the similarity with the Zstid proposal from the RISC-V CHERI standardization effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maybe-v2 Tracking issues for possible changes for an ISAv2
Projects
None yet
Development

No branches or pull requests

2 participants