Hi Steve, On Fri, Jun 14, 2024 at 03:47:14PM +0100, Steve Capper wrote: > 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 on Debian Testing and Fedora 40 running on an > Apple M1 MacBook Pro (the CFLAG -mbranch-protection=standard needs to be > supplied to the build).
Thanks, I found a setup to test this and it works. Nice. > Without this series applied, the following tests failed: > * run-backtrace-native.sh > * run-backtrace-dwarf.sh > * run-backtrace-native-core.sh > * run-deleted.sh > > I am happy to chop/change bits as necessary. I had some small comments on the first two patches. They look good, just tiny nitpicks. The last three introduce/depend on a new public function dwfl_thread_state_aarch64_pauth. I rather not have such a public architecture specific function. Could we instead try to reuse dwfl_thread_state_registers? We could say that negative regnums are special architecture specific settings? There is already some precedent for that in the the thread_state_registers_cb function given to ebl_set_initial_registers_tid, which call with -1 to set the PC value. We could use -2 to indicate it is an arch specific setting. That is also slightly ugly. But given we can hide most of it in architecture specific/private code better than special case public architecture functions. Cheers, Mark