[PATCH] D103841: [llvm][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature
Leonard Chan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 8 12:20:10 PDT 2021
leonardchan added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1050
+
+ if (!WithFrameRecord && ShadowBase)
return;
----------------
eugenis wrote:
> I think this will break Linux kernel build.
> They use -fsanitize=kernel-hwaddress with one of
> ```
> -hwasan-instrument-with-calls=1
> ```
> or
> ```
> -hwasan-mapping-offset=
> ```
> The assumption here is that InTls == 0 means there is no thread slot, and therefore no frame recording.
>
Perhaps we could set the default value of `-hwasan-record-stack-history` to false so users who don't expect frame recording don't suddenly see TLS being used? It would mean people who do use frame recording won't see it anymore and will need to manually add `-hwasan-record-stack-history=1`, but maybe that won't break existing users.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103841/new/
https://reviews.llvm.org/D103841
More information about the llvm-commits
mailing list