diff options
-rw-r--r-- | debuggerd/Android.bp | 15 | ||||
-rw-r--r-- | debuggerd/crash_dump.cpp | 3 | ||||
-rw-r--r-- | debuggerd/debuggerd_test.cpp | 24 | ||||
-rw-r--r-- | debuggerd/libdebuggerd/utility.cpp | 1 |
4 files changed, 12 insertions, 31 deletions
diff --git a/debuggerd/Android.bp b/debuggerd/Android.bp index 6391acc54..fd6239253 100644 --- a/debuggerd/Android.bp +++ b/debuggerd/Android.bp @@ -225,9 +225,6 @@ cc_library_static { debuggable: { cflags: ["-DROOT_POSSIBLE"], }, - experimental_mte: { - cflags: ["-DANDROID_EXPERIMENTAL_MTE"], - }, }, } @@ -297,12 +294,6 @@ cc_test { }, test_suites: ["device-tests"], - - product_variables: { - experimental_mte: { - cflags: ["-DANDROID_EXPERIMENTAL_MTE"], - }, - }, } cc_benchmark { @@ -353,12 +344,6 @@ cc_binary { apex_available: [ "com.android.runtime", ], - - product_variables: { - experimental_mte: { - cflags: ["-DANDROID_EXPERIMENTAL_MTE"], - }, - }, } cc_binary { diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp index b3e81b04b..4f600055d 100644 --- a/debuggerd/crash_dump.cpp +++ b/debuggerd/crash_dump.cpp @@ -40,7 +40,6 @@ #include <android-base/stringprintf.h> #include <android-base/strings.h> #include <android-base/unique_fd.h> -#include <bionic/mte_kernel.h> #include <bionic/reserved_signals.h> #include <cutils/sockets.h> #include <log/log.h> @@ -484,7 +483,6 @@ int main(int argc, char** argv) { continue; } -#ifdef ANDROID_EXPERIMENTAL_MTE struct iovec iov = { &info.tagged_addr_ctrl, sizeof(info.tagged_addr_ctrl), @@ -493,7 +491,6 @@ int main(int argc, char** argv) { reinterpret_cast<void*>(&iov)) == -1) { info.tagged_addr_ctrl = -1; } -#endif if (thread == g_target_thread) { // Read the thread's registers along with the rest of the crash info out of the pipe. diff --git a/debuggerd/debuggerd_test.cpp b/debuggerd/debuggerd_test.cpp index e5af425ec..7938a61a6 100644 --- a/debuggerd/debuggerd_test.cpp +++ b/debuggerd/debuggerd_test.cpp @@ -383,7 +383,7 @@ TEST_F(CrasherTest, heap_addr_in_register) { #endif } -#if defined(__aarch64__) && defined(ANDROID_EXPERIMENTAL_MTE) +#if defined(__aarch64__) static void SetTagCheckingLevelSync() { HeapTaggingLevel heap_tagging_level = M_HEAP_TAGGING_LEVEL_SYNC; if (!android_mallopt(M_SET_HEAP_TAGGING_LEVEL, &heap_tagging_level, sizeof(heap_tagging_level))) { @@ -393,7 +393,7 @@ static void SetTagCheckingLevelSync() { #endif TEST_F(CrasherTest, mte_uaf) { -#if defined(__aarch64__) && defined(ANDROID_EXPERIMENTAL_MTE) +#if defined(__aarch64__) if (!mte_supported()) { GTEST_SKIP() << "Requires MTE"; } @@ -425,12 +425,12 @@ allocated by thread .* ASSERT_MATCH(result, R"(deallocated by thread .* #00 pc)"); #else - GTEST_SKIP() << "Requires aarch64 + ANDROID_EXPERIMENTAL_MTE"; + GTEST_SKIP() << "Requires aarch64"; #endif } TEST_F(CrasherTest, mte_overflow) { -#if defined(__aarch64__) && defined(ANDROID_EXPERIMENTAL_MTE) +#if defined(__aarch64__) if (!mte_supported()) { GTEST_SKIP() << "Requires MTE"; } @@ -459,12 +459,12 @@ TEST_F(CrasherTest, mte_overflow) { allocated by thread .* #00 pc)"); #else - GTEST_SKIP() << "Requires aarch64 + ANDROID_EXPERIMENTAL_MTE"; + GTEST_SKIP() << "Requires aarch64"; #endif } TEST_F(CrasherTest, mte_underflow) { -#if defined(__aarch64__) && defined(ANDROID_EXPERIMENTAL_MTE) +#if defined(__aarch64__) if (!mte_supported()) { GTEST_SKIP() << "Requires MTE"; } @@ -493,12 +493,12 @@ TEST_F(CrasherTest, mte_underflow) { allocated by thread .* #00 pc)"); #else - GTEST_SKIP() << "Requires aarch64 + ANDROID_EXPERIMENTAL_MTE"; + GTEST_SKIP() << "Requires aarch64"; #endif } TEST_F(CrasherTest, mte_multiple_causes) { -#if defined(__aarch64__) && defined(ANDROID_EXPERIMENTAL_MTE) +#if defined(__aarch64__) if (!mte_supported()) { GTEST_SKIP() << "Requires MTE"; } @@ -547,11 +547,11 @@ TEST_F(CrasherTest, mte_multiple_causes) { // overflows), so we can't match explicitly for an underflow message. ASSERT_MATCH(result, R"(Cause: \[MTE\]: Buffer Overflow, 0 bytes right of a 16-byte allocation)"); #else - GTEST_SKIP() << "Requires aarch64 + ANDROID_EXPERIMENTAL_MTE"; + GTEST_SKIP() << "Requires aarch64"; #endif } -#if defined(__aarch64__) && defined(ANDROID_EXPERIMENTAL_MTE) +#if defined(__aarch64__) static uintptr_t CreateTagMapping() { uintptr_t mapping = reinterpret_cast<uintptr_t>(mmap(nullptr, getpagesize(), PROT_READ | PROT_WRITE | PROT_MTE, @@ -568,7 +568,7 @@ static uintptr_t CreateTagMapping() { #endif TEST_F(CrasherTest, mte_tag_dump) { -#if defined(__aarch64__) && defined(ANDROID_EXPERIMENTAL_MTE) +#if defined(__aarch64__) if (!mte_supported()) { GTEST_SKIP() << "Requires MTE"; } @@ -596,7 +596,7 @@ TEST_F(CrasherTest, mte_tag_dump) { 01.............0 0000000000000000 0000000000000000 ................ 00.............0)"); #else - GTEST_SKIP() << "Requires aarch64 + ANDROID_EXPERIMENTAL_MTE"; + GTEST_SKIP() << "Requires aarch64"; #endif } diff --git a/debuggerd/libdebuggerd/utility.cpp b/debuggerd/libdebuggerd/utility.cpp index 2f1b693fc..7826efc5e 100644 --- a/debuggerd/libdebuggerd/utility.cpp +++ b/debuggerd/libdebuggerd/utility.cpp @@ -35,7 +35,6 @@ #include <android-base/stringprintf.h> #include <android-base/strings.h> #include <android-base/unique_fd.h> -#include <bionic/mte_kernel.h> #include <bionic/reserved_signals.h> #include <debuggerd/handler.h> #include <log/log.h> |