Revert "[MTE] remap stacks with PROT_MTE when requested by dlopened library"
This reverts commit 79c9694c913f0d917c45a365ac314b1329317f1c.
Reason for revert: DroidMonitor: Potential culprit for Bug b/324348078 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I32f7bc824900e18a7d53b025ffe3aaef0ee71802
diff --git a/libc/bionic/libc_init_dynamic.cpp b/libc/bionic/libc_init_dynamic.cpp
index 295484b..c61810e 100644
--- a/libc/bionic/libc_init_dynamic.cpp
+++ b/libc/bionic/libc_init_dynamic.cpp
@@ -39,12 +39,11 @@
* all dynamic linking has been performed.
*/
-#include <elf.h>
#include <stddef.h>
-#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include "bionic/pthread_internal.h"
+#include <stdint.h>
+#include <elf.h>
#include "libc_init_common.h"
#include "private/bionic_defs.h"
@@ -60,10 +59,6 @@
extern int __cxa_atexit(void (*)(void *), void *, void *);
};
-void memtag_stack_dlopen_callback() {
- __pthread_internal_remap_stack_with_mte();
-}
-
// Use an initializer so __libc_sysinfo will have a fallback implementation
// while .preinit_array constructors run.
#if defined(__i386__)
@@ -161,10 +156,6 @@
__libc_init_mte_late();
- // This roundabout way is needed so we don't use the static libc linked into the linker, which
- // will not affect the process.
- __libc_shared_globals()->memtag_stack_dlopen_callback = memtag_stack_dlopen_callback;
-
exit(slingshot(args.argc - __libc_shared_globals()->initial_linker_arg_count,
args.argv + __libc_shared_globals()->initial_linker_arg_count,
args.envp));