From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from confino.investici.org (confino.investici.org [93.190.126.19]) (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 B422B4369A for ; Sat, 11 Jul 2026 00:23:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.190.126.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783729385; cv=none; b=MRjoy38qYAcqCQJj3pqG7c6tlY8i7ROlDUOsiFzGyQUMQfkXRp+scLICnMV5U1Xar8/hYzKopm39wtqIjuOQdc6JIiSNZMD6A+3TP2rfQbaiMsyNLKq9Z5fLjjaeo9Bz5Wu4VYKF9zrqhOG5DbcvprQYylNMyaReraV7cwfK2Ko= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783729385; c=relaxed/simple; bh=D/Lcrt1J1X5KN62me+tUyGbETDwKwqWw/hDEIrt2Sfc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SC67rTcyDitmGNcLbsQsO4/UAN+GZ9/AGA9TGRiE5mK0B4aJpW1s8ShuF2ejWRmxfz75Lix5FHwlaB4br5W4v0hnM3ppr4tT2WCO9A45X8X3XvjhY4E/YRTiEhKOKqQB4I/cAXM0CVXPopR345pa/Tmq543nB/6ui7VKfDMNfCI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=grrlz.net; spf=pass smtp.mailfrom=grrlz.net; dkim=pass (1024-bit key) header.d=grrlz.net header.i=@grrlz.net header.b=RKhL+uzV; arc=none smtp.client-ip=93.190.126.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=grrlz.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=grrlz.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=grrlz.net header.i=@grrlz.net header.b="RKhL+uzV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=grrlz.net; s=stigmate; t=1783729374; bh=h1/C0u19jpgNp4s3/jhCeEGJz6fASb5yOysvDbFw75o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RKhL+uzVB0ZymgAknhMqADPyJVyjkAsbVfqIXUDyXoRxLl1hnmNnmsfxZFtpSCN7H 0rhMvCXaGikvuAsRGVl2/ZvW6F72BmnXaRkxUo1OzSlEZ6MkIVVdWgHYjPuAm8LEP/ iRZObIIgMg1FESckxliJNlqSwVDHTsnGxkxmxYRs= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4gxqCy4K0Hz114W; Sat, 11 Jul 2026 00:22:54 +0000 (UTC) Received: by mx1.investici.org (Postfix) id 4gxqCx6v7Pz113X; Sat, 11 Jul 2026 00:22:53 +0000 (UTC) From: Bradley Morgan To: akpm@linux-foundation.org Cc: baoquan.he@linux.dev, pmladek@suse.com, feng.tang@linux.alibaba.com, gregkh@linuxfoundation.org, arnd@arndb.de, corbet@lwn.net, rdunlap@infradead.org, gpiccoli@igalia.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, include@grrlz.net Subject: [RFC PATCH 2/4] panic: run the pre kdump list before crash kexec Date: Sat, 11 Jul 2026 00:22:51 +0000 Message-ID: <20260711002253.1115-3-include@grrlz.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260711002253.1115-1-include@grrlz.net> References: <20260711002253.1115-1-include@grrlz.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Call the new list unconditionally in vpanic, right before the early crash kexec. The legacy list, crash_kexec_post_notifiers and the cpu shutdown sequence are untouched. Also note in the kernel parameters entry that the option has no effect on the pre kdump list. Signed-off-by: Bradley Morgan --- Documentation/admin-guide/kernel-parameters.txt | 3 +++ kernel/panic.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index b5493a7f8f22..a77ecf3bd564 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -1042,6 +1042,9 @@ Kernel parameters or extra data dumped by panic_print. Note that some configurations enable this option unconditionally, like Hyper-V, PowerPC (fadump) and AMD SEV-SNP. + This option does not affect the pre kdump notifier + list (see include/linux/panic_notifier.h), which + always runs before the jump to the kdump kernel. crashkernel=size[KMG][@offset[KMG]] [KNL,EARLY] Using kexec, Linux can switch to a 'crash kernel' diff --git a/kernel/panic.c b/kernel/panic.c index 94ce7a94f118..f9ad0250da67 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -664,6 +664,13 @@ void vpanic(const char *fmt, va_list args) */ kgdb_panic(buf); + /* + * Tell the hypervisor or firmware about the panic. This runs on + * every panic, before a potential crash kexec, so the upcall is + * not lost when a crash kernel is loaded. + */ + panic_pre_kdump_notify(buf); + /* * If we have crashed and we have a crash kernel loaded let it handle * everything else. -- 2.53.0