[PATCH] D63360: hwasan: Use the lower 8 bits of the ring buffer entry address as the base stack tag.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 13:54:46 PDT 2019


eugenis added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1007
+    // The base tag will be a multiple of 8, so we should avoid using tags with
+    // lower bits clear so that we don't end up with a final tag of 0.
+    ++TagOffset;
----------------
We are losing a lot of entropy by allowing these zero bits in the base tag. Single-alloca functions, for example, will only have 32 different tags.

How about using bits 3 .. 11 ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63360/new/

https://reviews.llvm.org/D63360





More information about the llvm-commits mailing list