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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E297AC433EF for ; Thu, 14 Oct 2021 16:53:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BBA9860F59 for ; Thu, 14 Oct 2021 16:53:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232613AbhJNQzn (ORCPT ); Thu, 14 Oct 2021 12:55:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230244AbhJNQzk (ORCPT ); Thu, 14 Oct 2021 12:55:40 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71DF3C061570 for ; Thu, 14 Oct 2021 09:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LBqLUSDBXcDspTIIT2BMYaWCoLdz1YbMecXG5wHoYbo=; b=PU7PLLUinoEGOQWjLys9r2UXH/ xre02cHUFAqXhVGMkSW4cZlCUE1ENmA03ESe+CY54sYt3JjO5Ji9rAQXbOab5KoOa6jOhKeVoB0dW Iqev2k8HqWe6eF3GxrpcLVK86FE+lxOXLdHFU2HMho+50kicRF/J5A0yL3qKwEdtN5QPJQmr+bI5X LJYu2CgJ5SUe35Hyv4nkHyaDvtsBYD5YXwxo8ofiDjeHm810oAnQGpcJUYfNpOP8KBTalSz9l+1Tm Do0edtyanb4jW9i+ys7AcgnRVruz3OKeaUDUtKnHxHOnkxAgu/aL1Jd+KjH5sSSwWU5g2P5EwrJ2C o0AfHXLw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55116) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mb3yw-0001Yz-Qe; Thu, 14 Oct 2021 17:53:26 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mb3yu-0002Jf-Gd; Thu, 14 Oct 2021 17:53:24 +0100 Date: Thu, 14 Oct 2021 17:53:24 +0100 From: "Russell King (Oracle)" To: Masami Hiramatsu Cc: Steven Rostedt , "Naveen N . Rao" , Ananth N Mavinakayanahalli , Ingo Molnar , linux-kernel@vger.kernel.org, Sven Schnelle , Catalin Marinas , Will Deacon , Nathan Chancellor , Nick Desaulniers , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 6/8] ARM: clang: Do not relay on lr register for stacktrace Message-ID: References: <163369609308.636038.15295764725220907794.stgit@devnote2> <163369614818.636038.5019945597127474028.stgit@devnote2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <163369614818.636038.5019945597127474028.stgit@devnote2> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 08, 2021 at 09:29:08PM +0900, Masami Hiramatsu wrote: > Currently the stacktrace on clang compiled arm kernel uses the 'lr' > register to find the first frame address from pt_regs. However, that > is wrong after calling another function, because the 'lr' register > is used by 'bl' instruction and never be recovered. > > As same as gcc arm kernel, directly use the frame pointer (x11) of > the pt_regs to find the first frame address. Can I ask that the subject line is corrected. It's "rely" not "relay". Also, the frame pointer is called "r11" not "x11" if you want to use the numerical register reference for 32-bit ARM registers. Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!