[PATCH] D13818: [compiler-rt] [msan] Unify aarch64 mapping

Adhemerval Zanella via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 13:24:47 PDT 2015


zatrazz updated this revision to Diff 38256.
zatrazz added a comment.

This is an updated patch that used a different mapping regions and a different transformation (using XOR to clear the bits 38/37). The new mapping is:

- 39-bits adn 42-bits mapping 0x00000000000ULL-0x01000000000ULL  MappingDesc::INVALID 0x01000000000ULL-0x02000000000ULL  MappingDesc::SHADOW 0x02000000000ULL-0x03000000000ULL  MappingDesc::ORIGIN 0x03000000000ULL-0x03500000000ULL  MappingDesc::INVALID 0x03500000000ULL-0x03600000000ULL  MappingDesc::SHADOW 0x03600000000ULL-0x04500000000ULL  MappingDesc::INVALID 0x04500000000ULL-0x04600000000ULL  MappingDesc::ORIGIN 0x04600000000ULL-0x05500000000ULL  MappingDesc::INVALID 0x05500000000ULL-0x05600000000ULL  MappingDesc::APP 0x05600000000ULL-0x07000000000ULL  MappingDesc::INVALID 0x07000000000ULL-0x08000000000ULL  MappingDesc::APP
- 42-bit mapping 0x08000000000ULL-0x09000000000ULL  MappingDesc::INVALID 0x09000000000ULL-0x0A000000000ULL  MappingDesc::SHADOW 0x0A000000000ULL-0x0B000000000ULL  MappingDesc::ORIGIN 0x0B000000000ULL-0x0F000000000ULL  MappingDesc::INVALID 0x0F000000000ULL-0x10000000000ULL  MappingDesc::APP 0x10000000000ULL-0x11000000000ULL  MappingDesc::INVALID 0x11000000000ULL-0x12000000000ULL  MappingDesc::APP 0x12000000000ULL-0x17000000000ULL  MappingDesc::INVALID 0x17000000000ULL-0x18000000000ULL  MappingDesc::SHADOW 0x18000000000ULL-0x19000000000ULL  MappingDesc::ORIGIN 0x19000000000ULL-0x20000000000ULL  MappingDesc::INVALID 0x20000000000ULL-0x21000000000ULL  MappingDesc::APP 0x21000000000ULL-0x26000000000ULL  MappingDesc::INVALID 0x26000000000ULL-0x27000000000ULL  MappingDesc::SHADOW 0x27000000000ULL-0x28000000000ULL  MappingDesc::ORIGIN 0x28000000000ULL-0x29000000000ULL  MappingDesc::SHADOW 0x29000000000ULL-0x2A000000000ULL  MappingDesc::ORIGIN 0x2A000000000ULL-0x2AC00000000ULL  MappingDesc::APP 0x2AC00000000ULL-0x2C000000000ULL  MappingDesc::INVALID 0x2C000000000ULL-0x2CC00000000ULL  MappingDesc::SHADOW 0x2CC00000000ULL-0x2D000000000ULL  MappingDesc::INVALID 0x2D000000000ULL-0x2DC00000000ULL  MappingDesc::ORIGIN 0x2DC00000000ULL-0x2E000000000ULL  MappingDesc::INVALID 0x2E000000000ULL-0x2F000000000ULL  MappingDesc::APP 0x2F000000000ULL-0x39000000000ULL  MappingDesc::INVALID 0x39000000000ULL-0x3A000000000ULL  MappingDesc::SHADOW 0x3A000000000ULL-0x3B000000000ULL  MappingDesc::ORIGIN 0x3B000000000ULL-0x3C000000000ULL  MappingDesc::APP 0x3C000000000ULL-0x3D000000000ULL  MappingDesc::INVALID 0x3D000000000ULL-0x3E000000000ULL  MappingDesc::SHADOW 0x3E000000000ULL-0x3F000000000ULL  MappingDesc::ORIGIN 0x3F000000000ULL-0x40000000000ULL  MappingDesc::APP

Although it creates a lot of segments, it allows to use only one function transformation for both 39 and 42-bits VMA.  It also allows a high percentage of total VMA avaliable for normal allocations (13.28% for 39-bits and 12.21% for 42-bits). It also uses a faster transformation.

I also updated the LLVM patch to change the instrumentation [1]. No regression found on aarch64 39/42-bit and the new transformation also fixed a XFAIL test (chained_origin_limits).

[1] http://reviews.llvm.org/D13817


http://reviews.llvm.org/D13818

Files:
  lib/msan/msan.cc
  lib/msan/msan.h
  lib/msan/msan_linux.cc
  test/msan/chained_origin_limits.cc
  test/msan/mmap.cc
  test/msan/strlen_of_shadow.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13818.38256.patch
Type: text/x-patch
Size: 10207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151023/685b94ce/attachment.bin>


More information about the llvm-commits mailing list