[PATCH] D22095: [asan] Enable 48-bit VMA support on aarch64

Adhemerval Zanella via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 09:18:26 PDT 2016


zatrazz created this revision.
zatrazz added reviewers: kcc, pcc, eugenis, samsonov, rengolin.
zatrazz added a subscriber: llvm-commits.
zatrazz added a project: Sanitizers.
Herald added subscribers: kubabrecka, rengolin, aemerson.

This patch adds 48-bits VMA support for asan on aarch64.  The current
47-bit mask is not suffice since on aarch64 kernel with 48-bit vma
(default on ubuntu 16.04) the process may use full VMA range as:

[...]
ffffa39a7000-ffffa39a8000 r--p 00000000 00:00 0                          [vvar]
ffffa39a8000-ffffa39a9000 r-xp 00000000 00:00 0                          [vdso]
ffffa39a9000-ffffa39aa000 r--p 0001c000 08:02 13631554                   /lib/aarch64-linux-gnu/ld-2.23.so
ffffa39aa000-ffffa39ac000 rw-p 0001d000 08:02 13631554                   /lib/aarch64-linux-gnu/ld-2.23.so
ffffc2227000-ffffc2248000 rw-p 00000000 00:00 0                          [stack]

http://reviews.llvm.org/D22095

Files:
  lib/sanitizer_common/sanitizer_platform.h

Index: lib/sanitizer_common/sanitizer_platform.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform.h
+++ lib/sanitizer_common/sanitizer_platform.h
@@ -180,6 +180,8 @@
 // will still work but will consume more memory for TwoLevelByteMap.
 #if defined(__mips__)
 # define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 40)
+#elif defined(__aarch64__)
+# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 48)
 #else
 # define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 47)
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22095.63084.patch
Type: text/x-patch
Size: 602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160707/086c93e3/attachment.bin>


More information about the llvm-commits mailing list