|
From: | Eric Saint-Etienne |
Subject: | [dmidecode] non-dmi compliant systems |
Date: | Fri, 1 Apr 2016 09:25:27 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
Hi,It appears that dmidecode can be called on systems that do not contain DMI tables. For instance the python-dmidecode module, often used to get system information, includes dmidecode sources, verbatim. Programs that collect system information using python-dmidecode work fine on x86 compatible systems, but on machines such as SPARC, it simply makes cPython seg-fault when accessing non-existent DMI tables via mmap().
I'm only concerned with the SPARC case (no other arch has shout as of yet) and I've got a patch for an older version of dmidecode that prevents from accessing DMI tables on the SPARC architecture. It's basically a bunch of conditional compilation around accessing DMI tables.
If you find that using #if...#else at the right places an acceptable guard-rail, I'll then submit to this list a patch for the master branch.
When the patch will be in, other architectures/systems that don't support DMI tables (ARM?, MIPS?...) could be easily added.
Thanks Eric
[Prev in Thread] | Current Thread | [Next in Thread] |