From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout03.his.huawei.com (canpmsgout03.his.huawei.com [113.46.200.218]) (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 867E136EA98 for ; Tue, 11 Aug 2026 13:05:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786453551; cv=none; b=dg6RFAYQA6IPsFYWWgjcH7jCgXu9Nvm4EwWr7lx55nU9OE89q6B+8YLlLwCYABp9qiII12hDl5vQ8kIuxqNc6IQa2Lvpvt6Gu+k4kaCrMUV45+fw2WYeuj155l5FJnlQbMJhDpZJzbsl7WXWdlRvXEvs9KfOCvkhoGV4f/Bww9M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786453551; c=relaxed/simple; bh=td/JY650qZ2Bbrj1FASuv6c12RmdPchTEmW8IpkxbDc=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=MJqtuvsroa4C6Z1zvtR7IS+X5SWo6qKp7rYjUmTRY/IcLpfhdgV4d7MyzPhZfcTOhyRfeQR85CHsInJV/EkONgigzcAfaRCY/PW/JM0l1oQx+KXkWFTGm41PlZrtmhg53hbjYgCvvke2cGNzI6by1GkS2sZ/mmH0IVgUWXAO5vc= 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=068x4Nd7; arc=none smtp.client-ip=113.46.200.218 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="068x4Nd7" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=PyT7L9VvlAwN00Tq2hdXOPPcmRRnmrYvQNotKzwnFa0=; b=068x4Nd7d2fYkpSHOXDCfE8Y9ULsM6ZIFire76TbWvVgpXtlTXFvthl3A7Q9zsqjMd/qOjsCT A5ByliDQVUBcqDHtada/NarmfbvnaLwfhzzNMC+R2C4+GagAEQpWe4RlNhqnWIOM9PiqkAuDnTj d0yNAKp0SmRpNQu9pofiKf0= Received: from mail.maildlp.com (unknown [172.19.162.144]) by canpmsgout03.his.huawei.com (SkyGuard) with ESMTPS id 4hKBRK6QXkzpSvB; Tue, 11 Aug 2026 20:54:53 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id 0687D40538; Tue, 11 Aug 2026 21:05:36 +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; Tue, 11 Aug 2026 21:05:32 +0800 Message-ID: <8e548d5e-8d80-4ef2-961f-2bcaa7907b8a@huawei.com> Date: Tue, 11 Aug 2026 21:05:30 +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 v2 0/5] arm64: crash: Add crash hotplug support To: , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20260729031235.2840255-1-ruanjinjie@huawei.com> From: Jinjie Ruan In-Reply-To: <20260729031235.2840255-1-ruanjinjie@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: kwepems200002.china.huawei.com (7.221.188.68) To dggpemf500011.china.huawei.com (7.185.36.131) 在 2026/7/29 11:12, Jinjie Ruan 写道: > 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. > > As Baoquan suggested, it also addresses and fixes several > pre-existing code issues and Sashiko AI review findings extracted > from the previous patch set. > > The major improvements and fixes included in this series are: > - Fix several memory leaks for arm64. > - Simplify arm64 load_other_segments(). > - Implement infrastructure for arm64 crash memory hotplug support. Hi all, I'd like to ask if anyone has any suggestions for improvement? > > This patch set is rebased on liveupdate/crashkernel-cma. > > Link: https://lore.kernel.org/all/20260601094805.2928614-1-ruanjinjie@huawei.com/ > > Changes in v2: > - Split out Powerpc bugfix patch as Mike suggested. > - Use phys_to_virt() instead of __va() in update_crash_elfcorehdr(). > - Convert pnum_hdr_sz() to a function. > - Only assign elfcorehdr_index after kexec_add_buffer succeeds, considering > crash_handle_hotplug_event() already performs validity check on > elfcorehdr_index: > - We can safely remove the check for CPU hotplug > in arch_crash_handle_hotplug_event(). > - The elfcorehdr_index's segment mem will be valid in > update_crash_elfcorehdr(), so we can safely remove the NULL check. > - Simplify the commit message. > - v1: https://lore.kernel.org/all/20260723131242.1537633-1-ruanjinjie@huawei.com/#t > > Jinjie Ruan (5): > 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 in 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 | 16 +++ > arch/arm64/kernel/Makefile | 2 +- > arch/arm64/kernel/crash.c | 143 +++++++++++++++++++++++++ > arch/arm64/kernel/kexec_image.c | 1 + > arch/arm64/kernel/machine_kexec_file.c | 78 +++++++------- > include/linux/kexec.h | 2 + > kernel/kexec_core.c | 25 +++-- > 8 files changed, 216 insertions(+), 54 deletions(-) > create mode 100644 arch/arm64/kernel/crash.c >