CHERIoT-Platform / cheriot-sail

Sail code model of the CHERIoT ISA
Other
34 stars 9 forks source link

Allow CUnseal to work on ranges #71

Closed davidchisnall closed 6 days ago

davidchisnall commented 1 month ago

Currently, CUnseal unseals only if the otype exactly matches the specified type. Originally, CUnseal unsealed anything in the authorising range. I'm not sure why we made this change. Either version can emulate the other.

The current behaviour can emulate the range behaviour by doing cgettype, csetaddr, cunseal.

The current behaviour can be emulated by doing csetaddr, csetbounds, cunseal.

So far, 100% of uses have wanted the former behaviour and so we end up doing the cgettype, csetaddr dance on every unseal for any sealing type that has a length > 1.

It would be nice if the ISA did the common thing.