-
Notifications
You must be signed in to change notification settings - Fork 0
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
Capability compression exceptions #5
Comments
Definitely should not panic. There are two options.
Ideally we can provide separate sets of instructions for manipulating capability bounds. For now let's get this 2nd one done. Afterwards we can consider the first one. |
In a real machine, these adjustments to the bounds of the capability should be handled every time we make changes to the bounds (i.e. SHRINK and SPLIT) and every time we make changes to the cursor of the capability. In the simulator, maybe we can just make such changes to the capability when we store a capability to the memory (since that's when we need to translate a capability to its bit representation). |
I think we should reconsider this. Any change in the region could be exploited as a security issue. Instead of shrinking, we could report an error. It would be up to the software to determine if it will be valid or not. This should simplify things. For expanded / precise versions, we could have a feature bit, and then the code would know all values are valid and generate the correct ones. |
Actually there are more options here, beyond what we have mentioned
Beyond this we want to decide how much of this behaviour should be specified and how much should be left to the implementation. Currently we have left the actual capability encoding to the implementation, and considering that this representable/unrepresentable thing depends on the capability encoding, I think we should let the implementation decide something too. Perhaps we can mandate implementations to provide a "strict mode", which throws errors/clears tags for anything unrepresentable, but let the implementation shrink regions outside this mode. |
Currently, we are using a CHERI-style compression to express
bounds
in a 128-bit capability. However, some values of thebase
andend
fields are illegal in such a compression format. What should the machine do if such a situation happens? Should we add a new exception type? Or it simply just enter the state of panic in Pure Capstone or the state ofunhandleable exception
in TransCapstone. @jasonyu1996The text was updated successfully, but these errors were encountered: