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 X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4277BC433B4 for ; Fri, 30 Apr 2021 17:33:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 012F16145D for ; Fri, 30 Apr 2021 17:33:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231309AbhD3Rdw (ORCPT ); Fri, 30 Apr 2021 13:33:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:51398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230478AbhD3Rds (ORCPT ); Fri, 30 Apr 2021 13:33:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 67D0E61462; Fri, 30 Apr 2021 17:32:58 +0000 (UTC) Date: Fri, 30 Apr 2021 18:32:55 +0100 From: Catalin Marinas To: Mark Rutland Cc: Leo Yan , Will Deacon , Mark Brown , Miroslav Benes , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Masami Hiramatsu , "Madhavan T. Venkataraman" Subject: Re: [PATCH] arm64: stacktrace: Stop unwinding when the PC is zero Message-ID: <20210430173255.GE18574@arm.com> References: <20210429014321.196606-1-leo.yan@linaro.org> <20210429104813.GA33550@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210429104813.GA33550@C02TD0UTHF1T.local> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 29, 2021 at 11:48:13AM +0100, Mark Rutland wrote: > From b99e647b34b74059f3013c09f12fbd542c7679fd Mon Sep 17 00:00:00 2001 > From: Mark Rutland > Date: Thu, 29 Apr 2021 11:20:04 +0100 > Subject: [PATCH] arm64: stacktrace: restore terminal records > > We removed the terminal frame records in commit: > > 6106e1112cc69a36 ("arm64: remove EL0 exception frame record") > > ... on the assumption that as we no longer used them to find the pt_regs > at exception boundaries, they were no longer necessary. > > However, Leo reports that as an unintended side-effect, this causes > traces which cross secondary_start_kernel to terminate one entry too > late, with a spurious "0" entry. > > There are a few ways we could sovle this, but as we're planning to use > terminal records for RELIABLE_STACKTRACE, let's revert the logic change > for now, keeping the update comments and accounting for the changes in > commit: > > 3c02600144bdb0a1 ("arm64: stacktrace: Report when we reach the end of the stack") > > This is effectively a partial revert of commit: > > 6106e1112cc69a36 ("arm64: remove EL0 exception frame record") > > Signed-off-by: Mark Rutland > Fixes: 6106e1112cc69a36 ("arm64: remove EL0 exception frame record") > Reported-by: Leo Yan > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Brown > Cc: "Madhavan T. Venkataraman" Thanks Mark. I applied it to for-next/core (couldn't figure out the combination of b4 and git am + the scissors and not replying to the top message). -- Catalin