From patchwork Wed Jul 17 07:54:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13735240 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 8328DC3DA4B for ; Wed, 17 Jul 2024 09:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=ftzjWLKcBhP1HQLUCWLNw1yWyGVW3ol1lFb8fh4c4IA=; b=oPQ1MDrCUa+G8T/FjfgOWKa4vs DjQ6IgMNxS+PBXntbOoFJO/legV0f4e1QhyCWURlrh6uiDKGAdtiYewUefXKn4wPeCY63eGJOLvHS ZBurGCa95PPB1G21drHZf6IHLILWKyK0vHL2JsXOOkTaB5uNRqLSpe1KJiQg4EmeO11X750yBAAI3 Q45C3uP50yToY6w5D1o9f/Ipr5w81Wha53mtn631HrIBfBkpNoQhuNTPt5dToXriOkwBd8Bh4pGxq 7TkI+P0hYHtuTz7u4HERCKgUonmS+n1ueDRBtAgFXjauqcgyyQvR1wBUtHUCihorz9wh8RcoFegxp sHMMWxyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sU0Wa-0000000DEK0-3FwT; Wed, 17 Jul 2024 09:00:36 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTzQG-0000000D1Z8-2uGa; Wed, 17 Jul 2024 07:50:17 +0000 Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4WP7Jx4hYXz2ClD7; Wed, 17 Jul 2024 15:45:37 +0800 (CST) Received: from kwepemi100008.china.huawei.com (unknown [7.221.188.57]) by mail.maildlp.com (Postfix) with ESMTPS id 30AD114037B; Wed, 17 Jul 2024 15:49:56 +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; Wed, 17 Jul 2024 15:49:55 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , , , , , CC: Subject: [PATCH -next v3 0/2] Fix crash memory reserve exceed system memory bug Date: Wed, 17 Jul 2024 15:54:37 +0800 Message-ID: <20240717075439.2705552-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: dggems702-chm.china.huawei.com (10.3.19.179) 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-20240717_005000_927481_513E8E34 X-CRM114-Status: UNSURE ( 6.02 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On x86_32 and arm32, the crash memory reserve may exceed system memory and display "reserved ok", fix it. 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 (2): x86/kexec: Fix crash memory reserve exceed system memory bug ARM: Fix crash memory reserve exceed system memory bug arch/arm/kernel/setup.c | 5 +++++ arch/x86/kernel/setup.c | 5 +++++ 2 files changed, 10 insertions(+)