Skip to content

Conversation

@rossburton
Copy link
Contributor

@rossburton rossburton commented Dec 18, 2025

Background: PAC and BTI are branch and pointer authentication technologies for aarch64:

https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/enabling-pac-and-bti-on-aarch64

For PAC/BTI to be used at runtime, all of the ELF segments loaded need to confirm that they're compatible. If given the right options both GCC and Clang automatically generate code that is compatible and add the annotations.

However, if data files are built into binary objects with tools/gen* using assembler, then these tags are not present and all of ICU cannot use branch protection or pointer authentication.

As the generated assembler is literally only data, we can just add the tags. This is similar to how Intel CET is enabled in the same file.

Checklist

  • Required: Issue filed: ICU-23269
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable
  • Approver: Feel free to merge on my behalf

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • icu4c/source/tools/toolutil/aarch64.h is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@markusicu markusicu self-assigned this Dec 18, 2025
Background: PAC and BTI are branch and pointer authentication technologies
for aarch64:

https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/enabling-pac-and-bti-on-aarch64

For PAC/BTI to be used at runtime, all of the ELF segments loaded need
to confirm that they're compatible.  If given the right options both GCC
and Clang automatically generate code that is compatible and add the
annotations.

However, if data files are built into binary objects with tools/gen*
using assembler, then these tags are not present and all of ICU cannot
use branch protection or pointer authentication.

As the generated assembler is literally only data, we can just add the
tags. This is similar to how Intel CET is enabled in the same file.
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • icu4c/source/tools/toolutil/aarch64.h is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants