Page MenuHomePhabricator

[ARM][clang] Option b-key must not affect __ARM_FEATURE_PAC_DEFAULT
ClosedPublic

Authored by stuij on Dec 6 2021, 2:56 AM.

Details

Summary

When using -mbranch-protection=pac-ret+b-key, macro __ARM_FEATURE_PAC_DEFAULT
should still have the value corresponding to a-key, because b-key is only valid
for AArch64.

This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:

https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension

The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:

https://developer.arm.com/documentation/ddi0553/latest

The following people contributed to this patch:

  • Victor Campos

Diff Detail

Event Timeline

stuij created this revision.Dec 6 2021, 2:56 AM
stuij requested review of this revision.Dec 6 2021, 2:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2021, 2:56 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
stuij updated this revision to Diff 392013.Dec 6 2021, 3:28 AM

tickling the commit so the buildbot picks up the dependency

stuij updated this revision to Diff 392021.Dec 6 2021, 4:17 AM

another tickle

I think rejecting\warning the b-key from the command line maybe a more developer friendly way.

stuij added a comment.Dec 7 2021, 9:28 AM

@danielkiss Yes that needs to be addressed, but we are doing that in another patch that will (hopefully) cover all permutations of architecture and branch protection values on both the cmdline and as function attributes.

So this patch is just about not having logic in the ARM code that shouldn't be there.

danielkiss accepted this revision.Dec 7 2021, 10:35 AM

@danielkiss Yes that needs to be addressed, but we are doing that in another patch that will (hopefully) cover all permutations of architecture and branch protection values on both the cmdline and as function attributes.

sound good, Thanks!

LGTM.

This revision is now accepted and ready to land.Dec 7 2021, 10:35 AM
stuij updated this revision to Diff 393096.Dec 9 2021, 3:22 AM

rebasing