Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp411305pxm; Wed, 2 Mar 2022 00:39:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7Pbgjp2ogfdX/fPxEb7FBxFZVH+btdtOvp9LQAxAz/g5rzjaljqIs8L6iu77kz9wAEznj X-Received: by 2002:a17:907:2d06:b0:6da:688d:9668 with SMTP id gs6-20020a1709072d0600b006da688d9668mr761411ejc.19.1646210348321; Wed, 02 Mar 2022 00:39:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646210348; cv=none; d=google.com; s=arc-20160816; b=PFAeRo3HMPjTusx/RFveVJA3Y1njcU9uzXClnPX1ICjad16otiRfqv88SIdvqU1dew GGBWNy+SP5XgP2PqjM6kPeVcg9eADYDptkjpsNa8nO2IlAqGKWoT1USDoDntgQtH9YPp eRBYdl/A6CiwFhtdfmO99r9xRrDhifkODKE0vMwhjvadgQn4XwA2JvBNd/oSxO8LUVXO 8HCt6pQRDDpPrLVdkjJKQ/d3AC9AA1qRiMMPsVlgXmQRufKWt/eEgNDBcskY/g8fRewz XQus+iSERbqOZkpcPcVIQeH1+mY1SJTT9Tj7+aYu5vT509cVwMzYsFZffCTi5E8Q7fnE U3uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5vExpZTO1FG5XzJRggKFfKsNP7WPwBxus67iNU51evI=; b=MeZMIkpadvX6f2tXYAYo50MX72YEi8xQbpT3t+yzShyuUO66xw6g78iZiH3ca9cbxs 0OPtRrU1rhN3+oByLTYUEOTrp2EwdLbYNK6BfsKJoUj0JOyW54GQ9KzD0vkiADEdaBwW W9L6YbkmPWjh5ctIdI+wFtnemE4YfqApLGse8U6uVZAeQH0uZ8xtN9pgcaCwnIILUlbo u3700JCNMlk0GW6YLfSu6Wd8piyk+c3rSf/S/VnK3/iz0sxbrcuxXtvv0xX6PF+cJ7Ac kQBOq5AJy7TF1Wxykuu8REFMBk4XANS3QygBSQrCdWkl2mDpU+OckUlstqf3d9WdB/a+ UBSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Cmp64ulM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bi14-20020a170906a24e00b006b87abe4b4esi9423933ejb.31.2022.03.02.00.38.44; Wed, 02 Mar 2022 00:39:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Cmp64ulM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233852AbiCAQxq (ORCPT + 99 others); Tue, 1 Mar 2022 11:53:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235367AbiCAQxj (ORCPT ); Tue, 1 Mar 2022 11:53:39 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5BB4427F6 for ; Tue, 1 Mar 2022 08:52:45 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4F9FC60F38 for ; Tue, 1 Mar 2022 16:52:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B10C1C340EE for ; Tue, 1 Mar 2022 16:52:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646153564; bh=1tHh3nhKSXOYQ2q6r97FYV9g+H4AjRshQvzrxNnBogU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Cmp64ulMygyV7CSU7d9NYmlRmC9dojzyFswq/07cTz61xgeDfpELD18roHgEyMwBb ltI5yP9WSu2jheQeLbUUHqyXA80rbAuUFlqhW+IAm+xmq7fLbKhmGYc9QNMf5UNb0l yc4wUBXLi0TIIqDqiOkhzrpvhl6tgUVG3pO8S/JwWKVY8vCi+oOY6aC8uuRLcnIsKs Z9E5PRKT3E9HSOxHhr1PozX6DfBUufEpru+K4FsUgXWU4EZUubAn2H2b/eFY+UHGFA /7RcSOYg/RjtcPpTIpi/MKCc1cBdGqNOZltmBaIvG68c+9yr31iITO3qLlRjIc31zd F4wx+Puk1b8AQ== Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-2dbd97f9bfcso33422077b3.9 for ; Tue, 01 Mar 2022 08:52:44 -0800 (PST) X-Gm-Message-State: AOAM530Eao6VutGc2ycJYD3tAJM0hYRYt9pbDlFXEuwZqB98hEPx0uMe HRJBBsuEkXg9EPcvOwcfwmDmR+gPwkYFSCaD1Zo= X-Received: by 2002:a0d:dfd5:0:b0:2cf:924b:105d with SMTP id i204-20020a0ddfd5000000b002cf924b105dmr26967912ywe.342.1646153563719; Tue, 01 Mar 2022 08:52:43 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ard Biesheuvel Date: Tue, 1 Mar 2022 17:52:30 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: boot flooded with unwind: Index not found To: "Russell King (Oracle)" Cc: Corentin Labbe , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Tue, 1 Mar 2022 at 17:37, Ard Biesheuvel wrote: > > On Tue, 1 Mar 2022 at 16:52, Russell King (Oracle) > wrote: > > > > On Tue, Mar 01, 2022 at 04:48:25PM +0100, Corentin Labbe wrote: > > > Hello > > > > > > I booted today linux-next (20220301) and my boot is flooded with: > > > [ 0.000000] unwind: Index not found c0f0c440 > > > [ 0.000000] unwind: Index not found 00000000 > > > [ 0.000000] unwind: Index not found c0f0c440 > > > [ 0.000000] unwind: Index not found 00000000 > > > > > > This happen on a sun8i-a83t-bananapi-m3 > > > > Have you enabled vmapped stacks? > > > > This is probably related to > > 538b9265c063 ARM: unwind: track location of LR value in stack frame > > which removes a kernel_text_address() check on frame->pc as it is > essentially redundant, given that we won't find unwind data otherwise. > Unfortunately, I failed to realise that the other check carries a > pr_warn(), which may apparently fire spuriously in some cases. > > The 0x0 value can easily be filtered out, but i would be interesting > where the other value originates from. We might be able to solve this > with a simple .nounwind directive in a asm routine somewhere. > > I'll prepare a patch that disregards the 0x0 value - could you check > in the mean time what the address 0xcf0c440 coincides with in your > build? Something like the below should restore the previous behavior, while taking the kernel_text_address() check out of the hot path. --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c @@ -400,7 +400,8 @@ int unwind_frame(struct stackframe *frame) idx = unwind_find_idx(frame->pc); if (!idx) { - pr_warn("unwind: Index not found %08lx\n", frame->pc); + if (frame->pc && kernel_text_address(frame->pc)) + pr_warn("unwind: Index not found %08lx\n", frame->pc); return -URC_FAILURE; }