Index: cmake/config-ix.cmake =================================================================== --- cmake/config-ix.cmake +++ cmake/config-ix.cmake @@ -246,7 +246,7 @@ ${SANITIZER_COMMON_SUPPORTED_ARCH}) filter_available_targets(ASAN_SUPPORTED_ARCH x86_64 i386 i686 powerpc64 powerpc64le arm mips mipsel mips64 mips64el) -filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64 mips64 mips64el) +filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64 mips64 mips64el aarch64) filter_available_targets(LSAN_SUPPORTED_ARCH x86_64 mips64 mips64el) filter_available_targets(MSAN_SUPPORTED_ARCH x86_64 mips64 mips64el) filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 i686 arm mips mips64 Index: lib/dfsan/dfsan.h =================================================================== --- lib/dfsan/dfsan.h +++ lib/dfsan/dfsan.h @@ -48,6 +48,8 @@ return (dfsan_label *) ((((uptr) ptr) & ~0x700000000000) << 1); #elif defined(__mips64) return (dfsan_label *) ((((uptr) ptr) & ~0xF000000000) << 1); +#elif defined(__aarch64__) + return (dfsan_label *) ((((uptr) ptr) & ~0x7000000000) << 1); #endif } Index: lib/dfsan/dfsan.cc =================================================================== --- lib/dfsan/dfsan.cc +++ lib/dfsan/dfsan.cc @@ -80,6 +80,22 @@ // | reserved by kernel | // +--------------------+ 0x0000000000 +// On Linux/AArch64, memory is laid out as follows: +// +// +--------------------+ 0x8000000000 (top of memory) +// | application memory | +// +--------------------+ 0x7000008000 (kAppAddr) +// | | +// | unused | +// | | +// +--------------------+ 0x2200000000 (kUnusedAddr) +// | union table | +// +--------------------+ 0x2000000000 (kUnionTableAddr) +// | shadow memory | +// +--------------------+ 0x0000010000 (kShadowAddr) +// | reserved by kernel | +// +--------------------+ 0x0000000000 + typedef atomic_dfsan_label dfsan_union_table_t[kNumLabels][kNumLabels]; #if defined(__x86_64__) @@ -92,6 +108,11 @@ static const uptr kUnionTableAddr = 0x2000000000; static const uptr kUnusedAddr = kUnionTableAddr + sizeof(dfsan_union_table_t); static const uptr kAppAddr = 0xF000008000; +#elif defined(__aarch64__) +static const uptr kShadowAddr = 0x10000; +static const uptr kUnionTableAddr = 0x2000000000; +static const uptr kUnusedAddr = kUnionTableAddr + sizeof(dfsan_union_table_t); +static const uptr kAppAddr = 0x7000008000; #else # error "DFSan not supported for this platform!" #endif