Skip to contentSkip to conversation

vmcoreinfo-make-hwerr_data-visible-for-debugging.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Jan 27

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: vmcoreinfo: make hwerr_data visible for debugging
has been removed from the -mm tree. Its filename was
vmcoreinfo-make-hwerr_data-visible-for-debugging.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Breno Leitao <[email protected]>
Subject: vmcoreinfo: make hwerr_data visible for debugging
Date: Thu, 22 Jan 2026 02:39:36 -0800

If the kernel is compiled with LTO, hwerr_data symbol might be lost, and vmcoreinfo doesn't have it dumped. This is currently seen in some production kernels with LTO enabled.

Remove the static qualifier from hwerr_data so that the information is still preserved when the kernel is built with LTO. Making hwerr_data a global symbol ensures its debug info survives the LTO link process and appears in kallsyms. Also document it, so it doesn't get removed in the future as suggested by akpm.

Fixes 3fa805c37dd4 ("vmcoreinfo: track and log recoverable hardware errors")
Cc Dave Young <[email protected]>
Cc "Luck, Tony" <[email protected]>
Cc Omar Sandoval <[email protected]>
Cc Shuai Xue <[email protected]>
Cc Vivek Goyal <[email protected]>
Cc Zhiquan Li <[email protected]>

---

 kernel/vmcore_info.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
kernel/vmcore_info.c renamed from kernel/vmcore_info.c~vmcoreinfo-make-hwerr_data-visible-for-debugging +5 -1
@@ -36,7 +36,11 @@ struct hwerr_info {
 	time64_t timestamp;
 };
 
-static struct hwerr_info hwerr_data[HWERR_RECOV_MAX];
+/*
+ * The hwerr_data[] array is declared with global scope so that it remains
+ * accessible to vmcoreinfo even when Link Time Optimization (LTO) is enabled.
+ */
+struct hwerr_info hwerr_data[HWERR_RECOV_MAX];
 
 Elf_Word *append_elf_note(Elf_Word *buf, char *name, unsigned int type,
 			  void *data, size_t data_len)

_

Patches currently in -mm which might be from [email protected] are