platform_system_core/libunwindstack/tools
Tamas Petz 6835d019b2 libunwindstack: support for Armv8.3-A Pointer Authentication
This patch adds support for handling return addresses signed with
pointer authentication. It simply strips the authentication code
without verifying its correctness, and thus works with both A and B
keys and through key-change boundaries.

Additons:
  * DW_CFA_AARCH64_negate_ra_state: new CFA operation.
  * RA_SIGN_STATE: new pseudo register.
  * Pass the arch to DwarfCfa so that the new op is only executed
    on aarch64.

The stripping uses the xpaclri instruction. This is a hint space
instruction which is compatible with pre Armv8.3-A devices. For cases
where it cannot be used, a mask can be set instead.

Test: libunwindstack_test
      Without this patch all UnwindTest.* testcases should fail if
      compiled with Pointer Authentication.

The tests should be executed with both -mbranch-protection=pac-ret and
pac-ret+leaf flags so that either some or all functions have pointer
authentication instructions.

Change-Id: Id7c3f1d0e2fc7fccb19bd1430826264405a9df7c
2020-07-14 13:31:59 -07:00
..
unwind.cpp Revert "Check for data races when reading JIT/DEX entries." 2019-04-05 18:23:32 +00:00
unwind_for_offline.cpp Fix handling of PT_GNU_EH_FRAME. 2019-10-21 19:11:22 -07:00
unwind_info.cpp libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
unwind_reg_info.cpp libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
unwind_symbols.cpp Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00