This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Add option for ROP Protection
ClosedPublic

Authored by stefanp on Feb 11 2021, 7:49 AM.

Details

Summary

Added -mrop-protection for Power PC to turn on codegen that provides some
protection from ROP attacks.

The option is off by default and can be turned on for Power 8, Power 9 and
Power 10.

This patch is for the option only. The feature will be implemented by a later
patch.

Diff Detail

Event Timeline

stefanp created this revision.Feb 11 2021, 7:49 AM
stefanp requested review of this revision.Feb 11 2021, 7:49 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 11 2021, 7:49 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
stefanp added reviewers: NeHuang, bsaleil, amyk, saghir, Restricted Project.Feb 11 2021, 7:50 AM
amyk accepted this revision as: amyk.Feb 16 2021, 1:38 PM

I just have a small question about the patch but overall I think this LGTM.

llvm/lib/Target/PowerPC/PPC.td
317

Does FeatureROPProtection need to be here and in the P9/P10 features?

This revision is now accepted and ready to land.Feb 16 2021, 1:38 PM
stefanp updated this revision to Diff 324408.Feb 17 2021, 1:15 PM

Added missing FeatureROPProtection to P8AdditionalFeatures.

The P9 and P10 features list will inherit from the P8 list.

This revision was landed with ongoing or failed builds.Feb 18 2021, 4:21 AM
This revision was automatically updated to reflect the committed changes.