lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20260121122747.0e169a554e6d94abcb3e6307@linux-foundation.org>
Date: Wed, 21 Jan 2026 12:27:47 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Breno Leitao <leitao@...ian.org>
Cc: bhe@...hat.com, vgoyal@...hat.com, dyoung@...hat.com,
 xueshuai@...ux.alibaba.com, tony.luck@...el.com,
 linux-kernel@...r.kernel.org, osandov@...ndov.com, kernel-team@...a.com
Subject: Re: [PATCH] vmcoreinfo: make hwerr_data visible for debugging

On Wed, 21 Jan 2026 03:05:44 -0800 Breno Leitao <leitao@...ian.org> wrote:

> 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.
> 
> --- 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)
> 

A non-static symbol which has no external references will be made
static again by those who like to send in little fixups.  A comment
will help prevent that.  How's this?


--- a/kernel/vmcore_info.c~vmcoreinfo-make-hwerr_data-visible-for-debugging-fix
+++ a/kernel/vmcore_info.c
@@ -36,6 +36,7 @@ struct hwerr_info {
 	time64_t timestamp;
 };
 
+/* hwerr_data[] has global scope to make it available in vmcoreinfo under LTO */
 struct hwerr_info hwerr_data[HWERR_RECOV_MAX];
 
 Elf_Word *append_elf_note(Elf_Word *buf, char *name, unsigned int type,
_


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ