From: Breno Leitao <leitao@debian.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: bhe@redhat.com, vgoyal@redhat.com, dyoung@redhat.com,
xueshuai@linux.alibaba.com, tony.luck@intel.com,
linux-kernel@vger.kernel.org, osandov@osandov.com,
kernel-team@meta.com
Subject: Re: [PATCH] vmcoreinfo: make hwerr_data visible for debugging
Date: Thu, 22 Jan 2026 02:22:12 -0800 [thread overview]
Message-ID: <aXH6OFWcFBvJG86V@gmail.com> (raw)
In-Reply-To: <20260121122747.0e169a554e6d94abcb3e6307@linux-foundation.org>
Hello Andrew,
On Wed, Jan 21, 2026 at 12:27:47PM -0800, Andrew Morton wrote:
> On Wed, 21 Jan 2026 03:05:44 -0800 Breno Leitao <leitao@debian.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?
very good point, I will update.
Thanks
--breno
prev parent reply other threads:[~2026-01-22 10:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aXH6OFWcFBvJG86V@gmail.com \
--to=leitao@debian.org \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=dyoung@redhat.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=osandov@osandov.com \
--cc=tony.luck@intel.com \
--cc=vgoyal@redhat.com \
--cc=xueshuai@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox