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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260121213030.GA1992440@yaz-khff2.amd.com>
Date: Wed, 21 Jan 2026 16:30:30 -0500
From: Yazen Ghannam <yazen.ghannam@....com>
To: Mario Limonciello <superm1@...nel.org>
Cc: Jean Delvare <jdelvare@...e.com>, linux-kernel@...r.kernel.org,
	Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH v4 6/6] x86/CPU/AMD: Print AGESA string from DMI
 additional information entry

On Wed, Jan 21, 2026 at 02:50:49PM -0600, Mario Limonciello wrote:
> On 1/21/26 8:26 AM, Yazen Ghannam wrote:

[...]

> > > +	do {
> > > +		struct dmi_a_info_entry *entry;
> > > +		const char *string_ptr;
> > > +
> > > +		entry = (struct dmi_a_info_entry *)next;
> > > +
> > > +		/*
> > > +		 * Not much can be done to validate data. At least the entry
> > > +		 * length shouldn't be 0.
> > > +		 */
> > > +		if (!entry->length)
> > > +			return;
> > > +
> > > +		string_ptr = dmi_string_nosave(&info->header, entry->str_num);
> > > +
> > > +		/* Only one AGESA string is expected. */
> > > +		if (!strncmp(string_ptr, "AGESA", 5)) {
> > > +			pr_info("%s\n", string_ptr);
> > > +			break;
> > > +		}
> > > +

[...]

> > > +static inline const char *
> > > +	dmi_string_nosave(const struct dmi_header *dm, u8 s) { return dmi_empty_string; }
> > 
> > The dmi_empty_string needs to be moved to this header file from
> > dmi_scan.c.
> > 
> > Otherwise, there's a build issue as the test bot reported.
> > 
> > Thanks,
> > Yazen
> 
> I don't think it's actually appropriate to move dmi_empty_string in this
> case.  It's a static variable, shouldn't really be in a header.
> 
> I would think it's better to just return NULL.

dmi_string_nosave() should always return a string. The callers expect
it. That's why we don't need a NULL pointer check above.

 +static inline const char *
 +	dmi_string_nosave(const struct dmi_header *dm, u8 s) { return ""; }

Rather than move the variable, just return the empty string directly.

Thanks,
Yazen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ