[PATCH] D45840: [HWASan] Introduce non-zero based and dynamic shadow memory (LLVM).

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 19 15:13:52 PDT 2018


alekseyshl created this revision.
alekseyshl added a reviewer: eugenis.
Herald added a subscriber: srhines.

Support the dynamic shadow memory offset (the default case for user
space now) and static non-zero shadow memory offset
(-hwasan-mapping-offset option). Keeping the the latter case around
for functionality and performance comparison tests (and mostly for
-hwasan-mapping-offset=0 case).

The implementation is stripped down ASan one, picking only the relevant
parts in the following assumptions: shadow scale is fixed, the shadow
memory is dynamic, it is accessed via ifunc global, shadow memory address
rematerialization is suppressed.

Keep zero-based shadow memory for kernel (-hwasan-kernel option) and
calls instreumented case (-hwasan-instrument-with-calls option), which
essentially means that the generated code is not changed in these cases.


Repository:
  rL LLVM

https://reviews.llvm.org/D45840

Files:
  lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
  test/Instrumentation/HWAddressSanitizer/alloca.ll
  test/Instrumentation/HWAddressSanitizer/basic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45840.143172.patch
Type: text/x-patch
Size: 21159 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180419/c6441b6b/attachment.bin>


More information about the llvm-commits mailing list