From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34063 invoked by alias); 6 Mar 2019 13:33:39 -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 34044 invoked by uid 89); 6 Mar 2019 13:33:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=patched, Additional, Prologue X-HELO: EUR04-DB3-obe.outbound.protection.outlook.com Received: from mail-eopbgr60089.outbound.protection.outlook.com (HELO EUR04-DB3-obe.outbound.protection.outlook.com) (40.107.6.89) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Mar 2019 13:33:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YMSyCjYfCiyI0MVjvkK4YOjllLeU6ZLcTBFfYly0aTk=; b=Zz3eAXAWMN1kPXdXSbt10lN3QPvX+xWSxKGyxnA0n8opLCiD+4oNKnpetJKHMIL5S2x6Bdf1eccr2O6fndpHCkRWOg6y86XXJNHKMxsPEN4S2q+G8LP16JAwGw9fNdpICbNBN438DBDXpk/IkKOEAsSbXaQU02ERazuqdrJWqQw= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.227.22) by DB6PR0802MB2262.eurprd08.prod.outlook.com (10.172.227.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.19; Wed, 6 Mar 2019 13:33:33 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::e974:35a7:c83c:e5b7]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::e974:35a7:c83c:e5b7%3]) with mapi id 15.20.1686.018; Wed, 6 Mar 2019 13:33:33 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd , Alan Hayward Subject: [PATCH v2 0/8] Support for AArch64 Pointer Authentication Date: Wed, 06 Mar 2019 13:33:00 -0000 Message-ID: <20190306133325.2531-1-alan.hayward@arm.com> x-ms-exchange-purlcount: 5 received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-exchange-senderadcheck: 1 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00084.txt.bz2 Pointer Authentication is a new feature in AArch64 v8.3-a. When enabled in the compiler, function return addresses will be mangled by the kernel. This set of patches adds support to add the new registers and umangle addresses to allow the unwinder to work. Linux Kernel support is in Linux 5.0, and was added here: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?= id=3D04ca3204fa09f5f55c8f113b0072004a7b364ff4 Binutils support was added earlier this year: https://www.sourceware.org/ml/binutils/2019-02/msg00069.html GCC support is in GCC 7.1.1 and is enabled by default when building for 8.3-a, originally added here: https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00376.html Additional support is in progress, see: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00697.html This patch series has been tested on an 8.3 Fast Model running head Linux, using both head GCC and GCC patched with the additional support. This series is a reworking of the series originally posted by Jiong: https://sourceware.org/ml/gdb-patches/2017-08/msg00170.html Patches 1-5 add the new feature, register support and feature detection. Patches 6 and 7 add the address unmangling. Patch 8 adds core file support. Alan Hayward (8): AArch64: Add pointer authentication feature AArch64: Use HWCAP to detect pauth feature AArch64: Read pauth registers AArch64: gdbserver: read pauth registers AArch64: Add pauth DWARF registers AArch64: DWARF unwinder support for signed return addresses AArch64: Prologue scan unwinder support for signed return addresses AArch64: Read pauth section from core files gdb/aarch64-linux-nat.c | 41 ++- gdb/aarch64-linux-tdep.c | 36 +- gdb/aarch64-linux-tdep.h | 9 + gdb/aarch64-tdep.c | 325 ++++++++++++++++--- gdb/aarch64-tdep.h | 14 +- gdb/arch/aarch64.c | 6 +- gdb/arch/aarch64.h | 9 +- gdb/doc/gdb.texinfo | 3 + gdb/features/Makefile | 1 + gdb/features/aarch64-pauth.c | 16 + gdb/features/aarch64-pauth.xml | 13 + gdb/gdbserver/linux-aarch64-ipa.c | 8 +- gdb/gdbserver/linux-aarch64-low.c | 55 +++- gdb/gdbserver/linux-aarch64-tdesc-selftest.c | 2 +- gdb/gdbserver/linux-aarch64-tdesc.c | 10 +- gdb/gdbserver/linux-aarch64-tdesc.h | 2 +- gdb/gdbserver/linux-low.c | 14 +- gdb/gdbserver/linux-low.h | 1 + 18 files changed, 491 insertions(+), 74 deletions(-) create mode 100644 gdb/features/aarch64-pauth.c create mode 100644 gdb/features/aarch64-pauth.xml --=20 2.17.2 (Apple Git-113)