platform_system_core/libunwindstack
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
..
benchmarks Add new reparse benchmarks. 2020-05-19 10:31:53 -07:00
include/unwindstack libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
tests libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
tools libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
.clang-format Use the 2 space clang format for libunwindstack. 2017-03-21 10:41:45 -07:00
Android.bp Added fuzzer for Unwinder 2020-07-01 16:02:29 -07:00
AndroidVersions.md Add document of changes between Android versions. 2019-10-15 18:33:11 -07:00
ArmExidx.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ArmExidx.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
AsmGetRegsX86.S Fix wrong mov instruction size. 2018-01-25 11:44:19 -08:00
AsmGetRegsX86_64.S Add full support for initing registers. 2017-07-11 12:15:54 -07:00
Check.h Add error propagation into Unwinder/Elf objects. 2018-01-24 17:50:46 -08:00
DexFile.cpp Avoid re-mapping dex file that's in local memory. 2020-04-07 18:07:38 -07:00
DexFile.h Avoid re-mapping dex file that's in local memory. 2020-04-07 18:07:38 -07:00
DexFiles.cpp Move the dexfile support to implementation. 2019-11-20 14:59:55 -08:00
DwarfCfa.cpp libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
DwarfCfa.h libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
DwarfDebugFrame.h Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
DwarfEhFrame.h Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
DwarfEhFrameWithHdr.cpp Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
DwarfEhFrameWithHdr.h Fix potential bad info in eh_frame_hdr. 2019-10-29 18:39:30 -07:00
DwarfEncoding.h Make the library usable as a library. 2017-07-14 12:20:23 -07:00
DwarfMemory.cpp Handle when bias is different in elf headers. 2019-10-08 17:36:06 +00:00
DwarfOp.cpp libunwindstack: Move DwarfOp callback table to rodata section 2019-01-24 11:11:15 -08:00
DwarfOp.h libunwindstack: Move DwarfOp callback table to rodata section 2019-01-24 11:11:15 -08:00
DwarfSection.cpp libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
Elf.cpp Fix GetGlobalVariableOffset with tagged pointer in aarch64 2020-04-27 21:07:50 +00:00
ElfInterface.cpp Optimize Memory::ReadString 2020-04-16 15:03:19 -07:00
ElfInterfaceArm.cpp Handle when bias is different in elf headers. 2019-10-08 17:36:06 +00:00
ElfInterfaceArm.h Handle when bias is different in elf headers. 2019-10-08 17:36:06 +00:00
Global.cpp Fix global finding logic. 2020-01-21 18:00:57 -08:00
JitDebug.cpp Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
LocalUnwinder.cpp Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
Log.cpp Make the library usable as a library. 2017-07-14 12:20:23 -07:00
MapInfo.cpp Properly handle empty map after read-only map. 2020-01-22 18:30:12 -08:00
Maps.cpp Fix dangling pointer issue in LocalUpdatbleMaps 2020-05-01 22:20:01 +00:00
Memory.cpp Merge "Optimize Memory::ReadString" 2020-04-20 23:35:42 +00:00
MemoryBuffer.h Fix handling of possible bad gnu_debugdata_size. 2019-12-19 16:48:15 -08:00
MemoryCache.h libunwindstack: Add Memory::ReadTag() function for reading memory tags. 2020-04-16 00:23:45 -07:00
MemoryFileAtOffset.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryLocal.h libunwindstack: Add Memory::ReadTag() function for reading memory tags. 2020-04-16 00:23:45 -07:00
MemoryMte.cpp Switch to new kernel ptrace interface for reading tags. 2020-04-29 09:33:53 -07:00
MemoryOffline.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryOfflineBuffer.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryRange.h Internalize subclasses of Memory 2019-06-11 12:09:18 -07:00
MemoryRemote.h libunwindstack: Add Memory::ReadTag() function for reading memory tags. 2020-04-16 00:23:45 -07:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
Regs.cpp Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
RegsArm.cpp Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
RegsArm64.cpp libunwindstack: support for Armv8.3-A Pointer Authentication 2020-07-14 13:31:59 -07:00
RegsInfo.h Fix off by one error. 2018-10-23 18:10:41 +01:00
RegsMips.cpp Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
RegsMips64.cpp Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
RegsX86.cpp Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
RegsX86_64.cpp Make GetPcAdjustment a free function. 2020-03-19 17:51:20 -07:00
Symbols.cpp Create minimal remap table for symbol binary search. 2020-04-16 18:17:45 +01:00
Symbols.h Create minimal remap table for symbol binary search. 2020-04-16 18:17:45 +01:00
TEST_MAPPING libunwindstack: add simpleperf presumit test. 2020-01-24 11:51:30 -08:00
Unwinder.cpp Move PC-only unwind frame generation to libunwindstack. 2020-03-26 13:39:05 -07:00