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 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.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 2E993C433ED for ; Fri, 30 Apr 2021 17:35:08 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA5676145D for ; Fri, 30 Apr 2021 17:35:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA5676145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=xPjmcgt19ZyHc/ndR9dCnl55nPWd/SBOJyfNsifJ+Ow=; b=IXH03M3qpwds9+3CUlmIrbMSJ 8Kkh9MISAW2RU9r237j3IlhwmczbyIZp9ix+TVQoFGV9pwLrlQb93HQwh7rVYs9y0fm7o3zQ5/gp5 MBzwxhRc6dtCLAStHroEMC0YrWxecQpNKJPCpd2FeZxNEaiUKcgPEaQcPDrdGA0Y/tbOUf8Ga+f9/ lFq+TnMZI9J5UVGING0YETpP5fQN1k91m7yyP8EbEkh8FTg3ef4Mjwed6k7ICrzWCJvC9286UmO3G W82nwWJBOcmRIdsWcv4ZIQDphRNOpLoRGK4FRYu5jVAc4H+CFs4HtccNoJZSSPeoGAISp9fOhLT9X nxt8oLGBA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lcX0l-008Hvv-4g; Fri, 30 Apr 2021 17:33:07 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcX0h-008Hve-VQ for linux-arm-kernel@desiato.infradead.org; Fri, 30 Apr 2021 17:33:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=pl0cJb64eqn5mBXsXPy0j9obv5m7f2YijzWdhFwRBwY=; b=OOjN1/A9HgjmtjoYRAHJaaQtHt SPW1EgPrzixIjdWskrII2sFzEcjnSkjV2DiYZybO8lFDsJbsTCnBc/lA5KFXL+PIZ4G/5nLAX+jeN J/tWmDGrPYd240F9h0a7XOwONEjBelc6mvSGhsOGgdwlerPiD8a5faIHdTElf4Vu/HguH/TjjSFvv DxzXDpx76wSb6TTM+nZrdhlq7BwQ9ZCPQA2CoFqSvHlW2mwiYnhF+t/7m3cX0h0ey3xho+2a9YPGo OHVB2nXptdj/vy6UkEj8BWtKXfBHHdcvPs6Th2qqzUkXhDXBvLU0vsPaFRT+ZR/TknNFw9GHMvyTR 08tFjBbQ==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcX0f-001YaC-AC for linux-arm-kernel@lists.infradead.org; Fri, 30 Apr 2021 17:33:02 +0000 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-Disposition: inline In-Reply-To: <20210429104813.GA33550@C02TD0UTHF1T.local> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210430_103301_431439_3583FED2 X-CRM114-Status: GOOD ( 17.85 ) 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, 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel