From patchwork Mon Apr 25 14:03:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: German Gomez X-Patchwork-Id: 53186 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D18A93858C74 for ; Mon, 25 Apr 2022 14:03:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D18A93858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1650895411; bh=NSjFpbEDyt8s5VQSwMQZf6ecNTHb/0y0qagGJ7Iz3dY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=F4bvgzt9OEoVzJiCPbKMnbT/i2AffzZwJ8sGV7ERDFD402N8F/LnT5H8n5tEYCIw+ FZk0JB0oj1mnXQKc2bUgrcdKQ9LcKmBTd3nLCblNlOnoFBhOHDaa32jPPqal41T170 /YQbFCcG41D32s77zQ2k6Np8KN1PwLjpeYSya2SQ= X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 9FB573858D28 for ; Mon, 25 Apr 2022 14:03:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9FB573858D28 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 34B261FB; Mon, 25 Apr 2022 07:03:22 -0700 (PDT) Received: from ip-10-252-15-96.eu-west-1.compute.internal (unknown [10.252.15.96]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 90E2D3F774; Mon, 25 Apr 2022 07:03:21 -0700 (PDT) To: elfutils-devel@sourceware.org Subject: [PATCH 0/4] Add AARCH64 pointer authentication support Date: Mon, 25 Apr 2022 14:03:07 +0000 Message-Id: <20220425140311.95231-1-german.gomez@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: German Gomez via Elfutils-devel From: German Gomez Reply-To: German Gomez Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org Sender: "Elfutils-devel" Hi, I've included a set of patches in order to demangle return addresses in aarch64 platforms with pointer authentication. Besides adding the implementation of the negate_ra_state opcode, there is a new function in the libdwfl.h header to feed the PAC masks to the library. Let me know if there are any concerns with the current version. Thanks, German German Gomez (4): aarch64: Create definitions for AARCH64_RA_SIGN_STATE register libdw,aarch64: Implement DW_CFA_AARCH64_negate_ra_state CFI instruction libdwfl,aarch64: Demangle return addresses using a PAC mask libdwfl,eu-stack,aarch64: Add API for setting AARCH64 PAC mask. backends/aarch64_init.c | 6 +++--- backends/aarch64_initreg.c | 2 ++ backends/aarch64_regs.c | 5 ++++- libdw/cfi.c | 14 +++++++++++++- libdw/dwarf.h | 5 +++++ libdw/libdw.map | 5 +++++ libdwfl/dwfl_frame.c | 3 +++ libdwfl/dwfl_frame_regs.c | 10 ++++++++++ libdwfl/frame_unwind.c | 14 +++++++++++++- libdwfl/libdwfl.h | 6 ++++++ libdwfl/libdwflP.h | 7 +++++++ libdwfl/linux-pid-attach.c | 34 ++++++++++++++++++++++++++++++++-- tests/run-addrcfi.sh | 1 + tests/run-allregs.sh | 1 + 14 files changed, 105 insertions(+), 8 deletions(-)