From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B4E6C4332F for ; Thu, 20 Oct 2022 17:02:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OZikEkd2H6EP1E9JQWOKGyL/l+VJliuAGcBcWt6+JRk=; b=ad+U3tdpxSXgdq ZuaqGj0j8jtFLFNFEVXCRCBJ1VDqeUHR3wnZpMhOms+FfDmoHnluNM+Bjbmm3vhEGWbNPIYIL3JeJ 9ooPxBJR32mvQwO00yakY52bXWRVjAeF5+/s+sqkhjHq5mb8jwhHgfAuHBFS0AxEJR61QSO1DIopA JAwVaGlDHLUF9f1zGcyf4HIT1bnSmOgAnKnTtfObk5QnDOotpRYU3joCM/41VQi0uXjs2VFbgqUZE x23ID1lZvAswIzlQSZaGIVXHQ3mLYlvz9zrnip6UG/OMmEtmRjjVS7BCP6nV0KjAOtqfE2zEzGa0n zjrE6lkMNQcUKEiEbJXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYuk-000iXr-9k; Thu, 20 Oct 2022 17:01:05 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYui-000iXK-Cn for linux-arm-kernel@bombadil.infradead.org; Thu, 20 Oct 2022 17:01:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cNSLBsKzCRIUurXKxibUZ4iV/rXzCfaN7SiOZ3WxXrA=; b=lXG8/LbTcMdxz0IfQ5G/WVEhM3 46zvWJfc8xilRyVv/setRDzxTcqcUQAsuvsM5CDltALZO6N2VhsH77WW8NlaeJ8+T6/890VoyPLab b+l71bY3d12e6QEg3Lz4n+zZgs/M3CWXQ/2sIGiV3/Z2/xqA9OSPnO7b1ZL3z5SJo1WdbEDlAYj0G TjObZL8BspoaBlOreEbs//sfeL+S9Iu2RVDdvVDs2g0h+KWkFBSCMrx3WOSB7uWuYTOkIeMyeYBXy OvIfHTQMYLslp7dutHMPLCUAC5y5gWNWfMhNX9W10NrRFte1AmNkhckue/Ji571na0oOCmpz3HZkR kyLv3tWg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYuj-00CX40-JI; Thu, 20 Oct 2022 17:01:01 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 759C7300472; Thu, 20 Oct 2022 19:00:56 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 56C3F2C1596B5; Thu, 20 Oct 2022 19:00:56 +0200 (CEST) Date: Thu, 20 Oct 2022 19:00:56 +0200 From: Peter Zijlstra To: James Clark Cc: linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, acme@kernel.org, Andrew Kilroy , Vince Weaver , Mark Rutland , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Will Deacon , Catalin Marinas Subject: Re: [PATCH v2 1/1] perf arm64: Send pointer auth masks to ring buffer Message-ID: References: <20221020101921.1219533-1-james.clark@arm.com> <20221020101921.1219533-2-james.clark@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Oct 20, 2022 at 06:49:17PM +0200, Peter Zijlstra wrote: > On Thu, Oct 20, 2022 at 11:19:20AM +0100, James Clark wrote: > > From: Andrew Kilroy > > > > Perf report cannot produce callgraphs using dwarf on arm64 where pointer > > authentication is enabled. This is because libunwind and libdw cannot > > unmangle instruction pointers that have a pointer authentication code > > (PAC) embedded in them. > > > > libunwind and libdw need to be given an instruction mask which they can > > use to arrive at the correct return address that does not contain the > > PAC. > > > > The bits in the return address that contain the PAC can differ by > > process, so this patch adds a new sample field PERF_SAMPLE_ARCH_1 > > to allow the kernel to send the masks up to userspace perf. > > > > This field can be used in a architecture specific fashion, but on > > arm64, it contains the ptrauth mask information. The event will > > currently fail to open on architectures other than arm64 if > > PERF_SAMPLE_ARCH_1 is set. It will also fail to open on arm64 if > > CONFIG_ARM64_PTR_AUTH isn't set, as the data would always be zeros. > > A little more information please; wth is pointer authentication? Are we Mark got me: https://events.static.linuxfound.org/sites/events/files/slides/slides_23.pdf > going to be having the same thing with x86 LAM where only a subset of > the available bits have meaning to the hardware? > > Why do we want the same mask repeated over and over with each sample; > should this not be part of the address space (side-band) data? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel