Messages in this thread | | | Date | Fri, 3 May 2024 11:56:30 +0200 | From | Jean Delvare <> | Subject | Re: [PATCH] firmware: dmi: Change size of dmi_ids_string[] to 256 |
| |
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
| |