Wed 14 Oct 2015 01:21:52 PM UTC, comment #4:
Thanks for attaching all the files. I have looked at the binary dump and it turns out that DMI records 0x0029, 0x002A and 0x002B in your DMI table are corrupted. They have too many zeroes at the end, that does not comply with the SMBIOS specification. After fixing them manually, dmidecode can decode the whole table. However the right way to address the problem is to fix the table itself in your system's firmware. You should look for an update from the vendor. If you can't find any, you should report the problem and ask them for one.
When reading the table directly through /dev/mem, dmidecode will decode as much as possible, and will give up at the first corruption. However, when reading from sysfs, the kernel has already attempted to parse the table and will only export the part that was successfully decoded. While questionable, this approach ensures that no unrelated data is leaked to user-space after the DMI table if the length mentioned in the entry point was too large.
I believe that the proper fix (besides getting your system's firmware fixed, of course) would be to not let dmidecode assume that the sysfs DMI file size will always match the length announced in the entry point. Instead, it should always read the file, and simply complain if the actual size doesn't match the expected size. That way, dmidecode would behave the same with and without --no-sysfs, which I believe is desirable.
I'll prepare a patch.
|
Tue 13 Oct 2015 07:25:09 AM UTC, comment #2:
Thanks for the report.
The actual DMI table length is inconsistent with the table length encoded in the SMBIOS entry point. The entry point says the table should be 2597 byte long, but the DMI file in sysfs is only 2379 byte long. Either the structure count or the table length is wrong in the entry point, and that causes the kernel to truncate the DMI file in sysfs.
Which exact kernel version are you running?
Please try "dmidecode --no-sysfs" and report if it makes a difference.
Please attach the contents of file /sys/firmware/dmi/tables/smbios_entry_point as well as the file generated by "dmidecode --dump-bin".
|