diff options
author | Tamas Petz <tamas.petz@arm.com> | 2020-01-22 14:22:41 +0100 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2020-07-14 13:31:59 -0700 |
commit | 96787c940a90fa569b8cc966c0ca655f0c26e31c (patch) | |
tree | 0bf9156368e327f6188b8fc4cce2dae01e0d2d1f /libunwindstack/include/unwindstack/DwarfLocation.h | |
parent | 7c796e07afde10388224933b647af7b951c255c1 (diff) | |
download | unwinding-96787c940a90fa569b8cc966c0ca655f0c26e31c.tar.gz |
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
Diffstat (limited to 'libunwindstack/include/unwindstack/DwarfLocation.h')
-rw-r--r-- | libunwindstack/include/unwindstack/DwarfLocation.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libunwindstack/include/unwindstack/DwarfLocation.h b/libunwindstack/include/unwindstack/DwarfLocation.h index 3d50ccf..bf45bc7 100644 --- a/libunwindstack/include/unwindstack/DwarfLocation.h +++ b/libunwindstack/include/unwindstack/DwarfLocation.h @@ -33,6 +33,7 @@ enum DwarfLocationEnum : uint8_t { DWARF_LOCATION_REGISTER, DWARF_LOCATION_EXPRESSION, DWARF_LOCATION_VAL_EXPRESSION, + DWARF_LOCATION_PSEUDO_REGISTER, }; struct DwarfLocation { |