This is an archive of the discontinued LLVM Phabricator instance.

[HWASan] Use memory addresses in tag dump, not shadow.
Needs ReviewPublic

Authored by hctim on Apr 19 2021, 12:13 PM.

Details

Reviewers
eugenis
Summary

EOM.

Diff Detail

Event Timeline

hctim requested review of this revision.Apr 19 2021, 12:13 PM
hctim created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2021, 12:13 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript

could you also update the test to check that the invalid access address from the report header matches one of the tag dump addresses?

hctim updated this revision to Diff 339830.Apr 22 2021, 5:47 PM

Add test. Depends on D10112.

hctim updated this revision to Diff 339831.Apr 22 2021, 5:50 PM
  • Remove dependency.
hctim updated this revision to Diff 339832.Apr 22 2021, 5:52 PM
  • Remove dependency.
Harbormaster completed remote builds in B100416: Diff 339830.
Harbormaster completed remote builds in B100418: Diff 339832.

why is this necessary? there should be a memory address in the report header I think

hctim added a comment.Apr 23 2021, 1:02 PM

why is this necessary? there should be a memory address in the report header I think

Yes, but IMO it makes a lot more sense for the shadow dump to be noted with the memory address, not the shadow address. I know that this actually confused me when interpreting a HWASan report, and it makes it more inline with what's possible with MTE.

I meant why __hwasan_tag_pointer is necessary, can't you match the address in the report header?
But I don't really care that much, LGTM if this is easier for any reason.