https://sourceware.org/bugzilla/show_bug.cgi?id=31874
--- Comment #7 from Emanuele Rocca ---
I just double-checked that the patchset sent by Steve Capper to the list fixes
all tests on my systems with pointer authentication on:
https://sourceware.org/pipermail/elfutils-devel/2024q2/007127.html
-
We need to read the PAC mask from a core file when debugging offline
as the information is still needed to demangle return addresses.
This commit pulls out the NT_ARM_PAC_MASK info from the core and feeds
it through to dwfl_thread_state_aarch64_pauth for each thread.
Signed-off-by: Steve Capper
From: German Gomez
Implement DW_CFA_AARCH64_negate_ra_state in accordance with the DWARF
AARCH64 ABI [1].
Followup commits will use the value of this register to remove the PAC
from return addresses.
[1]
https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst#44call-frame-inst
From: German Gomez
This register will be used to indicate whether a return address is
mangled with a PAC or not, in accordance with the DWARF AARCH64 ABI [1].
[1]
https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst#41dwarf-register-names
Signed-off-by: German Gomez
Signed
From: German Gomez
Add user API for setting the PAC mask.
The function is intended to be called in
Dwfl_Thread_Callbacks.set_initial_registers.
Testing notes:
... consider the following program.c
| int a = 0;
| void leaf(void) {
| for (;;)
| a += a;
| }
| void parent(void) {
|
From: German Gomez
Demangle mangled return addresses on AARCH64. The value of the masks is
stored in the struct Dwfl_Thread.
Signed-off-by: German Gomez
Signed-off-by: Steve Capper
---
libdwfl/dwfl_frame.c | 3 +++
libdwfl/frame_unwind.c | 14 +-
libdwfl/libdwflP.h | 7 +++
Hello,
This series enables Pointer Authentication (PAC) support in elfutils.
The first four patches were originally posted by German Gomez. I've
rebased to the latest elfutils and added an extra patch that was
required to debug core dumps from PAC enabled applications.
These patches were tested o