[PATCH] D102901: [HWASan] Add basic stack tagging support for LAM.

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 13:17:54 PDT 2021


vitalybuka accepted this revision.
vitalybuka added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:503
+  // planned for globals as well.
+  bool IsX86 = TargetTriple.getArch() == Triple::x86_64;
+  UsePageAliases = ClUsePageAliases && IsX86;
----------------
As is it's not technically correct


================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:519
 
+  if (IsX86) {
+    PointerTagShift = 57;
----------------
maybe move up and combine with other IsX86 checks about


================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:964
   // https://github.com/google/sanitizers/blob/master/hwaddress-sanitizer/sort_masks.py
   static unsigned FastMasks[] = {0,  128, 64,  192, 32,  96,  224, 112, 240,
                                  48, 16,  120, 248, 56,  24,  8,   124, 252,
----------------
const


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102901



More information about the llvm-commits mailing list