diff --git a/src/snmalloc/ds_core/cheri.h b/src/snmalloc/ds_core/cheri.h index db80976..41514d9 100644 --- a/src/snmalloc/ds_core/cheri.h +++ b/src/snmalloc/ds_core/cheri.h @@ -36,6 +36,17 @@ namespace snmalloc * permissions checks are required in the non-SNMALLOC_CHECK_CLIENT case * to defend ourselves or other clients against a misbehaving client. */ + + // Defining values + #define CHERI_PERM_GLOBAL (1 << 0) /* 0x00000001 */ + #define CHERI_PERM_EXECUTE (1 << 1) /* 0x00000002 */ + #define CHERI_PERM_LOAD (1 << 2) /* 0x00000004 */ + #define CHERI_PERM_STORE (1 << 3) /* 0x00000008 */ + #define CHERI_PERM_LOAD_CAP (1 << 4) /* 0x00000010 */ + #define CHERI_PERM_STORE_CAP (1 << 5) /* 0x00000020 */ + #define CHERI_PERM_STORE_LOCAL_CAP (1 << 6) /* 0x00000040 */ + #define CHERI_PERM_SEAL (1 << 7) /* 0x00000080 */ + static const size_t reqperm = CHERI_PERM_LOAD | CHERI_PERM_STORE | CHERI_PERM_LOAD_CAP | CHERI_PERM_STORE_CAP; snmalloc_check_client(