mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware: dmi: Change size of dmi_ids_string[] to 256
Date: Mon, 29 Apr 2024 14:44:42 +0200	[thread overview]
Message-ID: <20240429144442.472aa83c@endymion.delvare> (raw)
In-Reply-To: <1677030901-29326-1-git-send-email-yangtiezhu@loongson.cn>

Hi Tiezhu,

Sorry for the very late answer, somehow your messages slipped through
the cracks.

On Wed, 22 Feb 2023 09:55:01 +0800, Tiezhu Yang wrote:
> The current size of dmi_ids_string[] is 128, the BIOS date
> can not be seen if the total string length of system vendor,
> product name, board name, BIOS version and BIOS date is too
> long to over 128, it is better and enough to change size of
> dmi_ids_string[] to 256 for most cases.

In order to convince me that the size of this buffer needs to be
increased, one would have to provide a real world example with valid
DMI data where the output doesn't fit. However...

> Without this patch:
> 
> [    0.000000] DMI: Loongson Loongson-3A5000-7A1000-1w-A2101/Loongson-LS3A5000-7A1000-1w-A2101, BIOS vUDK2018-LoongArch-V4.0.05132-beta10 12/13/202
> 
> With this patch:
> 
> [    0.000000] DMI: Loongson Loongson-3A5000-7A1000-1w-A2101/Loongson-LS3A5000-7A1000-1w-A2101, BIOS vUDK2018-LoongArch-V4.0.05132-beta10 12/13/2022

This example is apparently taken from an engineering sample with rather
"low quality" strings or invalid string indexes. Specifically:
* The product name and the board name are the exact same string.
* Both duplicate the system vendor name ("Loongson").
* The BIOS version includes the architecture name "LoongArch", which
  seems unnecessarily verbose.

So my feeling is that the issue would be better addressed by fixing the
DMI data of your board than increasing the buffer size.

Do you have any production-grade DMI table with proper strings where
the buffer is still not large enough?

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2024-04-29 12:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  1:55 Tiezhu Yang
2024-04-29 12:44 ` Jean Delvare [this message]
2024-04-30 14:49   ` Tiezhu Yang
2024-05-03  9:56     ` Jean Delvare

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=20240429144442.472aa83c@endymion.delvare \
    --to=jdelvare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yangtiezhu@loongson.cn \
    /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

all inboxes | Powered by JetHome®