[PATCH] D132995: [RISC-V][HWASAN] Support tagging global variables for RISC-V HWASAN
Alexey Baturo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 26 13:12:36 PDT 2022
smd added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp:400-402
+ // In case of HWASAN being used ang tagging global variables enabled
+ // they should be accessed via GOT, since tagged address of global
+ // could not fit existing code models. This also applies for no-pic mode.
----------------
luismarques wrote:
> Nit: (spellchecking only)
> ```
> // When HWASAN is used and tagging of global variables is enabled
> // they should be accessed via the GOT, since the tagged address of a global
> // is incompatible with existing code models. This also applies to non-pic mode.
> ```
>
> See my broader patch review comment about the semantics.
fixed, thanks
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:3859-3861
+ // In case of HWASAN being used ang tagging global variables enabled
+ // they should be accessed via GOT, since tagged address of global
+ // could not fit existing code models. This also applies for no-pic mode.
----------------
luismarques wrote:
> Ditto.
fixed, thanks
================
Comment at: llvm/test/CodeGen/RISCV/tagged-globals.ll:8-9
+
+ at global = external global i32
+ at globalint = internal global i32 0
+declare void @func()
----------------
luismarques wrote:
> luismarques wrote:
> > Nit: `globalint` makes it sound it's an `integer`, can you tweak that somehow?
>
fixed, thanks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132995/new/
https://reviews.llvm.org/D132995
More information about the llvm-commits
mailing list