]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jun 2021 17:16:18 +0000 (19:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jun 2021 17:16:18 +0000 (19:16 +0200)
added patches:
arm64-remove-unimplemented-syscall-log-message.patch
xen-pciback-redo-vf-placement-in-the-virtual-topology.patch

queue-4.4/arm64-remove-unimplemented-syscall-log-message.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/xen-pciback-redo-vf-placement-in-the-virtual-topology.patch [new file with mode: 0644]

diff --git a/queue-4.4/arm64-remove-unimplemented-syscall-log-message.patch b/queue-4.4/arm64-remove-unimplemented-syscall-log-message.patch
new file mode 100644 (file)
index 0000000..776a804
--- /dev/null
@@ -0,0 +1,45 @@
+From 1962682d2b2fbe6cfa995a85c53c069fadda473e Mon Sep 17 00:00:00 2001
+From: Michael Weiser <michael.weiser@gmx.de>
+Date: Thu, 1 Feb 2018 23:13:36 +0100
+Subject: arm64: Remove unimplemented syscall log message
+
+From: Michael Weiser <michael.weiser@gmx.de>
+
+commit 1962682d2b2fbe6cfa995a85c53c069fadda473e upstream.
+
+Stop printing a (ratelimited) kernel message for each instance of an
+unimplemented syscall being called. Userland making an unimplemented
+syscall is not necessarily misbehaviour and to be expected with a
+current userland running on an older kernel. Also, the current message
+looks scary to users but does not actually indicate a real problem nor
+help them narrow down the cause. Just rely on sys_ni_syscall() to return
+-ENOSYS.
+
+Cc: <stable@vger.kernel.org>
+Acked-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/kernel/traps.c |    8 --------
+ 1 file changed, 8 deletions(-)
+
+--- a/arch/arm64/kernel/traps.c
++++ b/arch/arm64/kernel/traps.c
+@@ -381,14 +381,6 @@ asmlinkage long do_ni_syscall(struct pt_
+       }
+ #endif
+-      if (show_unhandled_signals_ratelimited()) {
+-              pr_info("%s[%d]: syscall %d\n", current->comm,
+-                      task_pid_nr(current), (int)regs->syscallno);
+-              dump_instr("", regs);
+-              if (user_mode(regs))
+-                      __show_regs(regs);
+-      }
+-
+       return sys_ni_syscall();
+ }
index ba5d2c9d85ad238d8ba34195ac1500853a7017f8..a0b055b76ea7736b2fca34df9d7cad3fef94bd05 100644 (file)
@@ -19,3 +19,5 @@ ocfs2-fix-data-corruption-by-fallocate.patch
 nfc-fix-null-ptr-dereference-in-llcp_sock_getname-after-failed-connect.patch
 btrfs-fixup-error-handling-in-fixup_inode_link_counts.patch
 kvm-svm-truncate-gpr-value-for-dr-and-cr-accesses-in-64-bit-mode.patch
+arm64-remove-unimplemented-syscall-log-message.patch
+xen-pciback-redo-vf-placement-in-the-virtual-topology.patch
diff --git a/queue-4.4/xen-pciback-redo-vf-placement-in-the-virtual-topology.patch b/queue-4.4/xen-pciback-redo-vf-placement-in-the-virtual-topology.patch
new file mode 100644 (file)
index 0000000..eb55a7a
--- /dev/null
@@ -0,0 +1,82 @@
+From foo@baz Tue Jun  8 07:08:21 PM CEST 2021
+From: Jan Beulich <jbeulich@suse.com>
+Date: Tue, 18 May 2021 18:13:42 +0200
+Subject: xen-pciback: redo VF placement in the virtual topology
+
+From: Jan Beulich <jbeulich@suse.com>
+
+The commit referenced below was incomplete: It merely affected what
+would get written to the vdev-<N> xenstore node. The guest would still
+find the function at the original function number as long as
+__xen_pcibk_get_pci_dev() wouldn't be in sync. The same goes for AER wrt
+__xen_pcibk_get_pcifront_dev().
+
+Undo overriding the function to zero and instead make sure that VFs at
+function zero remain alone in their slot. This has the added benefit of
+improving overall capacity, considering that there's only a total of 32
+slots available right now (PCI segment and bus can both only ever be
+zero at present).
+
+This is upstream commit 4ba50e7c423c29639878c00573288869aa627068.
+
+Fixes: 8a5248fe10b1 ("xen PV passthru: assign SR-IOV virtual functions to 
+separate virtual slots")
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Link: https://lore.kernel.org/r/8def783b-404c-3452-196d-3f3fd4d72c9e@suse.com
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/xen/xen-pciback/vpci.c |   14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/drivers/xen/xen-pciback/vpci.c
++++ b/drivers/xen/xen-pciback/vpci.c
+@@ -68,7 +68,7 @@ static int __xen_pcibk_add_pci_dev(struc
+                                  struct pci_dev *dev, int devid,
+                                  publish_pci_dev_cb publish_cb)
+ {
+-      int err = 0, slot, func = -1;
++      int err = 0, slot, func = PCI_FUNC(dev->devfn);
+       struct pci_dev_entry *t, *dev_entry;
+       struct vpci_dev_data *vpci_dev = pdev->pci_dev_data;
+@@ -93,23 +93,26 @@ static int __xen_pcibk_add_pci_dev(struc
+       /*
+        * Keep multi-function devices together on the virtual PCI bus, except
+-       * virtual functions.
++       * that we want to keep virtual functions at func 0 on their own. They
++       * aren't multi-function devices and hence their presence at func 0
++       * may cause guests to not scan the other functions.
+        */
+-      if (!dev->is_virtfn) {
++      if (!dev->is_virtfn || func) {
+               for (slot = 0; slot < PCI_SLOT_MAX; slot++) {
+                       if (list_empty(&vpci_dev->dev_list[slot]))
+                               continue;
+                       t = list_entry(list_first(&vpci_dev->dev_list[slot]),
+                                      struct pci_dev_entry, list);
++                      if (t->dev->is_virtfn && !PCI_FUNC(t->dev->devfn))
++                              continue;
+                       if (match_slot(dev, t->dev)) {
+                               pr_info("vpci: %s: assign to virtual slot %d func %d\n",
+                                       pci_name(dev), slot,
+-                                      PCI_FUNC(dev->devfn));
++                                      func);
+                               list_add_tail(&dev_entry->list,
+                                             &vpci_dev->dev_list[slot]);
+-                              func = PCI_FUNC(dev->devfn);
+                               goto unlock;
+                       }
+               }
+@@ -122,7 +125,6 @@ static int __xen_pcibk_add_pci_dev(struc
+                               pci_name(dev), slot);
+                       list_add_tail(&dev_entry->list,
+                                     &vpci_dev->dev_list[slot]);
+-                      func = dev->is_virtfn ? 0 : PCI_FUNC(dev->devfn);
+                       goto unlock;
+               }
+       }