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 E9F07C5479D for ; Wed, 11 Jan 2023 21:19:30 +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=QwhbcCSWph98RMjcJ040XJQpq+UXwwleGUSEmnMKXng=; b=CMZWiodY6OYTxV Ys/Z1JipVAaXMF8+eG2zqrNSAq2eCjvuJ2rAb/ldDM0owjiZdVB+ILu9ln2uY4LMc8YvtDOUH4svY 1XJUrrV4BaSppWMcpL3mXrFLJCay3/auK5K+mQSOeUr6QgYgCY//pRYti6vJt+gtapG0DyA7ee17n 6BohA+Ki/msVxeYqO2Jvd2mFCtu7PxWmPHG7jxG1Hu0oH7fRSdoDZsD0qQ5YTI9/rJ+vJecxDlWWj Ge2y1lgkCPpCm78nRiXbx1iqGj5FNipHO12MyHR7aqViE6KPv4f+qftfCZyxKBMoODDQkT7AXt9uj 6lWWGSS5Y7M/mLhleRhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFiUS-00Cxwg-2Z; Wed, 11 Jan 2023 21:18:32 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFiUO-00CxvQ-NX for linux-arm-kernel@lists.infradead.org; Wed, 11 Jan 2023 21:18:30 +0000 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 9799661EC6; Wed, 11 Jan 2023 21:18:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E990C433D2; Wed, 11 Jan 2023 21:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673471907; bh=gE7iiQqZo4EDwR53HuYYitcV2oTBz3bJ4nXSfMJJo5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ULZGowEsOaE6Gr3qQoM1M5xBd+3x09nQ7c9yB4Ykqrdvj4gBuItp7an6WM8PajB4a Gj8N6Y2KByHelHOGgtW+7CHPGadC7GQNmgdFwajA72Yhxs1vG9TgCedj1CyV4zEzPK WK1yzjAMg6qdFwAhnlTkGeSTOnMDD3R7Bzi0BX74dkkoh+55F04D+Pu4cX+N46DLai 1BGMBJ9lq6xoXaBtKF0FfUDBEfABru6AB84Ka9cpbIlERVIbPrESxJR5TFwYDVBNaU 5/XrERgtSkDVpUa8GfywMGuxVZw4p4LLGzbkb3fUK1JKhWj8ITYZRe0zD57rA4PCI7 NK2AsuB/V6Obw== Date: Wed, 11 Jan 2023 14:18:24 -0700 From: Nathan Chancellor To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, will@kernel.org, catalin.marinas@arm.com, Mark Rutland , Lee Jones , llvm@lists.linux.dev Subject: Re: [PATCH v3 2/2] arm64: efi: Account for the EFI runtime stack in stack unwinder Message-ID: References: <20230106174703.1883495-1-ardb@kernel.org> <20230106174703.1883495-3-ardb@kernel.org> 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-20230111_131828_862408_CCAD3E0C X-CRM114-Status: GOOD ( 26.48 ) 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 Ard, On Wed, Jan 11, 2023 at 09:45:32AM +0100, Ard Biesheuvel wrote: > On Tue, 10 Jan 2023 at 21:48, Nathan Chancellor wrote: > > On Fri, Jan 06, 2023 at 06:47:03PM +0100, Ard Biesheuvel wrote: > > > The EFI runtime services run from a dedicated stack now, and so the > > > stack unwinder needs to be informed about this. > > > > > > Acked-by: Mark Rutland > > > Signed-off-by: Ard Biesheuvel > > > > Apologies if this has been reported and/or fixed already, I searched > > lore and did not find anything but I just bisected a QEMU boot hang [1] > > that we see in the ClangBuiltLinux CI with Fedora's configuration [2] to > > this change in next-20220110 as commit a7334dc70496 ("arm64: efi: > > Account for the EFI runtime stack in stack unwinder"). > > > > Thanks for the report. This is due to an oversight on my part: we > removed a spin_is_locked() check, and the lock in question can only be > in the locked state when EFI runtime services are enabled to begin > with. > > Without the lock check, we may end up dereferencing the uninitialized > efi_rt_stack_top on non-EFI boots. > > I've fixed this up in the EFI fixes tree, so the issue should > disappear once -next is updated. (We just missed 20230111 > unfortunately) Thank you for the quick response! That issue appears to be fixed. Unfortunately, I am still seeing a hang while booting via EFI on either bare metal or KVM when CONFIG_DEBUG_PREEMPT is enabled (Fedora's rawhide config appears to enable several debugging options), so it appears I was seeing two distinct issues :/ defconfig + CONFIG_DEBUG_PREEMPT=y is enough for me to reproduce this problem. I see [ 0.015382] Remapping and enabling EFI services. as the last line in the console (via earlycon) with the bad kernel and nothing after it (I assume we deadlock somewhere or hit a BUG_ON()?), vs [ 0.015191] Remapping and enabling EFI services. [ 0.016725] smp: Bringing up secondary CPUs ... on the good kernel, followed by a normal boot. Sorry for not noticing this sooner! It should be pretty easy to reproduce but if there is any other information I can provide, I am more than happy to do so. Cheers, Nathan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel