From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 078F53A4AAA for ; Thu, 22 Jan 2026 10:22:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769077355; cv=none; b=t+UdL8FRNroo/PHWFJMJWEl1QqnmQ7gvPllbdBIhRTHEqj4z4e9tVuEWys0saRMZ8zLyDTi1dgwd7opg289K5DbDs0wnKVl5nY4RPyfB35XiOqICYO3IxlB0lb5VTRUsLZtRVbNsrXrRWeUtQgYdw+JGqLCgfZRUiBFPj1dHnFg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769077355; c=relaxed/simple; bh=NLGKZ7FxhToyYH2eZNhFq6fbnX86m3C76M8ga5Xxlsw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=J79u5EzJMBLn9DZEtE/zwiWDxA299PqTgeosn4NWJS+33/yTzANtrEbQgeWpzy71Fx9tqbzzR9xOQy71H65Mt1NemqkE/RAAt4r6sDszssfQkpLdyalB6e9DIP92YhPetNbBLRS9jTQqUNizgBugluyHfFN5mbiXjm0m/87M8uA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=IgedCcNY; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="IgedCcNY" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Vw4QoLdKs0Pq0TxGkt9t4ckiPxzqr/7pJ54LAiIBlMQ=; b=IgedCcNYczHOc9JGadu9fP6H5C HE8gV+SQ2FqNMSEzIlS0En4SCjJUqqEuPSBLpDfwreVwF7JlyMenhyVNpcXM6uTqn8WYJ69tHeWGO Ba6sHaJHi53oXxnvHEYeXXL4qxAY9VrEAd4lslK7DT9rab+xZPmkspjRcDs3Nb9U5rVbkAzhMSKJu racLqyPTLD3JZB6sMWoF7T1j/gpNJLjaEpjEXCZU3xz0LVFa3yp03quvJYc0kA3mxN6zEbm3IXA0l 8qOLjZXCJrC/0DausfaEwxoqGi5qzKXRe2L718ejTrrPhrvLMYStqoqwKPSnSs5NmQHzq/H1pyo9I fhhX5BbQ==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1virpQ-00CwP9-LF; Thu, 22 Jan 2026 10:22:16 +0000 Date: Thu, 22 Jan 2026 02:22:12 -0800 From: Breno Leitao To: Andrew Morton 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 Message-ID: References: <20260121-fix_vmcoreinfo-v1-1-39e96fab670e@debian.org> <20260121122747.0e169a554e6d94abcb3e6307@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260121122747.0e169a554e6d94abcb3e6307@linux-foundation.org> X-Debian-User: leitao 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 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