[hwasan] Allow optional early shadow setup.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 13 Aug 2018 19:57:11 +0000 (19:57 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Mon, 13 Aug 2018 19:57:11 +0000 (19:57 +0000)
commitc68be8d2d523c8b3f5852fbb9ff553530e4e6bfd
tree09e0543f3744c7f4c8d8cbe9f799d04d7ba4802d
parentcce7c24af13376e460a217a2bad01568de8fd6fb
[hwasan] Allow optional early shadow setup.

Summary:
Provide __hwasan_shadow_init that can be used to initialize shadow w/o touching libc.
It can be used to bootstrap an unusual case of fully-static executable with
hwasan-instrumented libc, which needs to run hwasan code before it is ready to serve
user calls like madvise().

Reviewers: vitalybuka, kcc

Subscribers: kubamracek, llvm-commits

Differential Revision: https://reviews.llvm.org/D50581

llvm-svn: 339606
compiler-rt/include/sanitizer/hwasan_interface.h
compiler-rt/lib/hwasan/hwasan.cc
compiler-rt/lib/hwasan/hwasan.h
compiler-rt/lib/hwasan/hwasan_interface_internal.h
compiler-rt/lib/hwasan/hwasan_linux.cc