[PATCH] D132994: [RISC-V][HWASAN] Don't explicitly load GOT entry to call hwasan mismatch routine

Alexey Baturo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 05:33:20 PST 2022


smd added a comment.

In D132994#3943554 <https://reviews.llvm.org/D132994#3943554>, @luismarques wrote:

> In D132994#3927328 <https://reviews.llvm.org/D132994#3927328>, @smd wrote:
>
>> I think one of possible solutions for the problem mentioned above might be the following:
>>
>> - mark __hwasan_tag_mismatch_v2 as .variant_cc directly in asm file
>> - add support for reading/dumping .variant_cc as emitDirectiveVariantPCS does
>> - remove setting ELF::STO_RISCV_VARIANT_CC for  __hwasan_tag_mismatch_v2 in RISCVAsmPrinter.cpp
>>
>> Supposedly (2) should be implemented/committed as a separate patch before this one. It looks like it's being done as part of https://reviews.llvm.org/D103435
>> I might have my own patch for .variant_cc support. Does it make sense to publish it for the review, since the D103435 <https://reviews.llvm.org/D103435> has been sitting there for over a year?
>>
>> @jrtc27 @luismarques  what do you think of that?
>
> It looks like it D103435 <https://reviews.llvm.org/D103435> has started picking up activity again. You can always publish your patch with a description that references D103435 <https://reviews.llvm.org/D103435>, and possibly point out the ways in which the patches are different. For instance, sometimes if it's just a subset of another patch that can help that subset be merged earlier, without being blocked on other issues. In any case, perhaps now D103435 <https://reviews.llvm.org/D103435> will move faster.
>
> I suggest rebasing this patch on an implementation of (2), either D103435 <https://reviews.llvm.org/D103435> or your alternative, as that seems like the proper solution. If those patches were to continue being blocked for a while I don't have a problem with (1), but I imagine other people might disagree.

Hi Luis,

I think all 3 of those steps might be necessary: it's impossible to do (1) without having changes from (2).
And (3) could be done after having (1) done. I doubt anyone else would use **__hwasan_tag_mismatch_v2** except for this particular case, so marking it with .variant_cc might not hurt.

Other possible solution I see is to push this patch as is and later fix the issues you've raised after .variant_cc patch is commited.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132994



More information about the llvm-commits mailing list