]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2020 14:27:58 +0000 (15:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2020 14:27:58 +0000 (15:27 +0100)
added patches:
i2c-acpi-put-device-when-verifying-client-fails.patch
iommu-vt-d-fix-the-wrong-printing-in-rhsa-parsing.patch
iommu-vt-d-ignore-devices-with-out-of-spec-domain-number.patch
netfilter-nft_payload-add-missing-attribute-validation-for-payload-csum-flags.patch

queue-4.14/i2c-acpi-put-device-when-verifying-client-fails.patch [new file with mode: 0644]
queue-4.14/iommu-vt-d-fix-the-wrong-printing-in-rhsa-parsing.patch [new file with mode: 0644]
queue-4.14/iommu-vt-d-ignore-devices-with-out-of-spec-domain-number.patch [new file with mode: 0644]
queue-4.14/netfilter-nft_payload-add-missing-attribute-validation-for-payload-csum-flags.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/i2c-acpi-put-device-when-verifying-client-fails.patch b/queue-4.14/i2c-acpi-put-device-when-verifying-client-fails.patch
new file mode 100644 (file)
index 0000000..1c4161a
--- /dev/null
@@ -0,0 +1,47 @@
+From 8daee952b4389729358665fb91949460641659d4 Mon Sep 17 00:00:00 2001
+From: Wolfram Sang <wsa+renesas@sang-engineering.com>
+Date: Thu, 12 Mar 2020 14:32:44 +0100
+Subject: i2c: acpi: put device when verifying client fails
+
+From: Wolfram Sang <wsa+renesas@sang-engineering.com>
+
+commit 8daee952b4389729358665fb91949460641659d4 upstream.
+
+i2c_verify_client() can fail, so we need to put the device when that
+happens.
+
+Fixes: 525e6fabeae2 ("i2c / ACPI: add support for ACPI reconfigure notifications")
+Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
+Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/i2c/i2c-core-acpi.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/i2c/i2c-core-acpi.c
++++ b/drivers/i2c/i2c-core-acpi.c
+@@ -352,10 +352,18 @@ static struct i2c_adapter *i2c_acpi_find
+ static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev)
+ {
+       struct device *dev;
++      struct i2c_client *client;
+       dev = bus_find_device(&i2c_bus_type, NULL, adev,
+                             i2c_acpi_find_match_device);
+-      return dev ? i2c_verify_client(dev) : NULL;
++      if (!dev)
++              return NULL;
++
++      client = i2c_verify_client(dev);
++      if (!client)
++              put_device(dev);
++
++      return client;
+ }
+ static int i2c_acpi_notify(struct notifier_block *nb, unsigned long value,
diff --git a/queue-4.14/iommu-vt-d-fix-the-wrong-printing-in-rhsa-parsing.patch b/queue-4.14/iommu-vt-d-fix-the-wrong-printing-in-rhsa-parsing.patch
new file mode 100644 (file)
index 0000000..2797b11
--- /dev/null
@@ -0,0 +1,36 @@
+From b0bb0c22c4db623f2e7b1a471596fbf1c22c6dc5 Mon Sep 17 00:00:00 2001
+From: Zhenzhong Duan <zhenzhong.duan@gmail.com>
+Date: Thu, 12 Mar 2020 14:09:54 +0800
+Subject: iommu/vt-d: Fix the wrong printing in RHSA parsing
+
+From: Zhenzhong Duan <zhenzhong.duan@gmail.com>
+
+commit b0bb0c22c4db623f2e7b1a471596fbf1c22c6dc5 upstream.
+
+When base address in RHSA structure doesn't match base address in
+each DRHD structure, the base address in last DRHD is printed out.
+
+This doesn't make sense when there are multiple DRHD units, fix it
+by printing the buggy RHSA's base address.
+
+Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
+Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
+Fixes: fd0c8894893cb ("intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables")
+Signed-off-by: Joerg Roedel <jroedel@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iommu/dmar.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/iommu/dmar.c
++++ b/drivers/iommu/dmar.c
+@@ -486,7 +486,7 @@ static int dmar_parse_one_rhsa(struct ac
+       pr_warn(FW_BUG
+               "Your BIOS is broken; RHSA refers to non-existent DMAR unit at %llx\n"
+               "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+-              drhd->reg_base_addr,
++              rhsa->base_address,
+               dmi_get_system_info(DMI_BIOS_VENDOR),
+               dmi_get_system_info(DMI_BIOS_VERSION),
+               dmi_get_system_info(DMI_PRODUCT_VERSION));
diff --git a/queue-4.14/iommu-vt-d-ignore-devices-with-out-of-spec-domain-number.patch b/queue-4.14/iommu-vt-d-ignore-devices-with-out-of-spec-domain-number.patch
new file mode 100644 (file)
index 0000000..be291b6
--- /dev/null
@@ -0,0 +1,70 @@
+From da72a379b2ec0bad3eb265787f7008bead0b040c Mon Sep 17 00:00:00 2001
+From: Daniel Drake <drake@endlessm.com>
+Date: Thu, 12 Mar 2020 14:09:55 +0800
+Subject: iommu/vt-d: Ignore devices with out-of-spec domain number
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Daniel Drake <drake@endlessm.com>
+
+commit da72a379b2ec0bad3eb265787f7008bead0b040c upstream.
+
+VMD subdevices are created with a PCI domain ID of 0x10000 or
+higher.
+
+These subdevices are also handled like all other PCI devices by
+dmar_pci_bus_notifier().
+
+However, when dmar_alloc_pci_notify_info() take records of such devices,
+it will truncate the domain ID to a u16 value (in info->seg).
+The device at (e.g.) 10000:00:02.0 is then treated by the DMAR code as if
+it is 0000:00:02.0.
+
+In the unlucky event that a real device also exists at 0000:00:02.0 and
+also has a device-specific entry in the DMAR table,
+dmar_insert_dev_scope() will crash on:
+   BUG_ON(i >= devices_cnt);
+
+That's basically a sanity check that only one PCI device matches a
+single DMAR entry; in this case we seem to have two matching devices.
+
+Fix this by ignoring devices that have a domain number higher than
+what can be looked up in the DMAR table.
+
+This problem was carefully diagnosed by Jian-Hong Pan.
+
+Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
+Signed-off-by: Daniel Drake <drake@endlessm.com>
+Fixes: 59ce0515cdaf3 ("iommu/vt-d: Update DRHD/RMRR/ATSR device scope caches when PCI hotplug happens")
+Signed-off-by: Joerg Roedel <jroedel@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iommu/dmar.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/iommu/dmar.c
++++ b/drivers/iommu/dmar.c
+@@ -39,6 +39,7 @@
+ #include <linux/dmi.h>
+ #include <linux/slab.h>
+ #include <linux/iommu.h>
++#include <linux/limits.h>
+ #include <asm/irq_remapping.h>
+ #include <asm/iommu_table.h>
+@@ -139,6 +140,13 @@ dmar_alloc_pci_notify_info(struct pci_de
+       BUG_ON(dev->is_virtfn);
++      /*
++       * Ignore devices that have a domain number higher than what can
++       * be looked up in DMAR, e.g. VMD subdevices with domain 0x10000
++       */
++      if (pci_domain_nr(dev->bus) > U16_MAX)
++              return NULL;
++
+       /* Only generate path[] for device addition event */
+       if (event == BUS_NOTIFY_ADD_DEVICE)
+               for (tmp = dev; tmp; tmp = tmp->bus->self)
diff --git a/queue-4.14/netfilter-nft_payload-add-missing-attribute-validation-for-payload-csum-flags.patch b/queue-4.14/netfilter-nft_payload-add-missing-attribute-validation-for-payload-csum-flags.patch
new file mode 100644 (file)
index 0000000..812a96f
--- /dev/null
@@ -0,0 +1,31 @@
+From 9d6effb2f1523eb84516e44213c00f2fd9e6afff Mon Sep 17 00:00:00 2001
+From: Jakub Kicinski <kuba@kernel.org>
+Date: Mon, 2 Mar 2020 21:08:32 -0800
+Subject: netfilter: nft_payload: add missing attribute validation for payload csum flags
+
+From: Jakub Kicinski <kuba@kernel.org>
+
+commit 9d6effb2f1523eb84516e44213c00f2fd9e6afff upstream.
+
+Add missing attribute validation for NFTA_PAYLOAD_CSUM_FLAGS
+to the netlink policy.
+
+Fixes: 1814096980bb ("netfilter: nft_payload: layer 4 checksum adjustment for pseudoheader fields")
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/netfilter/nft_payload.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/net/netfilter/nft_payload.c
++++ b/net/netfilter/nft_payload.c
+@@ -121,6 +121,7 @@ static const struct nla_policy nft_paylo
+       [NFTA_PAYLOAD_LEN]              = { .type = NLA_U32 },
+       [NFTA_PAYLOAD_CSUM_TYPE]        = { .type = NLA_U32 },
+       [NFTA_PAYLOAD_CSUM_OFFSET]      = { .type = NLA_U32 },
++      [NFTA_PAYLOAD_CSUM_FLAGS]       = { .type = NLA_U32 },
+ };
+ static int nft_payload_init(const struct nft_ctx *ctx,
index 4b458fd1afcbe1ea89c093aa13017ba718b92142..d33eb6a26e996e50e7e3908e2f54ba9ff663238c 100644 (file)
@@ -58,3 +58,7 @@ nl80211-add-missing-attribute-validation-for-critical-protocol-indication.patch
 nl80211-add-missing-attribute-validation-for-beacon-report-scanning.patch
 nl80211-add-missing-attribute-validation-for-channel-switch.patch
 netfilter-cthelper-add-missing-attribute-validation-for-cthelper.patch
+netfilter-nft_payload-add-missing-attribute-validation-for-payload-csum-flags.patch
+iommu-vt-d-fix-the-wrong-printing-in-rhsa-parsing.patch
+iommu-vt-d-ignore-devices-with-out-of-spec-domain-number.patch
+i2c-acpi-put-device-when-verifying-client-fails.patch