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 D448FC433F5 for ; Fri, 15 Oct 2021 00:18:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A71F761151 for ; Fri, 15 Oct 2021 00:18:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233745AbhJOAUm (ORCPT ); Thu, 14 Oct 2021 20:20:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:40866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230288AbhJOAUk (ORCPT ); Thu, 14 Oct 2021 20:20:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C825C6108E; Fri, 15 Oct 2021 00:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634257115; bh=Z3UOu6jr8cU0ilKr740bQYqd9+n2GwanZcjiupK2hcw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TIVeO1aC2FcrKNIr/3WL8ZR085bRXEFNNCodVeZm3H47FdkJCsjdBpv3dDXnjZ9Wv Z3ByY6m1HSgPc3NTszZ7nLLI3eeRlWvQcX8irs5hb3xzRTk20rvAlu0YwE8MzmFcJm yeFFAbJrwVP4tGHVjya0ykDVYMnl/RuYu7cPtiyi87YVr82eQhDk1sv6qQKiFrDrFY dRz8o5RsERQS3ZHt66YbYRwS/nDBhA3wChRnDnijVMgdnxzbqsOWoO0HnkJ4JFgqWs xpQFMwkd36g+M75Z/VTkWrFt2b+XJFOMZbnTSb4dX97kqSTNMDN4eQm1iOz9cdKrly +DbcA9Gl2A0vw== Date: Fri, 15 Oct 2021 09:18:32 +0900 From: Masami Hiramatsu To: "Russell King (Oracle)" 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: <20211015091832.3e114751496041931f214bab@kernel.org> In-Reply-To: References: <163369609308.636038.15295764725220907794.stgit@devnote2> <163369614818.636038.5019945597127474028.stgit@devnote2> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 Oct 2021 17:53:24 +0100 "Russell King (Oracle)" wrote: > 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". Oops, yes, that's my typo. Thanks for correcting! > > Also, the frame pointer is called "r11" not "x11" if you want to use > the numerical register reference for 32-bit ARM registers. Oh, I mixed up the register name between arm64 and ARM... Thank you, > > Thanks. > > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! -- Masami Hiramatsu