[PATCH] D46456: [asan] Add support for Myriad RTEMS memory map
Walter Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 4 13:45:44 PDT 2018
waltl created this revision.
waltl added reviewers: vitalybuka, eugenis, alekseyshl.
Herald added a subscriber: kubamracek.
The Myriad RTEMS memory system has a few unique aspects that
require support in the ASan run-time.
- A limited amount of memory (currently 512M).
- No virtual memory, no memory protection.
- DRAM starts at address 0x80000000. Other parts of memory may be used for MMIO, etc.
- The second highest address bit is the "cache" bit, and 0x80000000 and 0x84000000 alias to the same memory.
To support the above, we make the following changes:
- Use a ShadowScale of 5, to reduce shadow memory overhead.
- Adjust some existing macros to remove assumption that the lowest memory address is 0.
- add a RawAddr macro that on Myriad strips the cache bit from the input address, before using the address for shadow memory (for other archs this does nothing).
- We must check that an address is in DRAM range before using it to index into shadow memory.
Repository:
rL LLVM
https://reviews.llvm.org/D46456
Files:
compiler-rt/lib/asan/asan_mapping.h
compiler-rt/lib/asan/asan_poisoning.cc
compiler-rt/lib/asan/asan_rtl.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46456.145273.patch
Type: text/x-patch
Size: 9138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180504/7136ad26/attachment.bin>
More information about the llvm-commits
mailing list