<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/firmware/dmi_scan.c, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-05-30T05:50:24Z</updated>
<entry>
<title>firmware: dmi_scan: Fix handling of empty DMI strings</title>
<updated>2018-05-30T05:50:24Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2018-02-03T10:25:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6fdca0dcd765c89d62d590951f5d60583f9816f5'/>
<id>urn:sha1:6fdca0dcd765c89d62d590951f5d60583f9816f5</id>
<content type='text'>
[ Upstream commit a7770ae194569e96a93c48aceb304edded9cc648 ]

The handling of empty DMI strings looks quite broken to me:
* Strings from 1 to 7 spaces are not considered empty.
* True empty DMI strings (string index set to 0) are not considered
  empty, and result in allocating a 0-char string.
* Strings with invalid index also result in allocating a 0-char
  string.
* Strings starting with 8 spaces are all considered empty, even if
  non-space characters follow (sounds like a weird thing to do, but
  I have actually seen occurrences of this in DMI tables before.)
* Strings which are considered empty are reported as 8 spaces,
  instead of being actually empty.

Some of these issues are the result of an off-by-one error in memcmp,
the rest is incorrect by design.

So let's get it square: missing strings and strings made of only
spaces, regardless of their length, should be treated as empty and
no memory should be allocated for them. All other strings are
non-empty and should be allocated.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Fixes: 79da4721117f ("x86: fix DMI out of memory problems")
Cc: Parag Warudkar &lt;parag.warudkar@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: Save SMBIOS Type 9 System Slots</title>
<updated>2016-01-15T21:08:45Z</updated>
<author>
<name>Jordan Hargrave</name>
</author>
<published>2016-01-15T21:08:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5b6c1518878e157df4121c1caf70d9c470a6d31'/>
<id>urn:sha1:e5b6c1518878e157df4121c1caf70d9c470a6d31</id>
<content type='text'>
Save SMBIOS Type 9 System Slots during DMI scan. PCI address of
onboard devices was already saved but not for slots.

Signed-off-by: Jordan Hargrave &lt;jordan_hargrave@dell.com&gt;
Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: Fix dmi_find_device description</title>
<updated>2016-01-15T21:08:44Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2016-01-15T21:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bfab8b48598f851dfeca2b40fd06969bf8634d37'/>
<id>urn:sha1:bfab8b48598f851dfeca2b40fd06969bf8634d37</id>
<content type='text'>
The description of dmi_find_device was apparently copied from a
similar function in a different subsystem, but the parameter names
were not adjusted as needed.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Andrey Panin &lt;pazke@donpac.ru&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: Clarify dmi_save_extended_devices</title>
<updated>2016-01-15T21:08:44Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2016-01-15T21:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45b9825708198311cbe00daf9d1a40098c12c45b'/>
<id>urn:sha1:45b9825708198311cbe00daf9d1a40098c12c45b</id>
<content type='text'>
Get rid of the arbitrary 5-byte pointer offset, it served no purpose
and made it harder to match the code with the SMBIOS specification.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Jordan Hargrave &lt;jordan_hargrave@dell.com&gt;
Cc: Narendra K &lt;narendra_k@dell.com&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: Optimize dmi_save_extended_devices</title>
<updated>2016-01-15T21:08:44Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2016-01-15T21:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96e239434c629491e57a359a2f876b6d41476336'/>
<id>urn:sha1:96e239434c629491e57a359a2f876b6d41476336</id>
<content type='text'>
Calling dmi_string_nosave isn't cheap, so avoid calling it twice in a
row for the same string.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Jordan Hargrave &lt;jordan_hargrave@dell.com&gt;
Cc: Narendra K &lt;narendra_k@dell.com&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: Fix UUID endianness for SMBIOS &gt;= 2.6</title>
<updated>2016-01-08T08:00:54Z</updated>
<author>
<name>Andrea Arcangeli</name>
</author>
<published>2016-01-08T08:00:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff4319dc7cd58c92b389960e375038335d157a60'/>
<id>urn:sha1:ff4319dc7cd58c92b389960e375038335d157a60</id>
<content type='text'>
The dmi_ver wasn't updated correctly before the dmi_decode method run
to save the uuid.

That resulted in "dmidecode -s system-uuid" and
/sys/class/dmi/id/product_uuid disagreeing. The latter was buggy and
this fixes it.

Reported-by: Federico Simoncelli &lt;fsimonce@redhat.com&gt;
Fixes: 9f9c9cbb6057 ("drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists")
Fixes: 79bae42d51a5 ("dmi_scan: refactor dmi_scan_machine(), {smbios,dmi}_present()")
Signed-off-by: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: Coding style cleanups</title>
<updated>2015-06-25T07:06:57Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2015-06-25T07:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1d8704c48f9c2bb791e8e183a41019f35a3f7f0'/>
<id>urn:sha1:d1d8704c48f9c2bb791e8e183a41019f35a3f7f0</id>
<content type='text'>
Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: add SBMIOS entry and DMI tables</title>
<updated>2015-06-25T07:06:56Z</updated>
<author>
<name>Ivan Khoronzhuk</name>
</author>
<published>2015-06-25T07:06:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7f96f97c4031fa4ffdb7801f9aae23e96170a6f'/>
<id>urn:sha1:d7f96f97c4031fa4ffdb7801f9aae23e96170a6f</id>
<content type='text'>
Some utils, like dmidecode and smbios, need to access SMBIOS entry
table area in order to get information like SMBIOS version, size, etc.
Currently it's done via /dev/mem. But for situation when /dev/mem
usage is disabled, the utils have to use dmi sysfs instead, which
doesn't represent SMBIOS entry and adds code/delay redundancy when direct
access for table is needed.

So this patch creates dmi/tables and adds SMBIOS entry point to allow
utils in question to work correctly without /dev/mem. Also patch adds
raw dmi table to simplify dmi table processing in user space, as
proposed by Jean Delvare.

Tested-by: Roy Franz &lt;roy.franz@linaro.org&gt;
Signed-off-by: Ivan Khoronzhuk &lt;ivan.khoronzhuk@globallogic.com&gt;
Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: Trim DMI table length before exporting it</title>
<updated>2015-06-25T07:06:56Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2015-06-25T07:06:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e0ad59e3d838a2887e7aa657baee5896030d009'/>
<id>urn:sha1:6e0ad59e3d838a2887e7aa657baee5896030d009</id>
<content type='text'>
The SMBIOS v3 entry points specify a maximum length for the DMI table,
not the exact length. Thus there may be garbage after the end-of-table
marker, which we don't want to export to user-space. Adjust dmi_len
when we find the end-of-table marker, so that only the actual table
payload is exported.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Ivan Khoronzhuk &lt;ivan.khoronzhuk@globallogic.com&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: Rename dmi_table to dmi_decode_table</title>
<updated>2015-06-25T07:06:56Z</updated>
<author>
<name>Ivan Khoronzhuk</name>
</author>
<published>2015-06-25T07:06:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb4c5ea50e60aa8faaf6aae762cb06ee1c8e0b8e'/>
<id>urn:sha1:eb4c5ea50e60aa8faaf6aae762cb06ee1c8e0b8e</id>
<content type='text'>
The "dmi_table" function looks like data instance, but it does DMI
table decode. This patch renames it to "dmi_decode_table" name as
more appropriate. That allows us to use "dmi_table" name for correct
purposes.

Signed-off-by: Ivan Khoronzhuk &lt;ivan.khoronzhuk@globallogic.com&gt;
Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
</content>
</entry>
</feed>
