From 97a73d7b7b9bc63608065a62d7b9ec1a9be8b54d Mon Sep 17 00:00:00 2001 From: Akilan Date: Wed, 26 Nov 2025 12:11:14 +0000 Subject: [PATCH] added ARM cheri variables --- src/snmalloc/ds_core/cheri.h | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/snmalloc/ds_core/cheri.h b/src/snmalloc/ds_core/cheri.h index 41514d9..d00f498 100644 --- a/src/snmalloc/ds_core/cheri.h +++ b/src/snmalloc/ds_core/cheri.h @@ -39,13 +39,25 @@ namespace snmalloc // 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 */ + #define CHERI_PERM_EXECUTIVE (1 << 1) /* 0x00000002 */ + #define CHERI_PERM_SW0 (1 << 2) /* 0x00000004 */ + #define CHERI_PERM_SW1 (1 << 3) /* 0x00000008 */ + #define CHERI_PERM_SW2 (1 << 4) /* 0x00000010 */ + #define CHERI_PERM_SW3 (1 << 5) /* 0x00000020 */ + #define CHERI_PERM_MUTABLE_LOAD (1 << 6) /* 0x00000040 */ + #define CHERI_PERM_COMPARTMENT_ID (1 << 7) /* 0x00000080 */ + #define CHERI_PERM_BRANCH_SEALED_PAIR (1 << 8) /* 0x00000100 */ + #define CHERI_PERM_INVOKE CHERI_PERM_BRANCH_SEALED_PAIR + #define CHERI_PERM_SYSTEM (1 << 9) /* 0x00000200 */ + #define CHERI_PERM_SYSTEM_REGS CHERI_PERM_SYSTEM + #define CHERI_PERM_UNSEAL (1 << 10) /* 0x00000400 */ + #define CHERI_PERM_SEAL (1 << 11) /* 0x00000800 */ + #define CHERI_PERM_STORE_LOCAL_CAP (1 << 12) /* 0x00001000 */ + #define CHERI_PERM_STORE_CAP (1 << 13) /* 0x00002000 */ + #define CHERI_PERM_LOAD_CAP (1 << 14) /* 0x00004000 */ + #define CHERI_PERM_EXECUTE (1 << 15) /* 0x00008000 */ + #define CHERI_PERM_STORE (1 << 16) /* 0x00010000 */ + #define CHERI_PERM_LOAD (1 << 17) /* 0x00020000 */ static const size_t reqperm = CHERI_PERM_LOAD | CHERI_PERM_STORE | CHERI_PERM_LOAD_CAP | CHERI_PERM_STORE_CAP;