Reland "[MTE] remap stacks with PROT_MTE when requested by dlopened library"
This reverts commit c20e1c2bdfc00b3fb7931da5e88ceac3fa4df4b2.
Reason for revert: Was not the root-cause of test failure.
Change-Id: I7dcd9fc3cbac47703fa8ecd5aafd7e1c3ed87301
diff --git a/libc/private/bionic_globals.h b/libc/private/bionic_globals.h
index 8ea7d4d..08a61f0 100644
--- a/libc/private/bionic_globals.h
+++ b/libc/private/bionic_globals.h
@@ -50,6 +50,7 @@
uintptr_t heap_pointer_tag;
_Atomic(bool) memtag_stack;
_Atomic(bool) decay_time_enabled;
+ _Atomic(bool) memtag;
// In order to allow a complete switch between dispatch tables without
// the need for copying each function by function in the structure,
@@ -135,6 +136,8 @@
HeapTaggingLevel initial_heap_tagging_level = M_HEAP_TAGGING_LEVEL_NONE;
bool initial_memtag_stack = false;
int64_t heap_tagging_upgrade_timer_sec = 0;
+
+ void (*memtag_stack_dlopen_callback)() = nullptr;
};
__LIBC_HIDDEN__ libc_shared_globals* __libc_shared_globals();