Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp273895pxm; Wed, 2 Mar 2022 15:09:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFmmjfWUWarya8syvTGXmx6nOFTtDlgozTA6YSojYxDES6wn9Dk+OVQ8elW4nvVLaNnlJY X-Received: by 2002:a17:90a:5505:b0:1b8:ebd4:d602 with SMTP id b5-20020a17090a550500b001b8ebd4d602mr2113453pji.147.1646262547823; Wed, 02 Mar 2022 15:09:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646262547; cv=none; d=google.com; s=arc-20160816; b=VKXfPgxR2Mp8sfORcpUPTv+/mugd7VuUzx0NfOkr9YMlejyU1yoQoMZDoevksd9TBH tIxvu+QeI0mBFtx17VA1j9m9CWp6/sehyjcRQdp3ztrPXmJVTzgxJxMqfCQiESA3kYdp EVofEtZQIY+GaOsxMyPXcriNfz1g8KpX2ErElYNFMrbnr1trxp7y+LGdeONzpidJ2Boh Yu9mf5MYgYycbPjvip6L3ZUaUG1+PU9W138u5D2UVLpIwpzaDCpQG/7xw/yuMr6cCYTS AfCVcCoJ98b8oObsuzG33/JKvCzwqczYgCaVYYULc2u7JHcCr+t6VDwRovTq9vlLROtR 5XHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Kf8zKjx1jpB6ExufZ+QyMPsC6cuJG3089w5+njs1G5A=; b=ZXSzAQJ4EvHg2eMCEzfB9kAJmFQp7OVeDSBdVkrsRdFp53jxXKHIS/nOj+lHwN36Xn 0SMceVI4wEY4m3DMFD5fJ8Z2okWECnsxayCytcD9nnbgrrXHPhFrs2Ur8oYTXQqx2hNr Ssg6611tc/J4rr4PPR55IbcP05jFahYOMS+HjuSXVhdB4kCgjsb6bI5PFecZES132F/U bB/EeRijSKRumq5+qXyd4fracKviAsfpC4MRrSq2v/R+T4lwVdZTwdU1FSBWFt8xtKNU sX2QwcD50bS+TQ0L3n+Fk2eclZ2bcJtgjjwSsb/Y+kx9xEn+cs/Rtw7uLcU4T3+b+FEt GE0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=c0DkrTda; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h2-20020a056a00170200b004e03b21dec2si373288pfc.362.2022.03.02.15.09.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 15:09:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=c0DkrTda; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DDD485D5FF; Wed, 2 Mar 2022 14:49:59 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241321AbiCBLXV (ORCPT + 99 others); Wed, 2 Mar 2022 06:23:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240017AbiCBLXS (ORCPT ); Wed, 2 Mar 2022 06:23:18 -0500 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 883005F95 for ; Wed, 2 Mar 2022 03:22:33 -0800 (PST) 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=Kf8zKjx1jpB6ExufZ+QyMPsC6cuJG3089w5+njs1G5A=; b=c0DkrTda2xpKvQodJagOfOc7VD zppk1RxeyrxfqxPf0iJ7eKwJA+LospYsjRd4+ztXiOUqoneCxHUTde1uzopU1eB+5rLv7lOVM0UMs 5jYG+L2Fs2NcOE3ezqsXzF8ZSVI2DxJg0ctPT24oKasn0WrIbtm9yBXNtJhsO+wf48tQv7yR25H1w A2E/e8g3cKImvO47diCQ2ggxChcYbFiEu+caxvSb4jHhPYhUgB0cijR4449MA9iJEmO2SsWjzvA65 PWdlg+T7sZ30+mfYOqrMpdi15sXunojfvBIpw2MZ5t83JJVKiI1ufAF3C4riJ9DOujMSGzgU/F9kt qUYrhaIg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:57594) 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 1nPN3u-0002Kq-9x; Wed, 02 Mar 2022 11:22:30 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nPN3t-00085p-8J; Wed, 02 Mar 2022 11:22:29 +0000 Date: Wed, 2 Mar 2022 11:22:29 +0000 From: "Russell King (Oracle)" To: Ard Biesheuvel Cc: Corentin Labbe , Linus Walleij , Arnd Bergmann , Linux ARM , Linux Kernel Mailing List Subject: Re: boot flooded with unwind: Index not found Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 02, 2022 at 12:19:40PM +0100, Ard Biesheuvel wrote: > On Wed, 2 Mar 2022 at 12:12, Russell King (Oracle) > wrote: > > > > On Wed, Mar 02, 2022 at 11:09:49AM +0100, Corentin Labbe wrote: > > > The crash disappeared (but the suspicious RCU usage is still here). > > > > As the trace on those is: > > > > [ 0.239629] unwind_backtrace from show_stack+0x10/0x14 > > [ 0.239654] show_stack from init_stack+0x1c54/0x2000 > > > > unwind_backtrace() and show_stack() are both C code, the compiler will > > emit the unwind information for it. show_stack() isn't called from > > assembly code, only from C code, so the next function's unwind > > information should also be generated by the compiler. > > > > However, init_stack is not a function - it's an array of unsigned long. > > There is no way this should appear in the trace, and this suggests that > > the unwind of show_stack() has gone wrong. > > > > I don't see anything obvious in Ard's changes that would cause that > > though. > > > > Did it used to work fine with previous versions of linux-next - those > > versions where we had Ard's "arm-vmap-stacks-v6" tag merged in > > (commit 2fa394824493) and did this only appear when I merged > > "arm-ftrace-for-rmk" (commit 74aaaa1e9bba) ? Did merging > > "arm-ftrace-for-rmk" cause any change in your .config? > > > > I can reproduce the RCU warnings, and I have tracked this down to the > change I made to return_address() for the graph tracer, which I > thought was justified after removing the call to > kernel_text_address(): > > --- a/arch/arm/include/asm/ftrace.h > +++ b/arch/arm/include/asm/ftrace.h > @@ -35,26 +35,8 @@ static inline unsigned long > ftrace_call_adjust(unsigned long addr) > > #ifndef __ASSEMBLY__ > > -#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) > -/* > - * return_address uses walk_stackframe to do it's work. If both > - * CONFIG_FRAME_POINTER=y and CONFIG_ARM_UNWIND=y walk_stackframe uses unwind > - * information. For this to work in the function tracer many functions would > - * have to be marked with __notrace. So for now just depend on > - * !CONFIG_ARM_UNWIND. > - */ > - > void *return_address(unsigned int); > > -#else > - > -static inline void *return_address(unsigned int level) > -{ > - return NULL; > -} > - > -#endif > - > #define ftrace_return_address(n) return_address(n) > > #define ARCH_HAS_SYSCALL_MATCH_SYM_NAME > > However, the function graph tracer works happily with this bit > reverted, and so that is probably the best course of action here. > > I have already sent the patch that reintroduces the > kernel_text_address() check - would you prefer a v2 of that one with > this change incorporated? Or a second patch that just reverts the > above? (Given that the bogus dereference was invoked from > return_address() as well, I suspect that this change would make the > get_kernel_nofault() change I proposed in this thread redundant) I'd prefer patches on top of my devel-stable branch, thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!