public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vmcoreinfo: make hwerr_data visible for debugging
@ 2026-01-21 11:05 Breno Leitao
  2026-01-21 20:27 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Breno Leitao @ 2026-01-21 11:05 UTC (permalink / raw)
  To: akpm, bhe
  Cc: vgoyal, dyoung, xueshuai, tony.luck, linux-kernel, osandov,
	kernel-team, Breno Leitao

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.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 kernel/vmcore_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/vmcore_info.c b/kernel/vmcore_info.c
index 22b3205dd4dc5..1f42818f77cef 100644
--- a/kernel/vmcore_info.c
+++ b/kernel/vmcore_info.c
@@ -36,7 +36,7 @@ struct hwerr_info {
 	time64_t timestamp;
 };
 
-static struct hwerr_info hwerr_data[HWERR_RECOV_MAX];
+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)

---
base-commit: 053966c344dbd346e71305f530e91ea77916189f
change-id: 20260121-fix_vmcoreinfo-01592f705a77

Best regards,
--  
Breno Leitao <leitao@debian.org>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-22 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-21 11:05 [PATCH] vmcoreinfo: make hwerr_data visible for debugging Breno Leitao
2026-01-21 20:27 ` Andrew Morton
2026-01-22 10:22   ` Breno Leitao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox