[compiler-rt] [hwasan] Add config for AArch64 Linux with 39-bit VA. (PR #170927)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 5 13:40:50 PST 2025


https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/170927

This is leveraging work which has already been done for Android, which ships 39-bit VA kernels, and extending it to other embedded Linux targets.

(SANITIZER_AARCH64_39BIT_VA was added in 58c8f57681.)

>From c7d0025518d08b7c2543b3c8528a29ac8292f852 Mon Sep 17 00:00:00 2001
From: Eli Friedman <efriedma at qti.qualcomm.com>
Date: Fri, 5 Dec 2025 13:37:52 -0800
Subject: [PATCH] [hwasan] Add config for AArch64 Linux with 39-bit VA.

This is leveraging work which has already been done for Android, which
ships 39-bit VA kernels, and extending it to other embedded Linux
targets.

(SANITIZER_AARCH64_39BIT_VA was added in 58c8f57681.)
---
 compiler-rt/lib/hwasan/hwasan_allocator.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/lib/hwasan/hwasan_allocator.h b/compiler-rt/lib/hwasan/hwasan_allocator.h
index 2ada2a0b1851a..94fd7b2f7467b 100644
--- a/compiler-rt/lib/hwasan/hwasan_allocator.h
+++ b/compiler-rt/lib/hwasan/hwasan_allocator.h
@@ -74,7 +74,7 @@ struct AP64 {
 #if defined(HWASAN_ALIASING_MODE)
   static const uptr kSpaceSize = 1ULL << kAddressTagShift;
   typedef __sanitizer::DefaultSizeClassMap SizeClassMap;
-#elif SANITIZER_LINUX && !SANITIZER_ANDROID
+#elif SANITIZER_LINUX && !SANITIZER_ANDROID && !defined(SANITIZER_AARCH64_39BIT_VA)
   static const uptr kSpaceSize = 0x40000000000ULL;  // 4T.
   typedef __sanitizer::DefaultSizeClassMap SizeClassMap;
 #else



More information about the llvm-commits mailing list