Page MenuHomePhabricator

cfi-icall: Add -fsanitize-cfi-promotion-aliases
AbandonedPublic

Authored by samitolvanen on Oct 28 2021, 3:08 PM.

Details

Summary

Inline assembly refererences to static functions with ThinLTO+CFI were
fixed in D104058 by creating aliases for promoted functions. Creating
the aliases unconditionally resulted in an unexpected size increase in
a Chrome helper binary:

https://bugs.chromium.org/p/chromium/issues/detail?id=1261715

As promotion aliases are only required for very specific use cases,
such as compiling the Linux kernel with CFI, add a command line flag
to allow users to create these aliases only when needed.

Diff Detail

Event Timeline

samitolvanen created this revision.Oct 28 2021, 3:08 PM
samitolvanen requested review of this revision.Oct 28 2021, 3:08 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 28 2021, 3:08 PM
nickdesaulniers accepted this revision.Oct 28 2021, 5:03 PM

please don't forget to run git-clang-format HEAD~. Thanks for the patch, LGTM!

This revision is now accepted and ready to land.Oct 28 2021, 5:03 PM
pcc requested changes to this revision.Oct 28 2021, 5:28 PM

I asked @samitolvanen out-of-band to check whether this really needs a flag since it seems like there could be some underlying issue that needs to be resolved so that we can do this unconditionally.

This revision now requires changes to proceed.Oct 28 2021, 5:28 PM