diff for duplicates of <5412B9EE.3070708@huawei.com> diff --git a/a/1.txt b/N1/1.txt index 01fcb73..af9701b 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -3,7 +3,7 @@ On 2014/9/12 10:10, Jiang Liu wrote: > in DMAR table and ACPI buffer object returned by ACPI _DSM method > for IOMMU hot-plug. > -> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> +> Signed-off-by: Jiang Liu <jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> Hi Gerry. some comments below. @@ -45,9 +45,9 @@ Do you have a better idea of this ? What about dmar_walk_remapping_entry() or d > + struct acpi_dmar_header *iter, *next; > + struct acpi_dmar_header *end = ((void *)start) + len; > + -> + for (iter = start; iter < end && ret = 0; iter = next) { +> + for (iter = start; iter < end && ret == 0; iter = next) { > + next = (void *)iter + iter->length; -> + if (iter->length = 0) { +> + if (iter->length == 0) { > + /* Avoid looping forever on bad ACPI tables */ > + pr_debug(FW_BUG "Invalid 0-length structure\n"); @@ -122,7 +122,7 @@ Same as above. > - while (((unsigned long)entry_header) < > - (((unsigned long)dmar) + dmar_tbl->length)) { > - /* Avoid looping forever on bad ACPI tables */ -> - if (entry_header->length = 0) { +> - if (entry_header->length == 0) { > - pr_warn("Invalid 0-length structure\n"); > - ret = -EINVAL; > - break; @@ -160,9 +160,9 @@ Same as above. > - > - entry_header = ((void *)entry_header + entry_header->length); > - } -> - if (drhd_count = 0) +> - if (drhd_count == 0) > + ret = dmar_walk_dmar_table(dmar, &cb); -> + if (ret = 0 && drhd_count = 0) +> + if (ret == 0 && drhd_count == 0) > pr_warn(FW_BUG "No DRHD structure found in DMAR table\n"); > + > return ret; @@ -188,12 +188,12 @@ Same as above. > - while (((unsigned long)entry_header) < > - (((unsigned long)dmar) + dmar_tbl->length)) { > - /* Avoid looping forever on bad ACPI tables */ -> - if (entry_header->length = 0) { +> - if (entry_header->length == 0) { > - pr_warn("Invalid 0-length structure\n"); > - return 0; > - } > - -> - if (entry_header->type = ACPI_DMAR_TYPE_HARDWARE_UNIT) { +> - if (entry_header->type == ACPI_DMAR_TYPE_HARDWARE_UNIT) { > - void __iomem *addr; > - u64 cap, ecap; > - @@ -216,7 +216,7 @@ Same as above. > - cap = dmar_readq(addr + DMAR_CAP_REG); > - ecap = dmar_readq(addr + DMAR_ECAP_REG); > - early_iounmap(addr, VTD_PAGE_SIZE); -> - if (cap = (uint64_t)-1 && ecap = (uint64_t)-1) { +> - if (cap == (uint64_t)-1 && ecap == (uint64_t)-1) { > - warn_invalid_dmar(drhd->address, > - " returns all ones"); > - goto failed; @@ -232,7 +232,7 @@ Same as above. > + early_iounmap(addr, VTD_PAGE_SIZE); > > - entry_header = ((void *)entry_header + entry_header->length); -> + if (cap = (uint64_t)-1 && ecap = (uint64_t)-1) { +> + if (cap == (uint64_t)-1 && ecap == (uint64_t)-1) { > + warn_invalid_dmar(drhd->address, " returns all ones"); > + return -EINVAL; > } diff --git a/a/content_digest b/N1/content_digest index 2f4bf14..cd88326 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,23 +1,23 @@ "ref\01410487848-6027-1-git-send-email-jiang.liu@linux.intel.com\0" "ref\01410487848-6027-2-git-send-email-jiang.liu@linux.intel.com\0" - "From\0Yijing Wang <wangyijing@huawei.com>\0" + "ref\01410487848-6027-2-git-send-email-jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org\0" + "From\0Yijing Wang <wangyijing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>\0" "Subject\0Re: [Patch Part3 V5 1/8] iommu/vt-d: Introduce helper function dmar_walk_resources()\0" - "Date\0Fri, 12 Sep 2014 09:16:30 +0000\0" - "To\0Jiang Liu <jiang.liu@linux.intel.com>" - Joerg Roedel <joro@8bytes.org> - David Woodhouse <dwmw2@infradead.org> - Yinghai Lu <yinghai@kernel.org> - Bjorn Helgaas <bhelgaas@google.com> - Dan Williams <dan.j.williams@intel.com> - Vinod Koul <vinod.koul@intel.com> - " Rafael J . Wysocki <rafael.j.wysocki@intel.com>\0" - "Cc\0Ashok Raj <ashok.raj@intel.com>" - Tony Luck <tony.luck@intel.com> - iommu@lists.linux-foundation.org - linux-pci@vger.kernel.org - linux-hotplug@vger.kernel.org - linux-kernel@vger.kernel.org - " dmaengine@vger.kernel.org\0" + "Date\0Fri, 12 Sep 2014 17:16:30 +0800\0" + "To\0Jiang Liu <jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>" + Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> + David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> + Yinghai Lu <yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> + Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> + Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> + Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> + " Rafael J . Wysocki <rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>\0" + "Cc\0Tony Luck <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>" + linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org + linux-hotplug-u79uwXL29TY76Z2rM5mHXA@public.gmane.org + linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org + iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org + " dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org\0" "\00:1\0" "b\0" "On 2014/9/12 10:10, Jiang Liu wrote:\n" @@ -25,7 +25,7 @@ "> in DMAR table and ACPI buffer object returned by ACPI _DSM method\n" "> for IOMMU hot-plug.\n" "> \n" - "> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>\n" + "> Signed-off-by: Jiang Liu <jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>\n" "\n" "Hi Gerry. some comments below.\n" "\n" @@ -67,9 +67,9 @@ "> +\tstruct acpi_dmar_header *iter, *next;\n" "> +\tstruct acpi_dmar_header *end = ((void *)start) + len;\n" "> +\n" - "> +\tfor (iter = start; iter < end && ret = 0; iter = next) {\n" + "> +\tfor (iter = start; iter < end && ret == 0; iter = next) {\n" "> +\t\tnext = (void *)iter + iter->length;\n" - "> +\t\tif (iter->length = 0) {\n" + "> +\t\tif (iter->length == 0) {\n" "> +\t\t\t/* Avoid looping forever on bad ACPI tables */\n" "> +\t\t\tpr_debug(FW_BUG \"Invalid 0-length structure\\n\");\n" "\n" @@ -144,7 +144,7 @@ "> -\twhile (((unsigned long)entry_header) <\n" "> -\t\t\t(((unsigned long)dmar) + dmar_tbl->length)) {\n" "> -\t\t/* Avoid looping forever on bad ACPI tables */\n" - "> -\t\tif (entry_header->length = 0) {\n" + "> -\t\tif (entry_header->length == 0) {\n" "> -\t\t\tpr_warn(\"Invalid 0-length structure\\n\");\n" "> -\t\t\tret = -EINVAL;\n" "> -\t\t\tbreak;\n" @@ -182,9 +182,9 @@ "> -\n" "> -\t\tentry_header = ((void *)entry_header + entry_header->length);\n" "> -\t}\n" - "> -\tif (drhd_count = 0)\n" + "> -\tif (drhd_count == 0)\n" "> +\tret = dmar_walk_dmar_table(dmar, &cb);\n" - "> +\tif (ret = 0 && drhd_count = 0)\n" + "> +\tif (ret == 0 && drhd_count == 0)\n" "> \t\tpr_warn(FW_BUG \"No DRHD structure found in DMAR table\\n\");\n" "> +\n" "> \treturn ret;\n" @@ -210,12 +210,12 @@ "> -\twhile (((unsigned long)entry_header) <\n" "> -\t\t\t(((unsigned long)dmar) + dmar_tbl->length)) {\n" "> -\t\t/* Avoid looping forever on bad ACPI tables */\n" - "> -\t\tif (entry_header->length = 0) {\n" + "> -\t\tif (entry_header->length == 0) {\n" "> -\t\t\tpr_warn(\"Invalid 0-length structure\\n\");\n" "> -\t\t\treturn 0;\n" "> -\t\t}\n" "> -\n" - "> -\t\tif (entry_header->type = ACPI_DMAR_TYPE_HARDWARE_UNIT) {\n" + "> -\t\tif (entry_header->type == ACPI_DMAR_TYPE_HARDWARE_UNIT) {\n" "> -\t\t\tvoid __iomem *addr;\n" "> -\t\t\tu64 cap, ecap;\n" "> -\n" @@ -238,7 +238,7 @@ "> -\t\t\tcap = dmar_readq(addr + DMAR_CAP_REG);\n" "> -\t\t\tecap = dmar_readq(addr + DMAR_ECAP_REG);\n" "> -\t\t\tearly_iounmap(addr, VTD_PAGE_SIZE);\n" - "> -\t\t\tif (cap = (uint64_t)-1 && ecap = (uint64_t)-1) {\n" + "> -\t\t\tif (cap == (uint64_t)-1 && ecap == (uint64_t)-1) {\n" "> -\t\t\t\twarn_invalid_dmar(drhd->address,\n" "> -\t\t\t\t\t\t \" returns all ones\");\n" "> -\t\t\t\tgoto failed;\n" @@ -254,7 +254,7 @@ "> +\tearly_iounmap(addr, VTD_PAGE_SIZE);\n" "> \n" "> -\t\tentry_header = ((void *)entry_header + entry_header->length);\n" - "> +\tif (cap = (uint64_t)-1 && ecap = (uint64_t)-1) {\n" + "> +\tif (cap == (uint64_t)-1 && ecap == (uint64_t)-1) {\n" "> +\t\twarn_invalid_dmar(drhd->address, \" returns all ones\");\n" "> +\t\treturn -EINVAL;\n" "> \t}\n" @@ -366,4 +366,4 @@ "Thanks!\n" Yijing -4986b9ba1768151666d560237ecd274bff2f57cbf2236723dfa47db4e9cc6682 +409ca098cfe27d39b039ee1c9cc946cec4f65900bbe7c76dc527d17d8647c765
diff --git a/a/1.txt b/N2/1.txt index 01fcb73..b6bff6c 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -45,9 +45,9 @@ Do you have a better idea of this ? What about dmar_walk_remapping_entry() or d > + struct acpi_dmar_header *iter, *next; > + struct acpi_dmar_header *end = ((void *)start) + len; > + -> + for (iter = start; iter < end && ret = 0; iter = next) { +> + for (iter = start; iter < end && ret == 0; iter = next) { > + next = (void *)iter + iter->length; -> + if (iter->length = 0) { +> + if (iter->length == 0) { > + /* Avoid looping forever on bad ACPI tables */ > + pr_debug(FW_BUG "Invalid 0-length structure\n"); @@ -122,7 +122,7 @@ Same as above. > - while (((unsigned long)entry_header) < > - (((unsigned long)dmar) + dmar_tbl->length)) { > - /* Avoid looping forever on bad ACPI tables */ -> - if (entry_header->length = 0) { +> - if (entry_header->length == 0) { > - pr_warn("Invalid 0-length structure\n"); > - ret = -EINVAL; > - break; @@ -160,9 +160,9 @@ Same as above. > - > - entry_header = ((void *)entry_header + entry_header->length); > - } -> - if (drhd_count = 0) +> - if (drhd_count == 0) > + ret = dmar_walk_dmar_table(dmar, &cb); -> + if (ret = 0 && drhd_count = 0) +> + if (ret == 0 && drhd_count == 0) > pr_warn(FW_BUG "No DRHD structure found in DMAR table\n"); > + > return ret; @@ -188,12 +188,12 @@ Same as above. > - while (((unsigned long)entry_header) < > - (((unsigned long)dmar) + dmar_tbl->length)) { > - /* Avoid looping forever on bad ACPI tables */ -> - if (entry_header->length = 0) { +> - if (entry_header->length == 0) { > - pr_warn("Invalid 0-length structure\n"); > - return 0; > - } > - -> - if (entry_header->type = ACPI_DMAR_TYPE_HARDWARE_UNIT) { +> - if (entry_header->type == ACPI_DMAR_TYPE_HARDWARE_UNIT) { > - void __iomem *addr; > - u64 cap, ecap; > - @@ -216,7 +216,7 @@ Same as above. > - cap = dmar_readq(addr + DMAR_CAP_REG); > - ecap = dmar_readq(addr + DMAR_ECAP_REG); > - early_iounmap(addr, VTD_PAGE_SIZE); -> - if (cap = (uint64_t)-1 && ecap = (uint64_t)-1) { +> - if (cap == (uint64_t)-1 && ecap == (uint64_t)-1) { > - warn_invalid_dmar(drhd->address, > - " returns all ones"); > - goto failed; @@ -232,7 +232,7 @@ Same as above. > + early_iounmap(addr, VTD_PAGE_SIZE); > > - entry_header = ((void *)entry_header + entry_header->length); -> + if (cap = (uint64_t)-1 && ecap = (uint64_t)-1) { +> + if (cap == (uint64_t)-1 && ecap == (uint64_t)-1) { > + warn_invalid_dmar(drhd->address, " returns all ones"); > + return -EINVAL; > } diff --git a/a/content_digest b/N2/content_digest index 2f4bf14..8675b7a 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -2,7 +2,7 @@ "ref\01410487848-6027-2-git-send-email-jiang.liu@linux.intel.com\0" "From\0Yijing Wang <wangyijing@huawei.com>\0" "Subject\0Re: [Patch Part3 V5 1/8] iommu/vt-d: Introduce helper function dmar_walk_resources()\0" - "Date\0Fri, 12 Sep 2014 09:16:30 +0000\0" + "Date\0Fri, 12 Sep 2014 17:16:30 +0800\0" "To\0Jiang Liu <jiang.liu@linux.intel.com>" Joerg Roedel <joro@8bytes.org> David Woodhouse <dwmw2@infradead.org> @@ -13,11 +13,11 @@ " Rafael J . Wysocki <rafael.j.wysocki@intel.com>\0" "Cc\0Ashok Raj <ashok.raj@intel.com>" Tony Luck <tony.luck@intel.com> - iommu@lists.linux-foundation.org - linux-pci@vger.kernel.org - linux-hotplug@vger.kernel.org - linux-kernel@vger.kernel.org - " dmaengine@vger.kernel.org\0" + <iommu@lists.linux-foundation.org> + <linux-pci@vger.kernel.org> + <linux-hotplug@vger.kernel.org> + <linux-kernel@vger.kernel.org> + " <dmaengine@vger.kernel.org>\0" "\00:1\0" "b\0" "On 2014/9/12 10:10, Jiang Liu wrote:\n" @@ -67,9 +67,9 @@ "> +\tstruct acpi_dmar_header *iter, *next;\n" "> +\tstruct acpi_dmar_header *end = ((void *)start) + len;\n" "> +\n" - "> +\tfor (iter = start; iter < end && ret = 0; iter = next) {\n" + "> +\tfor (iter = start; iter < end && ret == 0; iter = next) {\n" "> +\t\tnext = (void *)iter + iter->length;\n" - "> +\t\tif (iter->length = 0) {\n" + "> +\t\tif (iter->length == 0) {\n" "> +\t\t\t/* Avoid looping forever on bad ACPI tables */\n" "> +\t\t\tpr_debug(FW_BUG \"Invalid 0-length structure\\n\");\n" "\n" @@ -144,7 +144,7 @@ "> -\twhile (((unsigned long)entry_header) <\n" "> -\t\t\t(((unsigned long)dmar) + dmar_tbl->length)) {\n" "> -\t\t/* Avoid looping forever on bad ACPI tables */\n" - "> -\t\tif (entry_header->length = 0) {\n" + "> -\t\tif (entry_header->length == 0) {\n" "> -\t\t\tpr_warn(\"Invalid 0-length structure\\n\");\n" "> -\t\t\tret = -EINVAL;\n" "> -\t\t\tbreak;\n" @@ -182,9 +182,9 @@ "> -\n" "> -\t\tentry_header = ((void *)entry_header + entry_header->length);\n" "> -\t}\n" - "> -\tif (drhd_count = 0)\n" + "> -\tif (drhd_count == 0)\n" "> +\tret = dmar_walk_dmar_table(dmar, &cb);\n" - "> +\tif (ret = 0 && drhd_count = 0)\n" + "> +\tif (ret == 0 && drhd_count == 0)\n" "> \t\tpr_warn(FW_BUG \"No DRHD structure found in DMAR table\\n\");\n" "> +\n" "> \treturn ret;\n" @@ -210,12 +210,12 @@ "> -\twhile (((unsigned long)entry_header) <\n" "> -\t\t\t(((unsigned long)dmar) + dmar_tbl->length)) {\n" "> -\t\t/* Avoid looping forever on bad ACPI tables */\n" - "> -\t\tif (entry_header->length = 0) {\n" + "> -\t\tif (entry_header->length == 0) {\n" "> -\t\t\tpr_warn(\"Invalid 0-length structure\\n\");\n" "> -\t\t\treturn 0;\n" "> -\t\t}\n" "> -\n" - "> -\t\tif (entry_header->type = ACPI_DMAR_TYPE_HARDWARE_UNIT) {\n" + "> -\t\tif (entry_header->type == ACPI_DMAR_TYPE_HARDWARE_UNIT) {\n" "> -\t\t\tvoid __iomem *addr;\n" "> -\t\t\tu64 cap, ecap;\n" "> -\n" @@ -238,7 +238,7 @@ "> -\t\t\tcap = dmar_readq(addr + DMAR_CAP_REG);\n" "> -\t\t\tecap = dmar_readq(addr + DMAR_ECAP_REG);\n" "> -\t\t\tearly_iounmap(addr, VTD_PAGE_SIZE);\n" - "> -\t\t\tif (cap = (uint64_t)-1 && ecap = (uint64_t)-1) {\n" + "> -\t\t\tif (cap == (uint64_t)-1 && ecap == (uint64_t)-1) {\n" "> -\t\t\t\twarn_invalid_dmar(drhd->address,\n" "> -\t\t\t\t\t\t \" returns all ones\");\n" "> -\t\t\t\tgoto failed;\n" @@ -254,7 +254,7 @@ "> +\tearly_iounmap(addr, VTD_PAGE_SIZE);\n" "> \n" "> -\t\tentry_header = ((void *)entry_header + entry_header->length);\n" - "> +\tif (cap = (uint64_t)-1 && ecap = (uint64_t)-1) {\n" + "> +\tif (cap == (uint64_t)-1 && ecap == (uint64_t)-1) {\n" "> +\t\twarn_invalid_dmar(drhd->address, \" returns all ones\");\n" "> +\t\treturn -EINVAL;\n" "> \t}\n" @@ -366,4 +366,4 @@ "Thanks!\n" Yijing -4986b9ba1768151666d560237ecd274bff2f57cbf2236723dfa47db4e9cc6682 +c4bd1b74a37d740134c1794f976dc982bee4723de38404a8b249692923f9486d
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.