[PATCH] D102901: [HWASAN] Update pointer tag for X86_64

Xiang Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 25 00:26:39 PDT 2021


xiangzhangllvm added a comment.

Hello @morehouse, thanks very much for your careful review, I'll fix all your comments, just for "ClUntagPointer", I feel it very useful in my develop.



================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:190
+                                    cl::desc("untag mem operate"), cl::Hidden,
+                                    cl::init(false));
+
----------------
morehouse wrote:
> Can we avoid creating `ClUntagPointer` for now?  I am able to test locally with QEMU, and I'm also setting up a buildbot to ensure new patches don't break the LAM functionality.
Yes, of course, we can. But here ClUntagPointer is disabled in default (false), no affect our current tests.
I and back this option, because I find It is very helpful for me in developing HWASAN without hardware or simulator supported. I can run most simple test on my local machine.


================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1018
+
+  StackTag = retagTargetTag(IRB, StackTag);
+
----------------
morehouse wrote:
> This mask of the base tag seems unnecessary since we also mask the final tag.
make sense, it seem will handle at retagTargetTag fucntion.


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

https://reviews.llvm.org/D102901



More information about the llvm-commits mailing list