From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout01.his.huawei.com (canpmsgout01.his.huawei.com [113.46.200.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D4FD2EDD70 for ; Mon, 27 Jul 2026 01:32:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.216 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785115948; cv=none; b=Gvj8aQxHabxIOK3C6gxooX1Flrc1mZ5hZkhtjzWokXCwlAM/A8/MbECiWBc56jF50N0V3eOHgX2VG8573099AnO9fa5GNkFpALRF8y+4iwnsKqFGp2oFkaL+U9q67SkqWZUruHQsKLBB6zP4pS+hmTNAYemI4ST19XHqqi+CwNA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785115948; c=relaxed/simple; bh=AxLgupzz5cGLL18HF7wcpnIm4ecMf5j8va0N2sclj7w=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=mHm45Y0D8kjHBw36mPrgmT6ruxG67oV3kWZ+grJo+Lt64+JSFHbBxsWB0rrJsVnioMREZ09cLfyP2mkVmLw/JFsxJTI/H4amJRHkiRu0NDiCN6QNm7HPlt2vbFNXkkK/vT0d72mmRa9Elru3KgJGc7fyYr3olLutV4IkBHkays8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=262EiEg4; arc=none smtp.client-ip=113.46.200.216 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="262EiEg4" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=C+DQuJXtADinBrFCl9u83kOzDJmpXPtN8cvR9o59Eeg=; b=262EiEg47p4Yk/QZEwB6ElVSigThJqHw96cWY80zBP43FBPhtya38MnR6k8zkROGFHzy6yINi VmQU9B2QODp5BZNQwkB/UZzVPFOlf+6R3I+hEhy8W0raS9PZQ8D8Tq6tpHNxUzlPziDZ0yz2cYQ jK1Y8tqKkMpnvedw+Kyyk2M= Received: from mail.maildlp.com (unknown [172.19.163.0]) by canpmsgout01.his.huawei.com (SkyGuard) with ESMTPS id 4h7gnh056nz1T4Fq; Mon, 27 Jul 2026 09:22:48 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id 37B8940561; Mon, 27 Jul 2026 09:32:15 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by dggpemf500011.china.huawei.com (7.185.36.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 27 Jul 2026 09:32:13 +0800 Message-ID: Date: Mon, 27 Jul 2026 09:32:12 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/8] arm64: crash: Add crash hotplug support To: Mike Rapoport CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20260723131242.1537633-1-ruanjinjie@huawei.com> From: Jinjie Ruan In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To dggpemf500011.china.huawei.com (7.185.36.131) 在 2026/7/26 15:10, Mike Rapoport 写道: > Hi Jinjie, > > On Thu, Jul 23, 2026 at 09:12:34PM +0800, Jinjie Ruan wrote: >> When CPU or memory hotplug events occur, the elfcorehdr in the kdump image >> becomes stale, potentially leading to incomplete crash dumps. >> >> Currently, userspace udev rules reload the entire kdump image upon such >> events, which is inefficient and leaves kdump inactive for a long time. >> >> Commit 247262756121 ("crash: add generic infrastructure for crash hotplug >> support") introduced a kernel mechanism to update only the elfcorehdr. >> This patch set implements crash hotplug support for arm64. >> >> It also addresses and fixes several critical pre-existing code issues >> and Sashiko AI review findings extracted from the previous patch set, >> following Baoquan's suggestions. >> >> The major improvements and fixes included in this series are: >> >> - Fix powerpc memory leak, null-ptr-def and overlapping memory >> range truncation bug. >> >> - Fix several memory leaks for arm64. >> >> - Simplify arm64 load_other_segments(). >> >> - Implement infrastructure for arm64 crash memory hotplug support. >> >> This patch set is rebased on liveupdate/crashkernel-cma. >> >> Link: https://lore.kernel.org/all/20260601094805.2928614-1-ruanjinjie@huawei.com/ >> >> Jinjie Ruan (8): >> powerpc/crash: Fix possible memory leak in update_crash_elfcorehdr() >> powerpc/kexec_file: Fix null-ptr-def in extra size calculation >> powerpc/kexec_file: Prevent kexec range truncation > > It's weird to see powerpc fixes in a series that adds a feature for arm64. > Judging by the subjects, they are completely unrelated to to crash support > for hotplug and should be sent as a separate set. Hi Mike, You are right, I'll rebase and post v2 shortly, and send the powerpc fixes as a standalone series. > >> kexec: Extract kexec_free_segment_cma() from kimage_free_cma() >> arm64: kexec_file: Fix CMA page leaks in segment placement retry loops >> arm64: kexec_file: Fix image->elf_headers memory leak during retry >> loop >> arm64: kexec_file: Simplify load_other_segments() >> arm64: crash: Add crash hotplug support >> >> arch/arm64/Kconfig | 3 + >> arch/arm64/include/asm/kexec.h | 13 +++ >> arch/arm64/kernel/Makefile | 2 +- >> arch/arm64/kernel/crash.c | 148 +++++++++++++++++++++++++ >> arch/arm64/kernel/kexec_image.c | 1 + >> arch/arm64/kernel/machine_kexec_file.c | 76 ++++++------- >> arch/powerpc/kexec/crash.c | 2 +- >> arch/powerpc/kexec/file_load_64.c | 2 +- >> arch/powerpc/kexec/ranges.c | 12 +- >> include/linux/kexec.h | 2 + >> kernel/kexec_core.c | 25 +++-- >> 11 files changed, 223 insertions(+), 63 deletions(-) >> create mode 100644 arch/arm64/kernel/crash.c >> >> -- >> 2.34.1 >> >