This is an archive of the discontinued LLVM Phabricator instance.

[HWASan] Use new IR attribute for communicating unsanitized globals.
ClosedPublic

Authored by hctim on Jun 10 2022, 2:51 PM.

Details

Summary

Globals that shouldn't be sanitized are currently communicated to HWASan
through the use of the llvm.asan.globals IR metadata. Now that we have
an on-GV attribute, use it.

Diff Detail

Event Timeline

hctim created this revision.Jun 10 2022, 2:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2022, 2:51 PM
hctim requested review of this revision.Jun 10 2022, 2:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2022, 2:51 PM

FYI - if you want to check that the attribute is being emitted correctly for sanitizer ignorelists, one uses the test in the parent patch: https://reviews.llvm.org/D126929#change-pnXipICIxofc

If you want to check that the attribute is being emitted correctly for __attribute__((no_sanitize('hwaddress'))), you'll have to check the child patch, as that's not currently possible :).

hctim added a comment.Jun 15 2022, 2:58 PM

(friendly ping @pcc)

pcc accepted this revision.Jun 23 2022, 5:36 PM

LGTM

This revision is now accepted and ready to land.Jun 23 2022, 5:36 PM
This revision was landed with ongoing or failed builds.Jun 24 2022, 12:04 PM
This revision was automatically updated to reflect the committed changes.