[PATCH] D37082: [sanitizer] Re-introduce kUseSeparateSizeClassForBatch for the 32-bit Primary

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 15:30:55 PDT 2017


cryptoad created this revision.
Herald added a subscriber: kubamracek.

Currently `TransferBatch` are located within the same memory regions as
"regular" chunks. This is not ideal for security: they make for an interesting
target to overwrite, and are not protected by the frontend (namely, Scudo).

To solve this, we re-introduce `kUseSeparateSizeClassForBatch` for the 32-bit
Primary allowing for `TransferBatch` to end up in their own memory region.
Currently only Scudo would use this new feature, the default behavior remains
unchanged. The separate `kBatchClassID` was used for a brief period of time
previously but removed when the 64-bit ended up using the "free array".


https://reviews.llvm.org/D37082

Files:
  lib/sanitizer_common/sanitizer_allocator_local_cache.h
  lib/sanitizer_common/sanitizer_allocator_primary32.h
  lib/sanitizer_common/sanitizer_allocator_size_class_map.h
  lib/sanitizer_common/tests/sanitizer_allocator_test.cc
  lib/scudo/scudo_allocator.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37082.112466.patch
Type: text/x-patch
Size: 14238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170823/92f6ef45/attachment.bin>


More information about the llvm-commits mailing list