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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3324AC25B74 for ; Mon, 27 May 2024 12:52:19 +0000 (UTC) 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=Oe//pqMOQYMhYDf7qZaGnszqbNdg3geLln0Kmgltm7U=; b=FA7ThxmUI/2xsE MWqbbebxfrYckrj2KmmLmDmwHwklv9NcVwbyjuPPi+iOkrOlhmutsC9UJam4CbQkMmePuwseLj504 leI39cUKv+GIGrKQfKFvLwfzH3tVsStanQc+ZiBJ3WGqeBQR83c+OZ4oY860cJgSk+yHurMNIUrN0 f5AMw4CH7y+v7RsXT30b5TrTwaFsv/Sfokrcm6xLfSIYV1Z7Gts4WKmZSz7/xZQorp2eabrIkmOAb be+MNco7huifnI+tWzP6jGGIU1FhHaElEPFlbJBCxhTDj0/ISflnbzwrkaLL56NbLKesb/Sbatg60 T2+JioT6y5Rqi/0o3JHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBZpf-0000000EwaL-1XpM; Mon, 27 May 2024 12:52:07 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBZpc-0000000EwYy-1zoU for linux-arm-kernel@lists.infradead.org; Mon, 27 May 2024 12:52:05 +0000 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-Transfer-Encoding:Content-Type: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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QJ3nyJ6zYMYDlHXvM/LFHGefiWmEFxK4DDRt6GM5lX4=; b=FnGVNuLuDP/t1jh4TK62tRGa5V dTjiZbxSCiO2jQF1Hd+IEQXMPZfsLy27sYA2FCxo26Sa0AOU6JptB1rqTcR9EgOjQFt7yw9ECNakX t3XID1yPt4Je1aJeSlZ1LAaQIq0apHoOXfxF82Npc7dc47jvQtARh+I0miFITNQ/EgQjBhvfDZSg/ G5wp2PR2y8AX3G5oXTwrwD2/VCKUwpbuAEOHSX7sP0u5XaYfS8VSPG9m/QGaERmwy03xaCM+5tb3H BYTa2oP50mCg4dyBD85ITi7SM5N2gUFxPxPNKNa6k6keamrfFNrF8BZg2Uo6S6YPcXKI9voz4PYbe kYU7pJlg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:38678) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sBZpN-0003Vg-1P; Mon, 27 May 2024 13:51:49 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sBZpN-0002Kd-6p; Mon, 27 May 2024 13:51:49 +0100 Date: Mon, 27 May 2024 13:51:49 +0100 From: "Russell King (Oracle)" To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Thorsten Scherer , mark.rutland@arm.com, Florian Fainelli , rostedt@goodmis.org, Justin Chen , Doug Berger , mhiramat@kernel.org, kernel@pengutronix.de, ardb@kernel.org, linux-arm-kernel@lists.infradead.org, linux-trace-kernel@vger.kernel.org Subject: Re: ARM Ftrace Function Graph Fails With UNWINDER_FRAME_POINTER Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240527_055204_540953_384301F0 X-CRM114-Status: GOOD ( 21.79 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, May 27, 2024 at 02:28:59PM +0200, Uwe Kleine-K=F6nig wrote: > On Mon, May 27, 2024 at 08:56:16AM +0100, Russell King (Oracle) wrote: > > On Mon, May 27, 2024 at 09:43:41AM +0200, Thorsten Scherer wrote: > > > Hello, > > > = > > > in the context of a panic on an i.MX25 based v6.9 kernel [1] Uwe poin= ted me to > > > this thread. With the proposed code change applied the procedure > > > = > > > # set to some known good (randomly guessed) filter function and e= nable function_graph > > > echo mtdblock_open > set_ftrace_filter > > > echo function_graph > current_tracer > > > = > > > # walk available filter funcs > > > cat available_filter_functions | while read f; do echo $f | tee -= a set_ftrace_filter; sleep 1; done > > > = > > > produces the following output > > > = > > > [ 159.832173] Insufficient stack space to handle exception! > > > [ 159.832241] Task stack: [0xc8e44000..0xc8e46000] > > > [ 159.842701] IRQ stack: [0xc8800000..0xc8802000] > > > [ 159.847712] Overflow stack: [0xc1934000..0xc1935000] > > > [ 159.852726] Internal error: Oops - BUG: 0 [#1] PREEMPT ARM > > > [ 159.858273] Modules linked in: capture_events_imxgpt ti_ads7950 in= dustrialio_triggered_buffer kfifo_buf capture_events_irq capture_events iio= _trig_hrtimer industrialio_sw_trigger industrialio_configfs dm_mod > > > [ 159.876948] CPU: 0 PID: 199 Comm: sh Not tainted 6.9.0 #3 > > > [ 159.882412] Hardware name: Freescale i.MX25 (Device Tree Support) > > > [ 159.888547] PC is at prepare_ftrace_return+0x4/0x7c > > > [ 159.893520] LR is at ftrace_graph_caller+0x1c/0x28 > > > [ 159.898376] pc : [] lr : [] psr: 60000093 > > > [ 159.904690] sp : c8e44018 ip : c8e44018 fp : c8e4403c > > > [ 159.909959] r10: c0c09e78 r9 : c35e9bc0 r8 : c010d9bc > > > [ 159.915227] r7 : 00000001 r6 : 00000004 r5 : c8e44064 r4 : c8e4= 40ac > > > [ 159.921800] r3 : c8e44030 r2 : c8e4403c r1 : c010eb9c r0 : c8e4= 4038 > > > [ 159.928376] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM = Segment none > > > [ 159.935652] Control: 0005317f Table: 83074000 DAC: 00000051 > > > [ 159.941436] Register r0 information: 2-page vmalloc region startin= g at 0xc8e44000 allocated at kernel_clone+0xa8/0x408 > > > [ 159.952253] Register r1 information: non-slab/vmalloc memory > > > [ 159.957988] Register r2 information: 2-page vmalloc region startin= g at 0xc8e44000 allocated at kernel_clone+0xa8/0x408 > > > [ 159.968791] Register r3 information: 2-page vmalloc region startin= g at 0xc8e44000 allocated at kernel_clone+0xa8/0x408 > > > [ 159.979592] Register r4 information: 2-page vmalloc region startin= g at 0xc8e44000 allocated at kernel_clone+0xa8/0x408 > > > [ 159.990391] Register r5 information: 2-page vmalloc region startin= g at 0xc8e44000 allocated at kernel_clone+0xa8/0x408 > > > [ 160.001187] Register r6 information: non-paged memory > > > [ 160.006303] Register r7 information: non-paged memory > > > [ 160.011415] Register r8 information: non-slab/vmalloc memory > > > [ 160.017139] Register r9 information: slab kmalloc-32 start c35e9bc= 0 pointer offset 0 size 32 > > > [ 160.025718] Register r10 information: non-slab/vmalloc memory > > > [ 160.031530] Register r11 information: 2-page vmalloc region starti= ng at 0xc8e44000 allocated at kernel_clone+0xa8/0x408 > > > [ 160.042422] Register r12 information: 2-page vmalloc region starti= ng at 0xc8e44000 allocated at kernel_clone+0xa8/0x408 > > > [ 160.053315] Process sh (pid: 199, stack limit =3D 0x68fc3abb) > > > [ 160.058955] Stack: (0xc8e44018 to 0xc8e46000) > > = > > No backtrace? No Code: line? I'm guessing there was an attempt to ftrace > > a function involving the ftrace tracing infrastructure, which is why 8KB > > of stack has been gobbled up. It could be > > copy_from_kernel_nofault_allowed() but it would be useful to have at > > least some extract of the backtrace showing the recursive cycle to > > confirm, otherwise there is nothing in your report to confirm. As I'm > > not a ftrace user myself, this isn't something I'd test for, so having > > a full report would be useful. > = > Is not having a backtrace related to ftrace_return_address() returning > NULL, as Arnd pointed out in > https://lore.kernel.org/linux-arm-kernel/36cd10de-c51c-40ff-90e8-71495406= 019d@app.fastmail.com/ > ? Unlikely - the stack and code lines are also missing. I think the submitter truncated the oops which is highly likely given that it would've dumped all 8kB of the stack in hex, and the trace and code lines would be after that. -- = RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel