Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aadwarf64] Add DWARF support for unwinding with FEAT_PAuth_LR enabled #245

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

pratlucas
Copy link
Contributor

This introduces DWARF support to enable unwinders to authenticate return
addresses signed using FEAT_PAuth_LR, where the value of PC is used as
an extra diversifier.

To achieve that, this proposes the following changes to the aadwarf64
document:

  • Expanding usage of the RA_SIGN_STATE pseudo-register, allocating
    it's bit[1] to indicate wether the value of PC has been used for
    return address signing.
  • Introducing a new vendor call frame instruction,
    DW_CFA_AARCH64_negate_ra_state_with_pc, which negates both bit[0]
    and bit[1] of RA_SIGN_STATE and instructs the unwinder to capture
    the current code location to be used when authenticating the return
    address.

Co-authored-by: Oliver Stannard oliver.stannard@arm.com

This introduces DWARF support to enable unwinders to authenticate return
addresses signed using FEAT_PAuth_LR, where the value of PC is used as
an extra diversifier.

To achieve that, this proposes the following changes to the aadwarf64
document:
* Expanding usage of the `RA_SIGN_STATE` pseudo-register, allocating
  it's bit[1] to indicate wether the value of PC has been used for
  return address signing.
* Introducing a new vendor call frame instruction,
  `DW_CFA_AARCH64_negate_ra_state_with_pc`, which negates both bit[0]
  and bit[1] of `RA_SIGN_STATE` and instructs the unwinder to capture
  the current code location to be used when authenticating the return
  address.

Co-authored-by: Oliver Stannard <oliver.stannard@arm.com>
@pratlucas
Copy link
Contributor Author

aadwarf64/aadwarf64.rst Outdated Show resolved Hide resolved
aadwarf64/aadwarf64.rst Outdated Show resolved Hide resolved
aadwarf64/aadwarf64.rst Show resolved Hide resolved
@stuij stuij merged commit 879df44 into ARM-software:main Mar 7, 2024
1 check passed
Copy link

@sallyarmneale sallyarmneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes required.

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.

5 participants