<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/firmware/dmi_scan.c, branch linux-4.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-06-06T15:21:06Z</updated>
<entry>
<title>firmware: dmi_scan: Fix ordering of product_uuid</title>
<updated>2015-06-06T15:21:06Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2015-05-14T12:40:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5368f933ea6ea8ba4edca8a557f67ca6deb0d67c'/>
<id>urn:sha1:5368f933ea6ea8ba4edca8a557f67ca6deb0d67c</id>
<content type='text'>
commit 5c1ac56b51b9d222ab202dec1ac2f4215346129d upstream.

In function dmi_present(), dmi_walk_early() calls dmi_table(), which
calls dmi_decode(), which ultimately calls dmi_save_uuid(). This last
function makes a decision based on the value of global variable
dmi_ver. The problem is that this variable is set right _after_
dmi_walk_early() returns. So dmi_save_uuid() always sees dmi_ver == 0
regardless of the actual version implemented.

This causes /sys/class/dmi/id/product_uuid to always use the old
ordering even on systems implementing DMI/SMBIOS 2.6 or later, which
should use the new ordering.

This is broken since kernel v3.8 for legacy DMI implementations and
since kernel v3.10 for SMBIOS 2 implementations. SMBIOS 3
implementations with the 64-bit entry point are not affected.

The first breakage does not matter much as in practice legacy DMI
implementations are always for versions older than 2.6, which is when
the UUID ordering changed. The second breakage is more problematic as
it affects the vast majority of x86 systems manufactured since 2009.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&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()")
Acked-by: Zhenzhong Duan &lt;zhenzhong.duan@oracle.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Artem Savkov &lt;artem.savkov@gmail.com&gt;
Cc: Ivan Khoronzhuk &lt;ivan.khoronzhuk@linaro.org&gt;
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>firmware: dmi_scan: Prevent dmi_num integer overflow</title>
<updated>2015-03-27T10:53:46Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2015-03-20T08:59:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bfbaafae8519d82d10da6abe75f5766dd5b20475'/>
<id>urn:sha1:bfbaafae8519d82d10da6abe75f5766dd5b20475</id>
<content type='text'>
dmi_num is a u16, dmi_len is a u32, so this construct:

	dmi_num = dmi_len / 4;

would result in an integer overflow for a DMI table larger than
256 kB. I've never see such a large table so far, but SMBIOS 3.0
makes it possible so maybe we'll see such tables in the future.

So instead of faking a structure count when the entry point does
not provide it, adjust the loop condition in dmi_table() to properly
deal with the case where dmi_num is not set.

This bug was introduced with the initial SMBIOS 3.0 support in commit
fc43026278b2 ("dmi: add support for SMBIOS 3.0 64-bit entry point").

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
Cc: Ivan Khoronzhuk &lt;ivan.khoronzhuk@linaro.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: Fix dmi_len type</title>
<updated>2015-02-24T18:54:17Z</updated>
<author>
<name>Ivan Khoronzhuk</name>
</author>
<published>2015-02-18T11:33:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d9ff473317245e3e5cd9922b4520411c2296388'/>
<id>urn:sha1:6d9ff473317245e3e5cd9922b4520411c2296388</id>
<content type='text'>
According to SMBIOSv3 specification the length of DMI table can be
up to 32bits wide. So use appropriate type to avoid overflow.

It's obvious that dmi_num theoretically can be more than u16 also,
so it's can be changed to u32 or at least it's better to use int
instead of u16, but on that moment I cannot imagine dmi structure
count more than 65535 and it can require changing type of vars that
work with it. So I didn't correct it.

Acked-by: Ard Biesheuvel &lt;ard@linaro.org&gt;
Signed-off-by: Ivan Khoronzhuk &lt;ivan.khoronzhuk@linaro.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>firmware: dmi_scan: Fix dmi scan to handle "End of Table" structure</title>
<updated>2015-02-18T14:47:30Z</updated>
<author>
<name>Ivan Khoronzhuk</name>
</author>
<published>2015-02-18T13:51:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce204e9a4bd82e9e6e7479bca8057e45aaac5c42'/>
<id>urn:sha1:ce204e9a4bd82e9e6e7479bca8057e45aaac5c42</id>
<content type='text'>
The dmi-sysfs should create "End of Table" entry, that is type 127. But
after adding initial SMBIOS v3 support fc43026278b2 ("dmi: add support
for SMBIOS 3.0 64-bit entry point") the 127-0 entry is not handled any
more, as result it's not created in dmi sysfs for instance. This is
important because the size of whole DMI table must correspond to sum of
all DMI entry sizes.

So move the end-of-table check after it's handled by dmi_table.

Reviewed-by: Ard Biesheuvel &lt;ard@linaro.org&gt;
Signed-off-by: Ivan Khoronzhuk &lt;ivan.khoronzhuk@linaro.org&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v3.19
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>dmi: add support for SMBIOS 3.0 64-bit entry point</title>
<updated>2014-11-05T08:03:19Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2014-10-14T14:41:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc43026278b23b3515cf8f909ec29df94b3ae1a2'/>
<id>urn:sha1:fc43026278b23b3515cf8f909ec29df94b3ae1a2</id>
<content type='text'>
The DMTF SMBIOS reference spec v3.0.0 defines a new 64-bit entry point,
which enables support for SMBIOS structure tables residing at a physical
offset over 4 GB. This is especially important for upcoming arm64
platforms whose system RAM resides entirely above the 4 GB boundary.

For the UEFI case, this code attempts to detect the new SMBIOS 3.0
header magic at the offset passed in the SMBIOS3_TABLE_GUID UEFI
configuration table. If this configuration table is not provided, or
if we fail to parse the header, we fall back to using the legacy
SMBIOS_TABLE_GUID configuration table. This is in line with the spec,
that allows both configuration tables to be provided, but mandates that
they must point to the same structure table, unless the version pointed
to by the 64-bit entry point is a superset of the 32-bit one.

For the non-UEFI case, the detection logic is modified to look for the
SMBIOS 3.0 header magic before it looks for the legacy header magic.

Note that this patch is based on version 3.0.0d [draft] of the
specification, which is expected not to deviate from the final version
in ways that would affect the correctness of this implementation.

Tested-by: Suravee Suthikulpanit &lt;suravee.suthikulpanit@amd.com&gt;
Acked-by: Leif Lindholm &lt;leif.lindholm@linaro.org&gt;
Tested-by: Leif Lindholm &lt;leif.lindholm@linaro.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Acked-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
</content>
</entry>
<entry>
<title>firmware/dmi_scan: generalize for use by other archs</title>
<updated>2014-01-24T00:36:57Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2014-01-23T23:54:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cf0744021c5d5de54d2c66e2020c6de2fe800264'/>
<id>urn:sha1:cf0744021c5d5de54d2c66e2020c6de2fe800264</id>
<content type='text'>
This patch makes a couple of changes to the SMBIOS/DMI scanning
code so it can be used on other archs (such as ARM and arm64):
(a) wrap the calls to ioremap()/iounmap(), this allows the use of a
    flavor of ioremap() more suitable for random unaligned access;
(b) allow the non-EFI fallback probe into hardcoded physical address
    0xF0000 to be disabled.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc "Luck, Tony" &lt;tony.luck@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dmi: Avoid unaligned memory access in save_mem_devices()</title>
<updated>2013-11-03T09:40:12Z</updated>
<author>
<name>Luck, Tony</name>
</author>
<published>2013-11-01T20:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0841c04d65937ad2808f59c43cb54a92473c8f0e'/>
<id>urn:sha1:0841c04d65937ad2808f59c43cb54a92473c8f0e</id>
<content type='text'>
Firmware is not required to maintain alignment of SMBIOS
entries, so we should take care accessing fields within these
structures. Use "get_unaligned()" to avoid problems.

[ Found on ia64 (which grumbles about unaligned access) ]

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Chen Gong &lt;gong.chen@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/27d82dbff5be1025bf18ab88498632d36c2fcf3c.1383331440.git.tony.luck@intel.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>DMI: Parse memory device (type 17) in SMBIOS</title>
<updated>2013-10-23T17:10:12Z</updated>
<author>
<name>Chen, Gong</name>
</author>
<published>2013-10-18T21:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd6dad4288cb93e79bd7abfa6c6a338c47454d1a'/>
<id>urn:sha1:dd6dad4288cb93e79bd7abfa6c6a338c47454d1a</id>
<content type='text'>
This patch adds a new interface to decode memory device (type 17)
to help error reporting on DIMMs.

Original-author: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Chen, Gong &lt;gong.chen@linux.intel.com&gt;
Acked-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Acked-by: Borislav Petkov &lt;bp@suse.de&gt;
Reviewed-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
<entry>
<title>firmware/dmi_scan: drop OOM messages</title>
<updated>2013-09-11T22:58:51Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2013-09-11T21:24:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae79744975cb0b3b9c469fe1a05db37d2943c863'/>
<id>urn:sha1:ae79744975cb0b3b9c469fe1a05db37d2943c863</id>
<content type='text'>
As reported by Joe Perches: OOM messages generally aren't useful.
dmi_alloc is either a trivial front-end to kzalloc, and kzalloc already
does a dump_stack() when OOM, or for x86, dmi_alloc uses extend_brk
which BUGs when unsuccessful.

So we can remove all 6 such log messages in the dmi_scan driver, to
shrink the binary size (by 528 bytes on x86_64.)

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Reported-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>firmware/dmi_scan: constify strings</title>
<updated>2013-09-11T22:58:51Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2013-09-11T21:24:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ffbbb96dd7570b9aafd426cd77a7ee03d224cabf'/>
<id>urn:sha1:ffbbb96dd7570b9aafd426cd77a7ee03d224cabf</id>
<content type='text'>
Add const to all DMI string pointers where this is possible.  This fixes a
checkpatch warning.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
