This is an archive of the discontinued LLVM Phabricator instance.

hwasan: Read shadow address from ifunc if we don't need a frame record.
ClosedPublic

Authored by pcc on Jan 22 2019, 10:10 PM.

Details

Summary

This saves a cbz+cold call in the interceptor ABI, as well as a realign
in both ABIs, trading off a dcache entry against some branch predictor
entries and some code size.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Jan 22 2019, 10:10 PM
pcc updated this revision to Diff 183166.Jan 23 2019, 1:31 PM
pcc edited the summary of this revision. (Show Details)

Do this in the platform ABI as well

pcc updated this revision to Diff 183176.Jan 23 2019, 2:21 PM
  • Make it possible to disable ifunc with a flag
eugenis added inline comments.Jan 23 2019, 2:23 PM
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
165 ↗(On Diff #183176)

Ifunc is known to be broken in static binaries on android.
This needs to be false by default.

pcc updated this revision to Diff 183178.Jan 23 2019, 2:30 PM
  • default to false
pcc updated this revision to Diff 183179.Jan 23 2019, 2:32 PM
  • Update tests
pcc updated this revision to Diff 183181.Jan 23 2019, 2:33 PM

Use correct base

Harbormaster completed remote builds in B27218: Diff 183181.
pcc marked 2 inline comments as done.Jan 23 2019, 2:34 PM
pcc added inline comments.
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
165 ↗(On Diff #183176)

Done. I guess we can use API level to default this at some point.

eugenis accepted this revision.Jan 23 2019, 2:34 PM

LGTM

This revision is now accepted and ready to land.Jan 23 2019, 2:34 PM
This revision was automatically updated to reflect the committed changes.
pcc marked an inline comment as done.