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 67CDCC433FE for ; Mon, 15 Nov 2021 14:47:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 36B9E61BFB for ; Mon, 15 Nov 2021 14:47:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 36B9E61BFB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=KLpR0TjDx/QH/vMEQH9ufL6rKsymlZygc+0w9o8vp6Q=; b=AnUeCrPX2UvxoB g1vq5asS8gPNTpM8/UHxk4I/8k6og60OXHlGXFhsW9T9BvvYyPUV9JyuFkBkD0bTMjwim/gNIEKZp JtHp61Ki/BGQUpAi9Rp2IpOS5iG04mFkf7zfCsJkNnUERjbXG/VKwdiDxqu5ztOQs6wCKYC25ZO/p zWzCUb82JL9wbPmNZ2+Od6qzv6h/ukCcWUrObLe2tOIu5kSNwSilXhXY2QaV7HVfzKlWPoPjubWXw 7DRZHr4hIk87ckOLE6ox8OZbVVnAb/WawRMZZMdza4z2pPWjFFDfxLWNy401l1uV3qBpU27lio3xM IcQVj4OQ2cHjFYSEJbnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmdG3-00Fu9s-2r; Mon, 15 Nov 2021 14:46:55 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmdFn-00Fu78-Og for linux-arm-kernel@lists.infradead.org; Mon, 15 Nov 2021 14:46:41 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A540B6D; Mon, 15 Nov 2021 06:46:37 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A44653F766; Mon, 15 Nov 2021 06:46:36 -0800 (PST) Date: Mon, 15 Nov 2021 14:46:31 +0000 From: Mark Rutland To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, kernel-team@android.com, broonie@kernel.org, madvenka@linux.microsoft.com, rostedt@goodmis.org Subject: Re: [PATCH v2] arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR Message-ID: <20211115144631.GA36661@lakrids.cambridge.arm.com> References: <20211029162245.39761-1-mark.rutland@arm.com> <163592934036.1973408.15525829325531932416.b4-ty@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <163592934036.1973408.15525829325531932416.b4-ty@kernel.org> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211115_064639_879380_5BE79B0F X-CRM114-Status: GOOD ( 15.88 ) 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 Hi Will, On Wed, Nov 03, 2021 at 01:19:45PM +0000, Will Deacon wrote: > On Fri, 29 Oct 2021 17:22:45 +0100, Mark Rutland wrote: > > When CONFIG_FUNCTION_GRAPH_TRACER is selected and the function graph > > tracer is in use, unwind_frame() may erroneously associate a traced > > function with an incorrect return address. This can happen when starting > > an unwind from a pt_regs, or when unwinding across an exception > > boundary. > > > > This can be seen when recording with perf while the function graph > > tracer is in use. For example: > > > > [...] > > Applied to arm64 (for-next/core), thanks! > > [1/1] arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR > https://git.kernel.org/arm64/c/552e196d88e5 After this got applied, it got dropped due to a couple of (relatively trivial) conflicts with: cd9bc2c9258816dc ("arm64: Recover kretprobe modified return address in stacktrace") ... since that was going via the ftrace tree. Now that's in v5.16-rc1, are you happy to pick this as a fix for v5.16-rc2? I've push a version rebased atop v5.16-rc1 to: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/stacktrace/arch-stack-walk git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/stacktrace/arch-stack-walk ... which I've re-tested as per the existig description in the commit message. If you'd like, I can send that out as a v3 so you have something to refer to in a link tag. Otherwise, if you'd prefer to fix that up yourself the resolution is pretty straightforward: delete the lines using stackframe::graph. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel