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 0DF65C00144 for ; Mon, 1 Aug 2022 12:24:26 +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=NUei7se0TumC0aaYYzSzW5ecI4nKIWV8ovT6rHuvXlM=; b=kuTJnhRvcvFmFO QPQHNZluwiNiEfPcxgKcGsCtIHp2zENiPFB0Ed2Zd1yEUohxRt8nZxVaJvMVWFEyaoALm2A5mXPaW k2fFaCexLMgTCsS9j36Knpept2KkIDVf6RleX1wgRPu58Fv+58zF+GEk4cKhslUWgYc4kN6Pm+/qR FOekwBHr1CMM/cCiCTZzjnKtkXPrEbMI+enGz2CRY8OFFHZSUDPKPGobHl++l653Du2YkwtPJkcOm Ew41TCUl8/7C6F4aQnC/ED0l7YcQEWgg39+VU5LXCmaVH8OuwfS/PmAlb0OFaGquPTKyxlqaoTlSd mtix1jDge3Sa0IimJJZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIUS4-0067Sj-GT; Mon, 01 Aug 2022 12:23:16 +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 1oIUHS-005yWp-FB for linux-arm-kernel@lists.infradead.org; Mon, 01 Aug 2022 12:12:20 +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 2245D139F; Mon, 1 Aug 2022 05:12:16 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 26EE93F73B; Mon, 1 Aug 2022 05:12:14 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org, Marc Zyngier Cc: broonie@kernel.org, catalin.marinas@arm.com, james.morse@arm.com, kaleshsingh@google.com, madvenka@linux.microsoft.com, mark.rutland@arm.com, tabba@google.com, will@kernel.org Subject: [PATCH 0/8] arm64: stacktrace: cleanups and improvements Date: Mon, 1 Aug 2022 13:12:01 +0100 Message-Id: <20220801121209.2479449-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220801_051218_729485_9C62B9D6 X-CRM114-Status: GOOD ( 13.61 ) 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 Hi Marc, This series is a set of improvements for the recently merged stacktrace rework queued in the kvmarm next branch, along the lines of my prior suggestions. I'm hoping that it would be possible to queue this for -rc1. Largely, the series decouples portions of the unwind code, making some structural changes that remove the need for coupling (e.g. removing the need for the stack type enumeration, and factoring out callbacks). This should make it easier to make some further changes I have spoken about previously (e.g. adding some metadata to the stack dump output), and I have some patches building atop this which I intend to send out once this is merged. The only (intended) functional change from this series is improved bounary detection, where overlapping frame records will now be caught and rejected. I've tested this natively (with the ftrace tests, LKDTM, and /proc/self/stack), which seems happy. I've also tested the NVHE and PKVM unwinders by hacking a BUG() into the hyp code shortly after the KVM hyp code is initialized, and in both cases the output is unchanged. Thanks, Mark. Mark Rutland (8): arm64: stacktrace: simplify unwind_next_common() arm64: stacktrace: rename unwind_next_common() -> unwind_next_frame_record() arm64: stacktrace: move SDEI stack helpers to stacktrace code arm64: stacktrace: add stackinfo_on_stack() helper arm64: stacktrace: rework stack boundary discovery arm64: stacktrace: remove stack type from fp translator arm64: stacktrace: track all stack boundaries explicitly arm64: stacktrace: track hyp stacks in unwinder's address space arch/arm64/include/asm/processor.h | 2 +- arch/arm64/include/asm/sdei.h | 17 -- arch/arm64/include/asm/stacktrace.h | 71 +++++-- arch/arm64/include/asm/stacktrace/common.h | 211 +++++++++------------ arch/arm64/kernel/ptrace.c | 2 +- arch/arm64/kernel/sdei.c | 35 ---- arch/arm64/kernel/stacktrace.c | 66 ++++--- arch/arm64/kvm/hyp/nvhe/stacktrace.c | 40 ++-- arch/arm64/kvm/stacktrace.c | 135 +++++++------ 9 files changed, 288 insertions(+), 291 deletions(-) -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel