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: Fri, 3 May 2024 11:56:30 +0200 [thread overview]
Message-ID: <20240503115630.520b2de2@endymion.delvare> (raw)
In-Reply-To: <3283ce46-86d8-ff87-440e-ee9811c9e77a@loongson.cn>
On Tue, 30 Apr 2024 22:49:46 +0800, Tiezhu Yang wrote:
> I did not find the string length of system vendor, product name,
> board name, BIOS version and BIOS date in the spec, I only see
> "There is no limit on the length of each individual text string."
> in "6.1.3 Text strings", so it may be better to increase the size
> to avoid the potential problems in theory at least.
There is indeed no limit to individual string length, nor to the total
length of the string section of a DMI table entry. The only limit is
for the overall table, and that theoretical limit is 4 GB. This isn't a
reasonable size for dmi_ids_string[].
This is the reason why the size of dmi_ids_string[] is based on
real-world samples and I will only increase it if a production-grade
product has strings which do not fit within the current limit.
Note that nothing really bad will happen when the strings do not fit,
they will be simply clipped to the buffer size, and the same data can
be retrieved from sysfs or using the dmidecode user-space tool. So
there's no compelling reason to increase the buffer size in advance.
--
Jean Delvare
SUSE L3 Support
prev parent reply other threads:[~2024-05-03 9:56 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
2024-04-30 14:49 ` Tiezhu Yang
2024-05-03 9:56 ` Jean Delvare [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=20240503115630.520b2de2@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®