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

Add initial arm64 support #142

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Add initial arm64 support #142

merged 1 commit into from
Jan 22, 2025

Conversation

javierhonduco
Copy link
Owner

This commit adds support for the arm64 (aarch64) architecture. This is achived by adapting the compact unwind information generation to deal with the DWARF registers that this architecture maps to and by modifying the unwinder.

These changes support PAC (Pointer Authentication Code), see test plan for more details.

While working on this feature I realised that the vDSO included in Ubuntu 24.10 (6.11.0-12-generic) does not contain unwind information. In the future we should synthetise it which should be easy enough as it seems to be compiled with frame pointers.

Test Plan

Ran tests locally on the arm64 machine mentioned above, and the PAC-enabled binary (see tests/testprogs/). The tests will also be run for this arch.

2025-01-22T12:59:32.726079Z  INFO lightswitch::profiler: unwinder stats: unwinder_stats_t { total: 44, success_dwarf: 44, error_truncated: 0, error_unsupported_expression: 0, error_unsupported_frame_pointer_action: 0, error_unsupported_cfa_register: 0, error_previous_rsp_zero: 0, error_previous_rip_zero: 0, error_previous_rbp_zero: 0, error_should_never_happen: 0, error_mapping_not_found: 0, error_mapping_does_not_contain_pc: 0, error_chunk_not_found: 0, error_binary_search_exhausted_iterations: 0, error_sending_new_process_event: 0, error_cfa_offset_did_not_fit: 0, error_rbp_offset_did_not_fit: 0, bp_non_zero_for_bottom_frame: 0, vdso_encountered: 0, jit_encountered: 0 }

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
This commit adds support for the arm64 (aarch64) architecture. This is
achived by adapting the compact unwind information generation to deal
with the DWARF registers that this architecture maps to and by modifying
the unwinder.

These changes support PAC (Pointer Authentication Code), see test plan
for more details.

While working on this feature I realised that the vDSO included in
Ubuntu 24.10 (6.11.0-12-generic) does not contain unwind information. In
the future we should synthetise it which should be easy enough as it
seems to be compiled with frame pointers.

Test Plan
=========

Ran tests locally on the arm64 machine mentioned above, and the
PAC-enabled binary (see tests/testprogs/). The tests will also be run
for this arch.

```
2025-01-22T12:59:32.726079Z  INFO lightswitch::profiler: unwinder stats: unwinder_stats_t { total: 44, success_dwarf: 44, error_truncated: 0, error_unsupported_expression: 0, error_unsupported_frame_pointer_action: 0, error_unsupported_cfa_register: 0, error_previous_rsp_zero: 0, error_previous_rip_zero: 0, error_previous_rbp_zero: 0, error_should_never_happen: 0, error_mapping_not_found: 0, error_mapping_does_not_contain_pc: 0, error_chunk_not_found: 0, error_binary_search_exhausted_iterations: 0, error_sending_new_process_event: 0, error_cfa_offset_did_not_fit: 0, error_rbp_offset_did_not_fit: 0, bp_non_zero_for_bottom_frame: 0, vdso_encountered: 0, jit_encountered: 0 }
```
@javierhonduco javierhonduco merged commit f5c36ed into main Jan 22, 2025
5 checks passed
@javierhonduco javierhonduco deleted the arm64 branch January 22, 2025 14:52
@javierhonduco javierhonduco mentioned this pull request Jan 22, 2025
16 tasks
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.

None yet

1 participant