[PATCH] D102472: [HWASAN] Update the tag info for X86_64
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 24 10:53:02 PDT 2021
morehouse added a comment.
In D102472#2772657 <https://reviews.llvm.org/D102472#2772657>, @xiangzhangllvm wrote:
> 2 In fact, We can divide it into two steps, Step 1 is "Tag correctness checking", Step 2 is "Hardware supporting point with tag".
>
> The option "ClUntagPointer" can help us first testing the Step 1.
> For example: we write 7 in to int *p, for HWASAN, we do 2 things:
> Step1: Checking tag of p :
> call void @__hwasan_store4 (p_tagged) // Checking tag is correct or not
> Step2: Write 7 into mem:
> *p_tagged = 7 // Need Hardware supporting. But if we use "ClUntagPointer" change "*p_tagged = 7" --> "*p = 7", we can run the program, and test Step 1 for HWASAN.
>
> For HWASAN, Most code in compiler and compiler-rt is doing work for Step 1. So we can use "ClUntagPointer" first test it.
> After we make sure Step 1 is OK, when the Hardware/OS is ready, we just need to totally/really enable HWASAN by just, I think, updating the system call in InitPrctl.
I recently removed a bunch of untagging stuff from our tests, and I'd like to avoid adding it back. This is why I'm working on a buildbot to run tests in QEMU with LAM enabled.
I've also been testing locally with LAM in QEMU.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102472/new/
https://reviews.llvm.org/D102472
More information about the llvm-commits
mailing list