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

unwind info: Implement opcode for return addres signing #2193

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

javierhonduco
Copy link
Contributor

@javierhonduco javierhonduco commented Oct 31, 2023

In arm64, DW_CFA_AARCH64_negate_ra_state which shares the same value as DW_CFA_GNU_window_save in SPARC, is used to indicate a signed return address.

Note that we just implement the opcode handling, the unwinder remains unchanged.

Fixes #2181

Test Plan

Added regression test

[javierhonduco@fedora parca-agent]$ readelf --debug-dump=frames pkg/stack/unwind/testdata/cfa_gnu_window_save | grep -i aarch
  DW_CFA_AARCH64_negate_ra_state
  DW_CFA_AARCH64_negate_ra_state

In arm64, `DW_CFA_AARCH64_negate_ra_state` which shares the same value
as `DW_CFA_GNU_window_save` in SPARC, is used to indicate a signed
return address.

Note that we just implement the opcode handling, the unwinder remains
unchanged.

Test Plan
=========

Added regression test

Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
@javierhonduco javierhonduco requested a review from a team as a code owner October 31, 2023 13:30
@brancz brancz merged commit 668f393 into main Oct 31, 2023
22 checks passed
@kakkoyun kakkoyun deleted the implement-return-address-signing-cfa-opcode branch October 31, 2023 16:27
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.

Add DWARF CFA opcode 0x2d
2 participants