From 8357d02f2d4f6c22202fb25f3b4c97fb2b893ec9 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Fri, 10 Nov 2017 22:27:48 +0000 Subject: [asan] Use dynamic shadow on 32-bit Android. Summary: The following kernel change has moved ET_DYN base to 0x4000000 on arm32: https://marc.info/?l=linux-kernel&m=149825162606848&w=2 Switch to dynamic shadow base to avoid such conflicts in the future. Reserve shadow memory in an ifunc resolver, but don't use it in the instrumentation until PR35221 is fixed. This will eventually let use save one load per function. Reviewers: kcc Subscribers: aemerson, srhines, kubamracek, kristof.beyls, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D39393 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317943 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/sanitizer_fuchsia.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/sanitizer_common/sanitizer_fuchsia.cc') diff --git a/lib/sanitizer_common/sanitizer_fuchsia.cc b/lib/sanitizer_common/sanitizer_fuchsia.cc index 97dff0d8b..c03c9939c 100644 --- a/lib/sanitizer_common/sanitizer_fuchsia.cc +++ b/lib/sanitizer_common/sanitizer_fuchsia.cc @@ -191,6 +191,10 @@ uptr GetMaxUserVirtualAddress() { return ShadowBounds.memory_limit - 1; } +uptr GetMaxVirtualAddress() { + return GetMaxUserVirtualAddress(); +} + static void *DoAnonymousMmapOrDie(uptr size, const char *mem_type, bool raw_report, bool die_for_nomem) { size = RoundUpTo(size, PAGE_SIZE); -- cgit v1.2.3