diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-05-24 02:47:59 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-05-24 02:47:59 +0000 |
commit | 5236cff8bf581bb2615c787eb59ed53d0cb95586 (patch) | |
tree | f5d3f2bff7bad83103298dc5a47fd3a57ba798e8 /lib/msan/msan.h | |
parent | 1cc9bbb81c4e4eb09444cd233cb622e180b6cadc (diff) |
[msan] Mprotect all inaccessible memory regions.
Fix 2 bugs in memory mapping setup:
- the invalid region at offset 0 was not protected because mmap at
address 0 fails with EPERM on most Linux systems. We did not
notice this because the check condition was flipped: the code was
checking that mprotect has failed. And the test that was supposed
to catch this was weakened by the mitigations in the mmap
interceptor.
- when running without origins, the origin shadow range was left
unprotected.
The new test ensures that mmap w/o MAP_FIXED always returns valid
application addresses.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan.h')
-rw-r--r-- | lib/msan/msan.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/msan/msan.h b/lib/msan/msan.h index 2d48e69d7..0adbeb68f 100644 --- a/lib/msan/msan.h +++ b/lib/msan/msan.h @@ -125,7 +125,7 @@ extern bool msan_init_is_running; extern int msan_report_count; bool ProtectRange(uptr beg, uptr end); -bool InitShadow(bool map_shadow, bool init_origins); +bool InitShadow(bool init_origins); char *GetProcSelfMaps(); void InitializeInterceptors(); |