The requirement for PIE of hwasan was introduced in https://reviews.llvm.org/D44745, this patch removes requirement for PIE.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Under my test on aarch64 linux, all hwasan tests passed without PIE.
IIUC, only global variables in hwasan are affected by PIE.
Without PIE, a special instruction sequence assembly will be to emitted to add the tag to the global variable address, see https://reviews.llvm.org/D120305 .
I'm not sure if hwasan linux x86-64 is different from linux aarch64 and have a special requirment for PIE.
Also note that since https://reviews.llvm.org/D120305, CLANG_DEFAULT_PIE_ON_LINUX was default on.
Comment Actions
Sorry, I do not remember why this requirement is there. Must be related to shadow / allocator placement and kernel mapping conflicts, but hwasan is using dynamic shadow so that should not be an issue... LGTM as long as it works.