From patchwork Mon Jul 22 03:56:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13738232 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 BFCAEC3DA59 for ; Mon, 22 Jul 2024 03:52:40 +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:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DQTUMYww0IPXvqo1WSqm2oV9jL9bQc7Pif3z7dF36kQ=; b=HNruSwCefByQfQ EULR7vyIZZRS4et5K9kv4SZKCx9KE1mXfdaF8knaDCeEdkp+82oBX8MA49nxDPbMMN9MWzaceEmd6 Z/h1wY+6TMr3fJcAP95xT093fB5jpq/tQJAaoi9BVto8HTQbTX/d7pMcmZx/Rc01bY1BOJr2mrIzO yZ/APs/xdH0SX3w9+fr5VTwKzVgV5JH+FAaJmDO0Q9ResXwV56pOnRNno0VSjARESRpBKh9R7CXD5 0Sm2Y3CRhBJlYPplQwG+SOS20SiynfClM2pgqGLdYFlWgj6br4LUx7nIo+3lwzj4gEdyKJwelz2+O 3S3krT5+G2Dd7SYKrDgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVk6H-00000008Evw-0WYV; Mon, 22 Jul 2024 03:52:37 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVk5t-00000008EnE-1aVL; Mon, 22 Jul 2024 03:52:15 +0000 Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4WS5p80pm5z1X4Xv; Mon, 22 Jul 2024 11:47:44 +0800 (CST) Received: from kwepemi100008.china.huawei.com (unknown [7.221.188.57]) by mail.maildlp.com (Postfix) with ESMTPS id 44DAD1A016C; Mon, 22 Jul 2024 11:52:07 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi100008.china.huawei.com (7.221.188.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 22 Jul 2024 11:52:06 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Subject: [PATCH v4 0/3] crash: Fix crash memory reserve exceed system memory bug Date: Mon, 22 Jul 2024 11:56:58 +0800 Message-ID: <20240722035701.696874-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi100008.china.huawei.com (7.221.188.57) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240721_205213_611283_13BCBBF7 X-CRM114-Status: UNSURE ( 7.15 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On x86_32, arm32 and riscv32, the crash memory reserve may exceed system memory and display "reserved ok", fix it. changes in v4: - Update the warn info to align with parse_crashkernel_mem(). - Rebased on the "ARM: Use generic interface to simplify crashkernel reservation" patch. - Also fix for riscv32. - Update the commit message. changes in v3: - Handle the check in reserve_crashkernel() Baoquan suggested. - Split x86_32 and arm32. - Add Suggested-by. - Drop the wrong fix tag. changes in v2: - Also fix for x86_32. - Update the fix method. - Peel off the other two patches. - Update the commit message. Jinjie Ruan (3): x86/kexec: Fix crash memory reserve exceed system memory bug ARM: Fix crash memory reserve exceed system memory bug riscv: kdump: Fix crash memory reserve exceed system memory bug arch/arm/kernel/setup.c | 5 +++++ arch/riscv/mm/init.c | 5 +++++ arch/x86/kernel/setup.c | 5 +++++ 3 files changed, 15 insertions(+)