summaryrefslogtreecommitdiff
path: root/lib/esan/esan_shadow.h
AgeCommit message (Collapse)Author
2016-10-06[ESan][MIPS] Adds support for MIPS64Sagar Thakur
With this patch 12 out of 13 tests are passing. Reviewed by zhaoqin. Differential: D23799 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@283435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-08Revert "[ESan][MIPS] Adds support for MIPS64"Qin Zhao
Summary: This reverts commit 62b3eecdbe72af0255f0639b0446087a47efbf48. (D23799) The CL cause 13 ESan test failure on x86_64: Failing Tests (13): EfficiencySanitizer-x86_64 :: TestCases/large-stack-linux.c EfficiencySanitizer-x86_64 :: TestCases/libc-intercept.c EfficiencySanitizer-x86_64 :: TestCases/mmap-shadow-conflict.c EfficiencySanitizer-x86_64 :: TestCases/struct-simple.cpp EfficiencySanitizer-x86_64 :: TestCases/verbose-simple.c EfficiencySanitizer-x86_64 :: TestCases/workingset-early-fault.c EfficiencySanitizer-x86_64 :: TestCases/workingset-memset.cpp EfficiencySanitizer-x86_64 :: TestCases/workingset-midreport.cpp EfficiencySanitizer-x86_64 :: TestCases/workingset-samples.cpp EfficiencySanitizer-x86_64 :: TestCases/workingset-signal-posix.cpp EfficiencySanitizer-x86_64 :: TestCases/workingset-simple.cpp EfficiencySanitizer-x86_64 :: Unit/circular_buffer.cpp EfficiencySanitizer-x86_64 :: Unit/hashtable.cpp Unexpected Failures: 13 Reviewers: bruening, slthakur Subscribers: sdardis, kubabrecka, beanz Differential Revision: https://reviews.llvm.org/D24350 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280954 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-07[ESan][MIPS] Adds support for MIPS64Sagar Thakur
With this patch 10 out of 13 tests are passing. Following is the list of failing tests: struct-simple.cpp workingset-signal-posix.cpp mmap-shadow-conflict.c Reviewed by bruening Differential: D23799 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280795 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28[esan] Add handling of large stack size rlimitsDerek Bruening
Summary: Adds detection of large stack size rlimits (over 1 TB or unlimited), which results in an mmap location that our shadow mapping does not support. We re-exec the application in this situation. Adds a test of this behavior. Adds general detection of mmap regions outside of our app regions. In the future we want to try to adaptively handle these but for now we abort. Moves the existing Linux-specific mmap code into a platform-specific file where the new rlimit code lives. Reviewers: eugenis Subscribers: vitalybuka, zhaoqin, kcc, aizatsky, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D20745 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271079 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[esan] Extend shadow mapping to cover low librariesDerek Bruening
Summary: Adds support for app libraries starting slightly below 0x7f00'00000000 (the mmap ASLR range extends down to 0x7efb'f8000000 for reasonable stack limits) by switching to a shadow mapping offset of 0x1300'00000000. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D20479 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17[esan] Fix isShadowMem endpoint bugDerek Bruening
Fixes a bug in checking the endpoint of a shadow region and removes an invalid check (both introduced in http://reviews.llvm.org/rL269198). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269834 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11[esan] EfficiencySanitizer shadow memoryDerek Bruening
Summary: Adds shadow memory mapping support common to all tools to the new Efficiencysanitizer ("esan") family of tools. This includes: + Shadow memory layout and mapping support for 64-bit Linux for any power-of-2 scale-down (1x, 2x, 4x, 8x, 16x, etc.) that ensures that shadow(shadow(address)) does not overlap shadow or application memory. + Mmap interception to ensure the application does not map on top of our shadow memory. + Init-time sanity checks for shadow regions. + A test of the mmap conflict mechanism. Reviewers: aizatsky, filcab Subscribers: filcab, kubabrecka, llvm-commits, vitalybuka, eugenis, kcc, zhaoqin Differential Revision: http://reviews.llvm.org/D19921 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269198 91177308-0d34-0410-b5e6-96231b3b80d8