From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39071 invoked by alias); 9 Aug 2017 16:09:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 39001 invoked by uid 89); 9 Aug 2017 16:09:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=unavailable version=3.3.2 spammy= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Aug 2017 16:09:31 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfTY0-00036O-Ir for gdb-patches@sourceware.org; Wed, 09 Aug 2017 12:09:29 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfTXt-00033a-4R; Wed, 09 Aug 2017 12:09:21 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1945 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dfTXq-0003OI-Tl; Wed, 09 Aug 2017 12:09:21 -0400 Date: Wed, 09 Aug 2017 16:09:00 -0000 Message-Id: <83o9rosoyw.fsf@gnu.org> From: Eli Zaretskii To: Jiong Wang CC: gdb-patches@sourceware.org, binutils@sourceware.org In-reply-to: <21a7c0c7-45a0-6059-789f-d68e4cd03d37@foss.arm.com> (message from Jiong Wang on Wed, 9 Aug 2017 13:21:33 +0100) Subject: Re: [AArch64][1/6] Add new "pauth" feature and native support Reply-to: Eli Zaretskii References: <21a7c0c7-45a0-6059-789f-d68e4cd03d37@foss.arm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00189.txt.bz2 > From: Jiong Wang > 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. > > gdb/ > 2017-08-09 Jiong Wang > Yao Qi > > * aarch64-linux-nat.c (fetch_pauth_masks_from_thread): New > function. > (aarch64_linux_fetch_inferior_registers): Support pauth > description. > (aarch64_linux_read_description): Likewise. > * aarch64-tdep.c: #include "features/aarch64-pauth.c". > (aarch64_pauth_register_names): New register names array for > pauth. > (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 > type. > (struct gdbarch_tdep) : New field. > (tdesc_aarch64_pauth): New variable declaration. > (aarch64_tdep_has_pauth_p): New function declaration. > * nat/aarch64-linux.c: Include . > (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. > > include/ > * elf/common.h (NT_ARM_PAC_MASK): New. > > gdb/doc/ > * gdb.texinfo (AArch64 Features): New feature > "org.gnu.gdb.aarch64.pauth". Thanks, the patch for gdb.texinfo is approved.