android_system_core/libunwindstack/include/unwindstack
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
..
DexFiles.h Revert "Check for data races when reading JIT/DEX entries." 2019-04-05 18:23:32 +00:00
DwarfError.h Add error propagation into Unwinder/Elf objects. 2018-01-24 17:50:46 -08:00
DwarfLocation.h libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
DwarfMemory.h Handle when bias is different in elf headers. 2019-10-08 17:36:06 +00:00
DwarfSection.h libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
DwarfStructs.h Make the library usable as a library. 2017-07-14 12:20:23 -07:00
Elf.h Fix support finding global variables. 2019-12-03 17:35:00 -08:00
ElfInterface.h Fix support finding global variables. 2019-12-03 17:35:00 -08:00
Error.h Fix pc/function name for signal handler frame. 2019-04-12 17:23:18 -07:00
Global.h Fix support finding global variables. 2019-12-03 17:35:00 -08:00
JitDebug.h Revert "Check for data races when reading JIT/DEX entries." 2019-04-05 18:23:32 +00:00
LocalUnwinder.h Add a specialized LocalUnwinder object. 2018-05-23 20:02:30 -07:00
Log.h Make the library usable as a library. 2017-07-14 12:20:23 -07:00
MachineArm.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
MachineArm64.h libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
MachineMips.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
MachineMips64.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
MachineX86.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
MachineX86_64.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
MapInfo.h Properly handle empty map after read-only map. 2020-01-22 18:30:12 -08:00
Maps.h Fix LocalUpdatableMaps 2019-09-16 18:28:38 -07:00
Memory.h Merge "Optimize Memory::ReadString" 2020-04-20 23:35:42 +00:00
Regs.h libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
RegsArm.h Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
RegsArm64.h libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
RegsGetLocal.h Remove mips build. 2020-03-06 22:02:09 -08:00
RegsMips.h Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
RegsMips64.h Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
RegsX86.h Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
RegsX86_64.h Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
UcontextArm.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
UcontextArm64.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
UcontextMips.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
UcontextMips64.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
UcontextX86.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
UcontextX86_64.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
Unwinder.h Move PC-only unwind frame generation to libunwindstack. 2020-03-26 13:39:05 -07:00
UserArm.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
UserArm64.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
UserMips.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
UserMips64.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
UserX86.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
UserX86_64.h Expose per arch headers. 2018-02-08 19:29:08 -08:00