[PATCH] D119367: [HWASan] Allow no_sanitize(..) and change metadata passing.
Mitch Phillips via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 9 12:41:18 PST 2022
hctim created this revision.
hctim added a reviewer: eugenis.
Herald added subscribers: dexonsmith, hiraditya.
Herald added a reviewer: aaron.ballman.
hctim requested review of this revision.
Herald added projects: clang, Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers, cfe-commits.
Currently HWASan uses the no_sanitize shared with llvm.asan.globals to
disable hwasanification. The llvm.asan.globals list contains a whole
bunch of fluff (location, name, dynamically-initialized, excluded) in
order for dynamic initialization in ASan. We don't do that in HWASan,
globals have a static tag that's embedded in the file.
Right now, it's not possible for no_sanitize("hwaddress") to be slapped
on a global. Add this feature.
In addition, add the metadata to the global variable itself, as to
whether sanitization is disabled. Passes like GlobalOpt can replace the
existing global, and only copies the metadata for the GlobalVariable
itself, without replacing the GV pointers in llvm.asan.globals. This can
cause bugs, where no_sanitize("hwaddress") (and "address" as well, but
that's left for another time) ends up getting ignored if the global is
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12675 bytes
Desc: not available
More information about the cfe-commits