mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-24 00:41:11 -04:00
mte: move is_memtag_enabled to read-only allocator data
This commit is contained in:
parent
576328b1b4
commit
01a199e19e
2 changed files with 23 additions and 17 deletions
12
memtag.h
12
memtag.h
|
@ -10,18 +10,6 @@
|
|||
#define TAG_WIDTH 4
|
||||
#endif
|
||||
|
||||
#ifdef MEMTAG
|
||||
extern bool __is_memtag_enabled;
|
||||
#endif
|
||||
|
||||
static inline bool is_memtag_enabled(void) {
|
||||
#ifdef MEMTAG
|
||||
return __is_memtag_enabled;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void *untag_pointer(void *ptr) {
|
||||
#ifdef HAS_ARM_MTE
|
||||
const uintptr_t mask = UINTPTR_MAX >> 8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue