dmi_decode test can have false positives when DMI info is out of spec

Bug #874373 reported by Brendan Donegan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fwts (Ubuntu)
Fix Released
High
Colin Ian King

Bug Description

Doing certification testing we got a failure like this in dmi_decode:

00047 dmi_decode FAILED [MEDIUM] DMIOutOfSpec: Test 1, DMI type System Boot: Out of spec check.
00048 dmi_decode DMI table dump:
00049 dmi_decode # dmidecode 2.9
00050 dmi_decode SMBIOS 2.5 present.
00051 dmi_decode Handle 0x0027, DMI type 32, 20 bytes
00052 dmi_decode System Boot Information
00053 dmi_decode Status: <OUT OF SPEC>

Apparently this is not an important problem. It would be better if fwts didn't fail on things that don't really matter so this test could be more robust.

Revision history for this message
Colin Ian King (colin-king) wrote :

@Brendan, for reference can you attach the output from:

sudo dmidecode

Thanks!

affects: fwts → fwts (Ubuntu)
Changed in fwts (Ubuntu):
assignee: nobody → Colin King (colin-king)
importance: Undecided → High
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Sure thing

Revision history for this message
Colin Ian King (colin-king) wrote :

Thanks, one more request, can you run:

sudo ./dmidecode --dump-bin dmidecode.raw

..and attach the dmidecode.raw image to the bug too. Thanks!

Ara Pulido (ara)
Changed in fwts (Ubuntu):
status: New → Incomplete
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

On the server in question dmidecode doesn't have a --dump-bin option. What could I use instead?

While we're on the subject though the original dmidecode.out I attached was from the wrong server it seems, so I'm reattaching the correct one.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :

Currently fwts runs dmidecode and parses the output for strings like <OUT OF SPEC> and <BAD INDEX>

For example, for the hardware being tested we get the following dmidecode output that triggers fwts to complain:

Handle 0x0027, DMI type 32, 20 bytes
System Boot Information
 Status: <OUT OF SPEC>

This is useless on many levels. I've completely re-written the dmi_decode test in fwts so it won't use dmidecode anymore. Instead it locates the SMBIOS header and uses this to find and then parses the numerous SMBIOS DMI entries. I've trimmed this down to now look at a subset of fields and these are checked against the SMBIOS specification to see if the field values comply with the latest version of the specification found at: http://www.dmtf.org/standards/smbios - currently the latest version is: http://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.1.pdf

An example output now from fwts is:

00054 dmi_decode FAILED [HIGH] DMIValueOutOfRange: Test 1, Out of range
00055 dmi_decode value 0x0c (range allowed 0x00..0x08, 0x80..0xff) while
00056 dmi_decode accessing entry 'System Boot Information (Type 32)' @
00057 dmi_decode 0x000dc3a7, field 'Boot Status', offset 0x0a
00058 dmi_decode
00059 dmi_decode ADVICE: It may be worth checking against section 7.33 of
00060 dmi_decode the System Management BIOS (SMBIOS) Reference
00061 dmi_decode Specification (see http://www.dmtf.org/standards/smbios).
00062 dmi_decode

So, now I have more smarts in fwts. It can tell us what is out of range, what the allowed values are, the DMI table name and type and the field that is non-compliant. It will even guide the engineer to the relevant SMBIOS specification section. Quite frankly I cannot correlate 1800+ pages of a specification against every bit setting in the DMI tables and kernel usage of these settings to make a fwts smart enough to tell is if the deviation from the specification is going to cause us problems or not.

So fwts cannot currently make a fine value judgement to tell is if the non-compliant values are show-stoppers or annoyingly wrong BIOS data that may/may not cause system misbehaviour.

For BIOS testing, the role of this test is to flag up firmware that does not conform to the spec so engineers can take further action. If need be, we can re-visit this and add more intelligence, but realistically we are looking at *thousands* of individual settings to make a value-judgement upon.

Hope this helps.

The new dmi_decode test is now committed, commit 8c32d19fe2d558103093288c768da6210df709f1 and will appear in version V0.24.08 in the -devel PPA in the next day or so.

Changed in fwts (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.3 KiB)

This bug was fixed in the package fwts - 0.24.14

---------------
fwts (0.24.14) precise; urgency=low

  * Add copy-acpica.sh script that updates the ACPI
  * data: klog: add _OSC evaluation failure tests
  * data: klog: add _CRS evaluation PNP kernel erro
  * uefi: csm: fix typo.

fwts (0.24.13) precise; urgency=low

  * acpi: power_button: remove check on /proc/acpi/button/power
  * lib: fwts_button: add power button support
  * acpi: lid: use button helper
  * lib: add generic button helper into lib
  * lib: add generic button helper

fwts (0.24.12) precise; urgency=low

  * debian: update control
  * uefi: add UEFI CSM check.

fwts (0.24.11) oneiric; urgency=low

  * lib: update battery helpers and re-work tests
  * acpi: s3power: use fwts_battery helper
  * lib: add fwts_battery
  * s3power: use fwts_ac_adapter()
  * acpi: ac_adapter: use fwts_ac_adapter lib
  * lib: add fwts_ac_adapter
  * acpi: ac_adapter: use newer /sys interface
  * acpi: method: clean up dangling whitespaces
  * acpi: method: handle mobile platform tests when FADT is lying
  * acpi: method: dump return object on non-null return failures.
  * acpi: method: make lock delay between each test 0 usecs
  * acpi: method: on non-mobile tests explicitly report skipped mobile tests
  * lib: fwts_cmos: disabled interrupts during port I/O (LP: #880472)
  * bios: pciirq: fix typo
  * bios: pnp: fix typo in event_notification_addr

fwts (0.24.10) oneiric; urgency=low

  * fwts-collect: fix mpdump log and don't remove README.txt
  * doc: remove --dmidecode option from man page
  * pci: crs: fetch BIOS date from /sys/class/dmi/id/bios_date
  * lib + tests: remove framework dmidecode and --dmidecode option
  * lib: fwts_dump: don't use fw->dmidecode anymore
  * lib: fwts_dump: warnings if not being run by root.
  * lib: fwts_framework: fwts_framework_show_version() more generic
  * lib + tests: add warning flag to fwts_check_root_euid()
  * klog: enable this for non-x86
  * pci: maxreadreq: enable this for non-x86
  * kernel: oops: enable this for non-x86
  * lib: fwts_dump: do sensible non-x86 dumps
  * lib: fwts_smbios: fix non-x86 build failure.

fwts (0.24.09) oneiric; urgency=low

  * bios: Add PnP Installation Check structure test
  * bios: pciirq: fix formatting
  * bios: Add Legacy PCI IRQ Routing Table test

fwts (0.24.08) oneiric; urgency=low

  * debian: remove dependancy on dmidecode
  * pci: crs: get BIOS date from SMBIOS rather than rely on dmidecode
  * lib: fwts_smbios: add in fwts_dmi_header from dmi_decode
  * lib: fwts_smbios, fetch version number too.
  * dmi: dmi_decode: complete re-write, better detection (LP: #874373)
  * bios: smbios: handle legacy DMI header
  * lib: smbios: handle legacy DMI header
  * lib: tidy up headers
  * bios: smbios: use smbios find helper
  * lib: add smbios find helper
  * bios: smbios: check header fully and dump fields (LP: #876331)
  * bios: bios32: use fwts_checksum
  * acpi: checksum: use fwts_checksum
  * lib: fwts_acpi_tables: use fwts_checksum
  * lib: multiproc: use fwts_checksum
  * lib: add checksum helper fwts_checksum()
  * bios: smbios: use systab efi helper
  * lib: fwts_acpi_tables: use systab efi helper
  * lib: ad...

Read more...

Changed in fwts (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.