From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0308D606A337 for ; Sun, 22 Nov 2026 16:30:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=uPW2bwga; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ghF7CWUM 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-Unsubscribe-Post:List-Owner; bh=9DRyJzfEMHeaq8GMrFsleZ42XVYD1V/7mj4AkPTGjL8=; b=uPW2bwgatJk4TZMzWAiaI0yrfv P4glbuQlwiu0JWz+3npH5qFKXtb3Z5KsIaCy8Yw8XCBxmSjj/ebEjLBYTguB1hmgPg4n0dsQMS/wk WUbHkOoYqiFvTZGuV6MAcPmSIar+PoEjOi3Pzd6/2QS7ZY4p//E24lv24R6JWiOgQdYJNBkjSmUSF IEAzXyY84iCrNtG4Rkq248VjaJTeq7eiHVR/J+xfpwVTDh0a4SH2dBSiyWH+4qisw7gJ0NiblssM7 jVBFYeavVAKVcsrFxkwixum+7TtM8LQcEmccyWHw2ZBrszaC/m77AtOW4W36hOy2LsafHYQco0AhK W96sviTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xVASQ-00000001MOZ-2FFR; Sun, 22 Nov 2026 16:30:26 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xVASN-00000001MNz-2j6q; Sun, 22 Nov 2026 16:30:24 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 0821341709; Sun, 22 Nov 2026 16:30:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD7601F000C6; Sun, 22 Nov 2026 16:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795365022; bh=KzrVEQ03EK5eu+7tSDtmCyEtJgI25e3+3defglUPBK0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=ghF7CWUMVugPxg90sHHKYEuZ3yfSWM233Kz7XPmsYFNoH8ePGcEbFvq+3tjJvwARM C31VtR89lcPiYAdWjzKHdq0uDAHG0vykVegt4OhFNQAnrE9uc50dm2/ucEFtc5H307 z9ipHD7izlqUI7oLV3OzY3TPmA/V3FAinMcG70EnZV5PW+Nz27ECsoIn64+Qm3lyw9 amEOLkCTcLr+6CNiqBmmK1pi+RiViiPRpGmeCK4JtyQb1BwsjhkhXR9GQzDryKfCTA 74r2U3LJpqelptWe/c0EjDwCDfzMsxk2zPAFgvuXvS4X18hw1f6OC+2XCKwWbk4SkB aiusnbaFYdUvg== Date: Sun, 22 Nov 2026 18:30:15 +0200 From: Mike Rapoport To: Bradley Morgan Cc: fparola@amazon.de, akpm@linux-foundation.org, alex@ghiti.fr, aou@eecs.berkeley.edu, baoquan.he@linux.dev, kexec@lists.infradead.org, linux-riscv@lists.infradead.org, nh-open-source@amazon.com, palmer@dabbelt.com, pasha.tatashin@soleen.com, pjw@kernel.org, pratyush@kernel.org, stable@vger.kernel.org, thunder.leizhen@huawei.com Subject: Re: [PATCH] crash: Fix crash memory reserve dead loop when low and high limits match Message-ID: References: <20261119093730.49471-1-fparola@amazon.de> X-Archived-By: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi, On Thu, Nov 19, 2026 at 04:07:41PM +0000, Bradley Morgan wrote: > On 19 November 2026 09:37:27 GMT, Federico Parola > wrote: > >On arm64 with neither CONFIG_ZONE_DMA nor CONFIG_ZONE_DMA32, > >arm64_dma_phys_limit is PHYS_MASK + 1, so CRASH_ADDR_LOW_MAX equals > >CRASH_ADDR_HIGH_MAX. If the first crashkernel=size[KMG] attempt fails, > >reserve_crashkernel_generic() falls back to [CRASH_ADDR_LOW_MAX, > >CRASH_ADDR_HIGH_MAX), which is empty. That attempt fails too, and since > >search_end still equals CRASH_ADDR_LOW_MAX the fallback is taken again, > >forever. Boot stalls after the "Initmem setup" messages. This is really hard to read :/ > > > >The first attempt can fail on a kexec handover (KHO) boot, where early > >allocations are confined to the KHO scratch areas. > > > >Commit edb907a61333 ("crash: fix riscv64 crash memory reserve dead > >loop") fixed the same loop for crashkernel=size[KMG],high. Skip the How is this related? > >fallback to high memory when there is none, so the reservation fails > >with "cannot allocate crashkernel" and boot continues. > > > >Fixes: 0ab97169aa05 ("crash_core: add generic function to do reservation") > >CC: stable@vger.kernel.org Do you see this in field or it's what some sort of analysis shows? > Oki. > > >Signed-off-by: Federico Parola > >--- > > kernel/crash_reserve.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > >diff --git a/kernel/crash_reserve.c b/kernel/crash_reserve.c > >index eee37a11380ce..1417b429b45c6 100644 > >--- a/kernel/crash_reserve.c > >+++ b/kernel/crash_reserve.c > >@@ -421,9 +421,11 @@ void __init reserve_crashkernel_generic(unsigned long long crash_size, > > /* > > * For crashkernel=size[KMG], if the first attempt was for > > * low memory, fall back to high memory, the minimum required > >- * low memory will be reserved later. > >+ * low memory will be reserved later. There is no high memory to > >+ * fall back to if CRASH_ADDR_LOW_MAX equals CRASH_ADDR_HIGH_MAX. > > */ > >- if (!high && search_end == CRASH_ADDR_LOW_MAX) { > >+ if (!high && search_end == CRASH_ADDR_LOW_MAX && > >+ CRASH_ADDR_LOW_MAX < CRASH_ADDR_HIGH_MAX) { > > Reviewed-by: Bradley Morgan > > > > search_end = CRASH_ADDR_HIGH_MAX; > > search_base = CRASH_ADDR_LOW_MAX; > > crash_low_size = DEFAULT_CRASH_KERNEL_LOW_SIZE; > > > > --- Thanks! -- Sincerely yours, Mike. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv