From patchwork Thu Oct 20 10:19:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 13013211 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 601FFC4332F for ; Thu, 20 Oct 2022 11:03:16 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=tKTZuzF0zXVAKGBeh9FClksbtVbE0k+433X4D89M914=; b=BsDeHWPfO8kT3P DPh0KHlp1VYSMYht7R/oEDi08q+jKnB9WaQSJJ5K8KJ7eCPG79wAMgCm09Q36f9hjKAxU6k5djyW7 FL+BBOvlXKznk8xA1CjDzsuulgMuZI3NHlZCgp9cwN2tX9d1LCz0YCGYQ9iXWW4qnXE2iMNhJtPBz Hukx8+r99IvruKLn2BspBvXna7+Qv4mOWuK7Ih8d0oyYHHHq+dwKIj+P63BpEVxp8cf8Og7EaHp8S ay2yLG9lYHGlBBm8Plb5pB/u+7gnYfQIE+DpgJRd22G0uFtNRFHYFBi1rLGIE8+VXagkSEO0ywCgc EtDBsk/UQH62p0IVanGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olTIy-00DsYA-Ha; Thu, 20 Oct 2022 11:01:41 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olSfL-00DTmX-Vs for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 10:20:45 +0000 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 4F088ED1; Thu, 20 Oct 2022 03:20:46 -0700 (PDT) Received: from e121896.arm.com (unknown [10.57.5.110]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3C8B13F792; Thu, 20 Oct 2022 03:20:37 -0700 (PDT) From: James Clark To: linux-perf-users@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, acme@kernel.org, James Clark , Will Deacon , Mark Rutland , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Catalin Marinas Subject: [PATCH v2 0/1] Perf stack unwinding with pointer authentication Date: Thu, 20 Oct 2022 11:19:19 +0100 Message-Id: <20221020101921.1219533-1-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_032044_134237_F5EB4D6F X-CRM114-Status: GOOD ( 14.28 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, I've taken up this change from Andrew and made some improvements. It also didn't apply cleanly anymore so I thought I would resend. I know there were some discussions with Vince Weaver about having something arch specific in perf_event_open, so it would be good to get some more feedback on that. I'm happy to change it so that it's just called PERF_SAMPLE_PTRAUTH, but given how arch specific the output is, I'm not sure if that is best. Thanks James Changes since V1: * Use weak symbols instead of #ifdefs which simplified things * Remove the new files as everything fits well into existing ones * Never allow opening the event if CONFIG_ARM64_PTR_AUTH isn't set * Include only the kernel side change in this set, the perf tool changes are here [1] which I will also rebase and resubmit * Rebase onto tip/perf/core (82aad7ff7ac) [1]: https://lore.kernel.org/lkml/20220704145333.22557-1-andrew.kilroy@arm.com/T/#t Andrew Kilroy (1): perf arm64: Send pointer auth masks to ring buffer arch/arm64/include/asm/perf_event.h | 32 +++++++++++++++++++++++++++++ arch/arm64/kernel/perf_event.c | 32 +++++++++++++++++++++++++++++ include/linux/perf_event.h | 12 +++++++++++ include/uapi/linux/perf_event.h | 4 +++- kernel/events/core.c | 31 ++++++++++++++++++++++++++++ 5 files changed, 110 insertions(+), 1 deletion(-)