From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.226 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794981720; b=BLB4aziTswr5ofT+K5PzIiPjJx9iQZ43rzR0bmrBDDHx15MuWgQuXKDYouJk/kNVJLnu E/uZ55yZJ3/Y/gbUHPkwiFwOUxp2s/bU0W0WBN8LVAXNxZZtGFIkUgLGfAmIWTkK1hM2n WR+gpOlKXi9SqLva0/BAUnrm5uJ6Nxsy9eJqWCM1887TYGwgg1aK7Tfhgb4HqRhYlg6UE KVtMigkb2fIeoqBVTjJ5VlNToW1RXTzIHWjrNd5L3qraqE9IKCENabZQBffWMlaS2osVs C4D+tPzQddAHEFEX4G/D4KIHnoIsUWoxps1j9MwFtaVKWXKqYQj+dUkMUBDoejoqYDw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794981720; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:X-Relaying-Domain: X-CFilter-Loop:Received:DKIM-Signature:X-Forwarded-Encrypted: X-Received:X-Received:Received:From:To:Cc:Subject:Date:Message-ID: X-Mailer:MIME-Version:Content-Transfer-Encoding: X-DetectorID-Processed; bh=AxEJOEfcnyLje8ZmMvx2AZyT7iZftuKYAFChF/A8Hek=; b=peFceIFptIvV5JNyAz1EVRLaLOav7xXt2jF7mKtjZRN3dUV6otu67ueOmhEKSt4/iR4+ CIuabCTTavKdcwwsFt/kINtqh7U1WVnnVIfhKfH9y+0mMM3zjz0KKe2fOMo0s7/bRpLKa MuP1xp41gp5ItOqswyAuJZefLPXtcMgv89PTlqzMge87o/eMbQMQ9ZtNoT4w37q3cX5sX cpZwss5+VTNnTptZ+hTrRHZ3JY24/egSowX6FQRPdtnkRbRuwJtaUoLbCi/OHVsY0BO8A NgtpYZdLdahIhC/La/Naw3Qr5yMQN+ApDK2pLdD8h3PjvG1GIfx8UlykqCs9HpyKfZA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b="ci/9ZE/8"; arc=none smtp.remote-ip=209.85.215.226 Received: from mail-pg1-f226.google.com (mail-pg1-f226.google.com [209.85.215.226]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 891EE606A31C for ; Wed, 18 Nov 2026 06:01:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 891EE606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=ci/9ZE/8 Received: by mail-pg1-f226.google.com with SMTP id 41be03b00d2f7-cddc597d062so378751a12.3 for ; Tue, 17 Nov 2026 22:01:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794981719; x=1795586519; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=AxEJOEfcnyLje8ZmMvx2AZyT7iZftuKYAFChF/A8Hek=; b=WynsDdBhJhPQXdNZqOmmmXdjFY8myiLfM480zOa/JmXE211CJwxeawrnYKMKY/uvMj aJXP5kiT4x25G25lC9q/WruwYwyvViDJPLK41Cfic9EJHLAM02/uZNtZ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q5l4ELHx03OCQWY/npbveXyNyMPxuKJ5 A+9k/YzCaIehVf9BgknAePifPJzEdcbILOqbA= X-Received: by 2002:a17:90b:39a3:b0:3b0:d0c5:c10e with SMTP id 98e67ed59e1d1-3b3d07a2448mr1661745a91.17.1794981718514; Tue, 17 Nov 2026 22:01:58 -0800 (PST) Received: from smtp-us-east1-p01-i01-si01.dlp.protect.broadcom.com (address-144-49-247-123.dlp.protect.broadcom.com. [144.49.247.123]) by smtp-relay.gmail.com with ESMTPS id 98e67ed59e1d1-3b3abf029a5sm3554849a91.5.2026.11.17.22.01.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Nov 2026 22:01:58 -0800 (PST) X-Relaying-Domain: broadcom.com X-CFilter-Loop: Reflected Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-54af6c38092so7715311cf.0 for ; Tue, 17 Nov 2026 22:01:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1794981717; x=1795586517; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=AxEJOEfcnyLje8ZmMvx2AZyT7iZftuKYAFChF/A8Hek=; b=ci/9ZE/8oUy0DnGALCTZx18M2qkIbySBizESJIfi3g0apXf5K34poXS71kcfmPea2v h+1k2mICI0s3t4DWoOGT9AuO6+rC2OrdTWyNNQMI1kHymfoyYsdKwpFQ3ki62lpoDScw yvhEEuLmy3k7PmLeiPe5sHfZzkcFR6q/jcros= X-Forwarded-Encrypted: i=1; AL+hErHW0F36JRR/T+h9+I+GkOoI8t2+xk5+fKkDT/STV9vd62C8tko5u+qqDTjDJNZkaY5VOpUcdDm9VC/NqxF5YQ==@lists.linux.dev X-Received: by 2002:ac8:6f0b:0:b0:54a:755d:6fcc with SMTP id d75a77b69052e-55d5a2c46b1mr26201511cf.4.1794981716703; Tue, 17 Nov 2026 22:01:56 -0800 (PST) X-Received: by 2002:ac8:6f0b:0:b0:54a:755d:6fcc with SMTP id d75a77b69052e-55d5a2c46b1mr26201071cf.4.1794981716159; Tue, 17 Nov 2026 22:01:56 -0800 (PST) Received: from vertex.localdomain (pool-173-49-113-140.phlapa.fios.verizon.net. [173.49.113.140]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-55d58ff0065sm14886841cf.5.2026.11.17.22.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2026 22:01:55 -0800 (PST) From: Zack Rusin To: Andrew Morton , Petr Mladek , Baoquan He , Mike Rapoport , Pasha Tatashin , Pratyush Yadav , Dave Young Cc: Borislav Petkov , Ajay Kaher , Alexey Makhalov , x86@kernel.org, Joel Granados , Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , virtualization@lists.linux.dev, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, John Ogness , Steven Rostedt , Sergey Senozhatsky , Kees Cook , Jonathan Corbet , Bo Gan , Brennan Lamoreaux , kexec@lists.infradead.org, linux-doc@vger.kernel.org, "Guilherme G. Piccoli" , Maaz Mombasawala , Shuah Khan , Randy Dunlap , Stephen Brennan , Michael Kelley , Ian Forbes , Bradley Morgan Subject: [PATCH v4 0/4] panic, x86/vmware: Preserve crash logs before kdump Date: Wed, 18 Nov 2026 01:01:47 -0500 Message-ID: X-Mailer: git-send-email 2.53.0 X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-DetectorID-Processed: b00c1d49-9d2e-4205-b15f-d015386d3d5e This series lets VMware guests copy the end of their kernel log to the host's vmware.log when they crash, before entering kdump. This preserves diagnostic information even if the guest cannot save its own logs or the crash dump fails. Using the existing panic notifier list for this would require crash_kexec_post_notifiers=1, which also runs unrelated callbacks before kdump. Following Petr's suggestion, v3 instead adds a separate platform panic notifier list for callbacks that need to run early. It runs before kdump and before stopping the other CPUs. It also covers fatal oopses that enter kdump without going through panic(). The callbacks run at most once, and the list can be disabled for debugging with disable_panic_notifiers_platform_list. crash_kexec_post_notifiers, the existing panic notifiers and the kmsg dumpers are unchanged. The VMware log sender is the first user. It uses a preallocated 8 KiB buffer and limits both the transfer size and the number of retries. Logging is enabled by default in ordinary guests; encrypted guests must opt in through kernel.vmware_record_panic_msg. The copy is best-effort: kdump and reboot do not depend on it succeeding. The separate VMware guest-crash notification, which can cause the host to terminate the VM, is a kmsg dumper registered late in boot, so it runs after the built-in log dumpers. It is suppressed while a crash kernel is loaded. Changes since v3: - Call the platform list before taking the kexec lock in __crash_kexec(), so a callback that panics on a direct crash_kexec() can still enter kdump (reported by Sashiko). - Rebase onto v7.4-rc3. Changes since v2: - Replace the pre-kdump list and postponement parameter with the platform list and a debugging switch to disable it. - Run the list in vpanic() before the other CPUs are stopped, instead of just before the kmsg dumpers. - Correct the sysctl documentation heading. - Rebase onto v7.4-rc1. Tested on x86-64 guests on VMware Workstation, ESXi (ordinary, SEV-SNP and TDX) and QEMU/KVM. Platform list proposal: https://lore.kernel.org/r/ateYxCu63pRY9EGq@pathway.suse.cz v3: https://lore.kernel.org/r/cover.1794201807.git.zack.rusin@broadcom.com v2: https://lore.kernel.org/r/cover.1790014793.git.zack.rusin@broadcom.com v1: https://lore.kernel.org/r/cover.1788414671.git.zack.rusin@broadcom.com Zack Rusin (4): panic: Add a platform panic notifier list x86/vmware: Add a bounded panic log sender x86/vmware: Add the vmware_record_panic_msg sysctl x86/vmware: Report guest crashes after kmsg dumpers .../admin-guide/kernel-parameters.txt | 12 + Documentation/admin-guide/sysctl/kernel.rst | 20 ++ arch/x86/include/asm/vmware.h | 2 + arch/x86/kernel/cpu/vmware.c | 250 ++++++++++++++++++ include/linux/panic_notifier.h | 3 + kernel/crash_core.c | 8 + kernel/panic.c | 51 ++++ 7 files changed, 346 insertions(+) base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3