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: <3fee6c8b-efa8-45a3-b0b8-07428f2a20c9@kernel.org>
Date: Wed, 21 Jan 2026 16:06:35 -0600
From: "Mario Limonciello (AMD) (kernel.org)" <superm1@...nel.org>
To: Yazen Ghannam <yazen.ghannam@....com>
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 1/21/2026 3:30 PM, Yazen Ghannam wrote:
> 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

Got it; thanks for clarifying.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ