This is the mail archive of the
mailing list for the binutils project.
Re: [AArch64][1/6] Add new "pauth" feature and native support
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>
- Cc: gdb-patches at sourceware dot org, binutils at sourceware dot org
- Date: Wed, 09 Aug 2017 19:08:55 +0300
- Subject: Re: [AArch64][1/6] Add new "pauth" feature and native support
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Jiong Wang <firstname.lastname@example.org>
> Date: Wed, 9 Aug 2017 13:21:33 +0100
> This patch teach GDB to return the new ARMv8.3-A Pointer Authentication feature
> description when there is related support.
> * A new "pauth" feature description file is added.
> The new pointer authentication feature, "pauth", contains two virtual
> registers, "pauth_dmask" and "pauth_cmask". Their values are supplied by
> kernel to GDB through ptrace interface. They are masks to indicate which
> bits will be signature when data pointer or code pointer is signed. Those
> bits will be set to "1" in the mask.
> * HWCAP is used to detect whether the hardware support exists.
> Currently we only support return address signing with A key, so using ptrace
> trial read would not be reliable as it will return successfully when other
> keys are used inside kernel.
> The change on include/elf/common.h needs approval from Binutils maintainers.
> 2017-08-09 Jiong Wang<email@example.com>
> Yao Qi<firstname.lastname@example.org>
> * aarch64-linux-nat.c (fetch_pauth_masks_from_thread): New
> (aarch64_linux_fetch_inferior_registers): Support pauth
> (aarch64_linux_read_description): Likewise.
> * aarch64-tdep.c: #include "features/aarch64-pauth.c".
> (aarch64_pauth_register_names): New register names array for
> (aarch64_cannot_store_register): New function.
> (aarch64_tdep_has_pauth_p): New function.
> (aarch64_gdbarch_init): Handle pauth description. Initialize
> the optional "regnum" field. Register cannot_store_register hook.
> (_initialize_aarch64_tdep): Call initialize_tdesc_aarch64_pauth.
> * aarch64-tdep.h (struct aarch64_optional_regnum): New structure
> (struct gdbarch_tdep) <regnum>: New field.
> (tdesc_aarch64_pauth): New variable declaration.
> (aarch64_tdep_has_pauth_p): New function declaration.
> * nat/aarch64-linux.c: Include <sys/auxv.h>.
> (aarch64_host_hwcap): New function.
> * nat/aarch64-linux.h (HWCAP_APIA): New macro.
> (aarch64_host_hwcap): New function declaration.
> * features/Makefile (WHICH): Add aarch64-pauth.
> (XMLTOC): Add aarch64-pauth.xml.
> * features/aarch64-pauth-core.xml: New file.
> * features/aarch64-pauth.c: Generated.
> * features/aarch64-pauth.xml: New file.
> * regformats/aarch64-pauth.dat: Generated.
> * elf/common.h (NT_ARM_PAC_MASK): New.
> * gdb.texinfo (AArch64 Features): New feature
Thanks, the patch for gdb.texinfo is approved.