Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2013-04-24 18:03:34 +0200
committerJiri Kosina <jkosina@suse.cz>2013-04-25 14:25:38 +0200
commit395d7341e4701d73c2405a0a2590ab3e54b9b35d (patch)
tree163abb7cf9fb8740b64b4027ed29fcf9660c82f3
parent342df61115686fa42e28efdf6292dc6ab578cd8c (diff)
- patches.kernel.org/revert-dmi_scan-changes-1.patch:rpm-3.0.74-0.6.6
Revert "dmi_scan: fix missing check for _DMI_ signature in smbios_present()". - patches.kernel.org/revert-dmi_scan-changes-2.patch: Revert "drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists". - patches.kernel.org/revert-dmi_scan-changes-3.patch: Revert "drivers/firmware/dmi_scan.c: check dmi version when get system uuid".
-rw-r--r--kernel-source.changes13
-rw-r--r--patches.kernel.org/revert-dmi_scan-changes-1.patch36
-rw-r--r--patches.kernel.org/revert-dmi_scan-changes-2.patch124
-rw-r--r--patches.kernel.org/revert-dmi_scan-changes-3.patch62
-rw-r--r--series.conf3
5 files changed, 238 insertions, 0 deletions
diff --git a/kernel-source.changes b/kernel-source.changes
index 517b2a04ef..08c29249db 100644
--- a/kernel-source.changes
+++ b/kernel-source.changes
@@ -1,4 +1,17 @@
-------------------------------------------------------------------
+Wed Apr 24 18:03:13 CEST 2013 - jdelvare@suse.de
+
+- patches.kernel.org/revert-dmi_scan-changes-1.patch:
+ Revert "dmi_scan: fix missing check for _DMI_ signature in
+ smbios_present()".
+- patches.kernel.org/revert-dmi_scan-changes-2.patch: Revert
+ "drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS
+ if it exists".
+- patches.kernel.org/revert-dmi_scan-changes-3.patch: Revert
+ "drivers/firmware/dmi_scan.c: check dmi version when get
+ system uuid".
+
+-------------------------------------------------------------------
Mon Apr 22 15:28:24 CEST 2013 - jkosina@suse.cz
- patches.kernel.org/0011-Revert-sysfs-fix-race-between-readdir-and-lseek.patch:
diff --git a/patches.kernel.org/revert-dmi_scan-changes-1.patch b/patches.kernel.org/revert-dmi_scan-changes-1.patch
new file mode 100644
index 0000000000..b89b5d7631
--- /dev/null
+++ b/patches.kernel.org/revert-dmi_scan-changes-1.patch
@@ -0,0 +1,36 @@
+From: Jean Delvare <jdelvare@suse.de>
+Subject: Revert "dmi_scan: fix missing check for _DMI_ signature in smbios_present()"
+Patch-mainline: Never
+
+Revert 3.0.69 commit 3241d80d48900fc43535980865f1ef726af68713
+(commit a40e7cf8f06b4e322ba902e4e9f6a6b0c2daa907 upstream.)
+
+This is a fixup for a reverted patch so we must revert this one first.
+
+Acked-by: Jean Delvare <jdelvare@suse.de>
+---
+ drivers/firmware/dmi_scan.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/firmware/dmi_scan.c
++++ b/drivers/firmware/dmi_scan.c
+@@ -442,6 +442,7 @@ static int __init dmi_present(const char
+ static int __init smbios_present(const char __iomem *p)
+ {
+ u8 buf[32];
++ int offset = 0;
+
+ memcpy_fromio(buf, p, 32);
+ if ((buf[5] < 32) && dmi_checksum(buf, buf[5])) {
+@@ -460,9 +461,9 @@ static int __init smbios_present(const c
+ dmi_ver = 0x0206;
+ break;
+ }
+- return memcmp(p + 16, "_DMI_", 5) || dmi_present(p + 16);
++ offset = 16;
+ }
+- return 1;
++ return dmi_present(buf + offset);
+ }
+
+ void __init dmi_scan_machine(void)
diff --git a/patches.kernel.org/revert-dmi_scan-changes-2.patch b/patches.kernel.org/revert-dmi_scan-changes-2.patch
new file mode 100644
index 0000000000..c1d36fdce2
--- /dev/null
+++ b/patches.kernel.org/revert-dmi_scan-changes-2.patch
@@ -0,0 +1,124 @@
+From: Jean Delvare <jdelvare@suse.de>
+Subject: Revert "drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists"
+Patch-mainline: Never
+
+Revert 3.0.61 commit a6aa749906b92eaec6ca0469f90f35de26044d90
+(commit 9f9c9cbb60576a1518d0bf93fb8e499cffccf377 upstream.)
+
+It breaks an existing interface by byte-swapping the contents of
+/sys/class/dmi/id/product_uuid on some systems.
+
+Acked-by: Jean Delvare <jdelvare@suse.de>
+---
+ drivers/firmware/dmi_scan.c | 62 ++++++++++----------------------------------
+ 1 file changed, 15 insertions(+), 47 deletions(-)
+
+--- a/drivers/firmware/dmi_scan.c
++++ b/drivers/firmware/dmi_scan.c
+@@ -119,12 +119,12 @@ static int __init dmi_walk_early(void (*
+ return 0;
+ }
+
+-static int __init dmi_checksum(const u8 *buf, u8 len)
++static int __init dmi_checksum(const u8 *buf)
+ {
+ u8 sum = 0;
+ int a;
+
+- for (a = 0; a < len; a++)
++ for (a = 0; a < 15; a++)
+ sum += buf[a];
+
+ return sum == 0;
+@@ -415,57 +415,30 @@ static int __init dmi_present(const char
+ u8 buf[15];
+
+ memcpy_fromio(buf, p, 15);
+- if (dmi_checksum(buf, 15)) {
++ if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
+ dmi_num = (buf[13] << 8) | buf[12];
+ dmi_len = (buf[7] << 8) | buf[6];
+ dmi_base = (buf[11] << 24) | (buf[10] << 16) |
+ (buf[9] << 8) | buf[8];
+
++ /*
++ * DMI version 0.0 means that the real version is taken from
++ * the SMBIOS version, which we don't know at this point.
++ */
++ dmi_ver = (buf[14] & 0xf0) << 4 | (buf[14] & 0x0f);
++ if (buf[14] != 0)
++ printk(KERN_INFO "DMI %d.%d present.\n",
++ buf[14] >> 4, buf[14] & 0xF);
++ else
++ printk(KERN_INFO "DMI present.\n");
+ if (dmi_walk_early(dmi_decode) == 0) {
+- if (dmi_ver)
+- pr_info("SMBIOS %d.%d present.\n",
+- dmi_ver >> 8, dmi_ver & 0xFF);
+- else {
+- dmi_ver = (buf[14] & 0xF0) << 4 |
+- (buf[14] & 0x0F);
+- pr_info("Legacy DMI %d.%d present.\n",
+- dmi_ver >> 8, dmi_ver & 0xFF);
+- }
+ dmi_dump_ids();
+ return 0;
+ }
+ }
+- dmi_ver = 0;
+ return 1;
+ }
+
+-static int __init smbios_present(const char __iomem *p)
+-{
+- u8 buf[32];
+- int offset = 0;
+-
+- memcpy_fromio(buf, p, 32);
+- if ((buf[5] < 32) && dmi_checksum(buf, buf[5])) {
+- dmi_ver = (buf[6] << 8) + buf[7];
+-
+- /* Some BIOS report weird SMBIOS version, fix that up */
+- switch (dmi_ver) {
+- case 0x021F:
+- case 0x0221:
+- pr_debug("SMBIOS version fixup(2.%d->2.%d)\n",
+- dmi_ver & 0xFF, 3);
+- dmi_ver = 0x0203;
+- break;
+- case 0x0233:
+- pr_debug("SMBIOS version fixup(2.%d->2.%d)\n", 51, 6);
+- dmi_ver = 0x0206;
+- break;
+- }
+- offset = 16;
+- }
+- return dmi_present(buf + offset);
+-}
+-
+ void __init dmi_scan_machine(void)
+ {
+ char __iomem *p, *q;
+@@ -483,7 +456,7 @@ void __init dmi_scan_machine(void)
+ if (p == NULL)
+ goto error;
+
+- rc = smbios_present(p);
++ rc = dmi_present(p + 0x10); /* offset of _DMI_ string */
+ dmi_iounmap(p, 32);
+ if (!rc) {
+ dmi_available = 1;
+@@ -501,12 +474,7 @@ void __init dmi_scan_machine(void)
+ goto error;
+
+ for (q = p; q < p + 0x10000; q += 16) {
+- if (memcmp(q, "_SM_", 4) == 0 && q - p <= 0xFFE0)
+- rc = smbios_present(q);
+- else if (memcmp(q, "_DMI_", 5) == 0)
+- rc = dmi_present(q);
+- else
+- continue;
++ rc = dmi_present(q);
+ if (!rc) {
+ dmi_available = 1;
+ dmi_iounmap(p, 0x10000);
diff --git a/patches.kernel.org/revert-dmi_scan-changes-3.patch b/patches.kernel.org/revert-dmi_scan-changes-3.patch
new file mode 100644
index 0000000000..28bbfca258
--- /dev/null
+++ b/patches.kernel.org/revert-dmi_scan-changes-3.patch
@@ -0,0 +1,62 @@
+From: Jean Delvare <jdelvare@suse.de>
+Subject: Revert "drivers/firmware/dmi_scan.c: check dmi version when get system uuid"
+Patch-mainline: Never
+
+Revert 3.0.61 commit 88e10f8813d2f214178adc5f8ac62e4531bd6fdc
+(commit f1d8e614d74b09531b9a85e812485340f3df7b1c upstream.)
+
+This was a prerequisite for another commit we don't want.
+
+Acked-by: Jean Delvare <jdelvare@suse.de>
+---
+ drivers/firmware/dmi_scan.c | 18 +++---------------
+ 1 file changed, 3 insertions(+), 15 deletions(-)
+
+--- a/drivers/firmware/dmi_scan.c
++++ b/drivers/firmware/dmi_scan.c
+@@ -16,7 +16,6 @@
+ */
+ static char dmi_empty_string[] = " ";
+
+-static u16 __initdata dmi_ver;
+ /*
+ * Catch too early calls to dmi_check_system():
+ */
+@@ -162,10 +161,8 @@ static void __init dmi_save_uuid(const s
+ return;
+
+ for (i = 0; i < 16 && (is_ff || is_00); i++) {
+- if (d[i] != 0x00)
+- is_00 = 0;
+- if (d[i] != 0xFF)
+- is_ff = 0;
++ if(d[i] != 0x00) is_ff = 0;
++ if(d[i] != 0xFF) is_00 = 0;
+ }
+
+ if (is_ff || is_00)
+@@ -175,15 +172,7 @@ static void __init dmi_save_uuid(const s
+ if (!s)
+ return;
+
+- /*
+- * As of version 2.6 of the SMBIOS specification, the first 3 fields of
+- * the UUID are supposed to be little-endian encoded. The specification
+- * says that this is the defacto standard.
+- */
+- if (dmi_ver >= 0x0206)
+- sprintf(s, "%pUL", d);
+- else
+- sprintf(s, "%pUB", d);
++ sprintf(s, "%pUB", d);
+
+ dmi_ident[slot] = s;
+ }
+@@ -425,7 +414,6 @@ static int __init dmi_present(const char
+ * DMI version 0.0 means that the real version is taken from
+ * the SMBIOS version, which we don't know at this point.
+ */
+- dmi_ver = (buf[14] & 0xf0) << 4 | (buf[14] & 0x0f);
+ if (buf[14] != 0)
+ printk(KERN_INFO "DMI %d.%d present.\n",
+ buf[14] >> 4, buf[14] & 0xF);
diff --git a/series.conf b/series.conf
index 82200e323f..4776771a83 100644
--- a/series.conf
+++ b/series.conf
@@ -125,6 +125,9 @@
patches.kernel.org/revert-removal-of-ACPI-procfs-entries.patch
patches.suse/Revert-8021q-fix-a-potential-use-after-free.patch
patches.kernel.org/0011-Revert-sysfs-fix-race-between-readdir-and-lseek.patch
+ patches.kernel.org/revert-dmi_scan-changes-1.patch
+ patches.kernel.org/revert-dmi_scan-changes-2.patch
+ patches.kernel.org/revert-dmi_scan-changes-3.patch
# this is to be enabled after 3.3 is out for some time and upstream tested that
patches.kernel.org/0001-Revert-i387-re-introduce-FPU-state-preloading-at-con.patch