Page MenuHomePhabricator

[NewPM] Port HWASan and Kernel HWASan

Authored by leonardchan on May 8 2019, 5:46 PM.



Port hardware assisted address sanitizer to new PM following the same guidelines as msan and tsan.


  • Separate HWAddressSanitizer into a pass class and a sanitizer class.
  • Create new PM wrapper pass for the sanitizer class.
  • Use the getOrINsert pattern for some module level initialization declarations.
  • Also enable kernel-kwasan in new PM
  • Update llvm tests and add clang test.

Diff Detail

rC Clang

Event Timeline

leonardchan created this revision.May 8 2019, 5:46 PM
phosek added inline comments.May 8 2019, 11:23 PM
956 ↗(On Diff #198748)

Can you also add KernelHWAddress (akin to D61664).

238 ↗(On Diff #198748)

ditto here for KHWASan

leonardchan marked 2 inline comments as done.
leonardchan retitled this revision from [NewPM] Port HWASan to [NewPM] Port HWASan and Kernel HWASan.
leonardchan edited the summary of this revision. (Show Details)
philip.pfaffe accepted this revision.EditedMay 10 2019, 12:19 PM

Nit aside, looks good!

179 ↗(On Diff #198748)

There are some naming clashes here. In the other sanitizers these functions are called sanitizeFunction and initializeModule.

This revision is now accepted and ready to land.May 10 2019, 12:19 PM
This revision was automatically updated to reflect the committed changes.
leonardchan marked 2 inline comments as done.
leonardchan added inline comments.May 14 2019, 2:15 PM
179 ↗(On Diff #198748)