[PATCH] D36587: Add NetBSD ASAN shadow mapping for x86-64
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 17:55:38 PDT 2017
krytarowski added a comment.
I've checked that ShadowOffset 0 breaks ASAN.
In https://reviews.llvm.org/D36587#854807, @eugenis wrote:
> Looking at the comment,
> 0000 0000 1000 - 0080 0000 0000: main binary and/or MAP_32BIT mappings (512GB)
> 5500 0000 0000 - 5680 0000 0000: pie binaries without ASLR or on 4.1+ kernels
> 7e80 0000 0000 - 8000 0000 0000: modules and main thread stack
>
> ^ these are the OS constraints, the rest can be moved.
I'm having now trouble to translate these values to NetBSD.
> Another constraint is MemToShadowImpl() which, for any address in, I assume, writable memory (so any of the above + heap) needs to provide an distinct address in "shadow". AFAIK, "metainfo" and "traces" are completely arbitrary.
Another thread: If I understand correctly there is an assumption that PIE code is mapped on Linux/FreeBSD into adjacent memory regions. This is not true on NetBSD (@joerg can correct me).
I was trying to reuse Linux/FreeBSD process memory mapping and all tests fail. It breaks at PIE detection (I disabled it locally to check what happens).
Repository:
rL LLVM
https://reviews.llvm.org/D36587
More information about the llvm-commits
mailing list