Skip to content

Conversation

walkerkd
Copy link

The DW_CFA_AARCH64_set_ra_state operation updates the RA_SIGN_STATE pseudo register with the current signing state. If the signing state includes signing is DW_AARCH64_RA_SIGNED_SP_PC, then it also provides the offset to the signing instruction so that the PC value used in the signing can be calculated.

The DW_CFA_AARCH64_negate_ra_state_with_pc operation has been marked as deprecated. This is because it has been found that it is not suitable for describing all cases where the PC was used to sign the return address (see #327)

The contents of the RA_SIGN_STATE pseudo register is also changed from being described in terms of a set of bits to being a series of defined values.

Previously the state of the RA_SIGN_STATE pseudo register was changed implicitly by the DW_CFA_AARCH64_negate_ra_state and DW_CFA_AARCH64_set_ra_state operations. This meant that the actual encoding was actually internal to any implementation.

Now with the introduction of the DW_CFA_AARCH64_set_ra_state operation the encoding has been made externally visible. So the opportunity has been taken now to change the encoding to a simpler form.

The DW_CFA_AARCH64_set_ra_state operation updates the RA_SIGN_STATE
pseudo register with the current signing state. If the signing
state includes signing is DW_AARCH64_RA_SIGNED_SP_PC, then it also
provides the offset to the signing instruction so that the PC value
used in the signing can be calculated.

The DW_CFA_AARCH64_negate_ra_state_with_pc operation has
been marked as deprecated.  This is because it has been
found that it is not suitable for describing all cases
where the PC was used to sign the return address (see
ARM-software#327)

The contents of the RA_SIGN_STATE pseudo register is also changed
from being described in terms of a set of bits to being a series
of defined values.

Previously the state of the RA_SIGN_STATE pseudo register was
changed implicitly by the DW_CFA_AARCH64_negate_ra_state and
DW_CFA_AARCH64_set_ra_state operations. This meant that the actual
encoding was actually internal to any implementation.

Now with the introduction of the DW_CFA_AARCH64_set_ra_state
operation the encoding has been made externally visible.  So the
opportunity has been taken now to change the encoding to a simpler
form.
Comment on lines +251 to +252
| | | - Deprecated |
| | | DW_CFA_AARCH64_negate_ra_state. |

Choose a reason for hiding this comment

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

I believe this should be DW_CFA_AARCH64_negate_ra_state_with_pc.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for spotting that. I'll fix it.

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