Retrieving capability properties
The following APIs allow capability properties to be retrieved from pointers:
-
ptraddr_t cheri_address_get(void *c): Return the address of the capabilityc. -
ptraddr_t cheri_base_get(void *c): Return the lower bound of capabilityc. -
size_t cheri_length_get(void *c): Return the length of the bounds for the capabilityc. The base plus the length gives the upper bound onc's address. -
size_t cheri_offset_get(void *c): Return the difference between the address and the lower bound of the capabilityc. -
size_t cheri_perms_get(void *c): Return the permissions of capabilityc. (See Capability permissions.) -
_Bool cheri_tag_get(void *c): Return whether capabilitychas its validity tag set.