Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp540181pxy; Fri, 30 Apr 2021 10:34:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBkN1xfjPlFmsDRmscMzfGBkw/4XXTQkjHNpLOhjL0ppMOH7aZS9dA1KrQNKC3eP0cbL7+ X-Received: by 2002:aa7:94b4:0:b029:28d:7b58:c0ed with SMTP id a20-20020aa794b40000b029028d7b58c0edmr1486393pfl.27.1619804065539; Fri, 30 Apr 2021 10:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619804065; cv=none; d=google.com; s=arc-20160816; b=CPAJy7uEhZVfRiDSC6+5Xuxbv36oBXLoyPITHJtr1NoDYVCOS9uc3gBonrFAKCoZW7 bMJwiXveH2BpQ9FLkZEk4Yi2mMq2kYvJPt51kSuRxW2dwJJRh6dUDGKMMtIR7PnhKoUl h/rCUJuc1g8yYiVF/fAplWLOCA45viil/Vj3GQ37dYUXG+zVgqQU0y9tBHX2VkKGDTYc AOhkwWPmen5WKFUgGPiDVr936GWBhgqtPM7hhTGJuaI76qjF8lqsxAMua7cWLIgVkFYN LE331fr4JcwQelgbJ6h5wajTcVZIJ7E0M6n07MWxuXO89cF7XxcUyQpM8AVHNtdaf+1l soww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=pl0cJb64eqn5mBXsXPy0j9obv5m7f2YijzWdhFwRBwY=; b=biA7Sf5lJOvJ/2Qe3d8T0Fk0GshLu9GKJDDsLbC9ZUnHs/Nc85GoX+5Ke/IZGfEs+5 J4ydBqjL1hgSVNYN4lT6dMXiD/PXN6lcEOnoEGbyjUiD+PSDQxlb998v/2X6NAEm2HsX o+JBzA1t9tHeywlMBP+SXDWlquG8uClsWxh9PI1SsLvah7dgu4wtdXsFTFqw6mNj85MO Qr43d0jWXnrfv9ONQOOcWWaqqG/0G2umqDidTh6jUpJAeKVnrJV0CEKTqOecsa2XW47h +yAu6oU5EjgaIk7UC+0UeWe9nW5r0b1WcE2kxk3y9KHrJBoUMpQ9OQ89rpAir1M8E2Uq L6Tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si3320153pfu.91.2021.04.30.10.34.05; Fri, 30 Apr 2021 10:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231267AbhD3Rdu (ORCPT + 99 others); Fri, 30 Apr 2021 13:33:50 -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