]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 May 2017 20:07:41 +0000 (13:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 May 2017 20:07:41 +0000 (13:07 -0700)
added patches:
i2o-hide-unsafe-ioctl-on-64-bit.patch

queue-3.18/i2o-hide-unsafe-ioctl-on-64-bit.patch [new file with mode: 0644]
queue-3.18/message-i2o-fix-64bit-build-warnings.patch [deleted file]
queue-3.18/net-ipv4-fix-multipath-rtm_getroute-behavior-when-iif-is-given.patch [deleted file]
queue-3.18/series

diff --git a/queue-3.18/i2o-hide-unsafe-ioctl-on-64-bit.patch b/queue-3.18/i2o-hide-unsafe-ioctl-on-64-bit.patch
new file mode 100644 (file)
index 0000000..40b5bbd
--- /dev/null
@@ -0,0 +1,53 @@
+From arnd@arndb.de  Fri May  5 13:07:16 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Fri,  5 May 2017 21:46:49 +0200
+Subject: [PATCH 3.16-stable 31/87] i2o: hide unsafe ioctl on 64-bit
+To: Ben Hutchings <ben@decadent.org.uk>
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
+Message-ID: <20170505194745.3627137-32-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+We get a warning about a broken pointer conversion on 64-bit architectures:
+
+drivers/message/i2o/i2o_config.c: In function 'i2o_cfg_passthru':
+drivers/message/i2o/i2o_config.c:893:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
+         (p->virt, (void __user *)sg[i].addr_bus,
+                   ^
+drivers/message/i2o/i2o_config.c:953:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
+         ((void __user *)sg[j].addr_bus, sg_list[j].virt,
+          ^
+
+This has clearly never worked right, so we can add an #ifdef around the code.
+The driver was moved to staging in linux-4.0 and finally removed in 4.2,
+so upstream does not have a fix for it.
+
+The driver originally got this mostly right, though probably by accident.
+
+Fixes: f4c2c15b930b ("[PATCH] Convert i2o to compat_ioctl")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/message/i2o/i2o_config.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/message/i2o/i2o_config.c
++++ b/drivers/message/i2o/i2o_config.c
+@@ -772,7 +772,7 @@ static long i2o_cfg_compat_ioctl(struct
+ #endif
+-#ifdef CONFIG_I2O_EXT_ADAPTEC
++#if defined(CONFIG_I2O_EXT_ADAPTEC) && !defined(CONFIG_64BIT)
+ static int i2o_cfg_passthru(unsigned long arg)
+ {
+       struct i2o_cmd_passthru __user *cmd =
+@@ -1045,7 +1045,7 @@ static long i2o_cfg_ioctl(struct file *f
+               ret = i2o_cfg_evt_get(arg, fp);
+               break;
+-#ifdef CONFIG_I2O_EXT_ADAPTEC
++#if defined(CONFIG_I2O_EXT_ADAPTEC) && !defined(CONFIG_64BIT)
+       case I2OPASSTHRU:
+               ret = i2o_cfg_passthru(arg);
+               break;
diff --git a/queue-3.18/message-i2o-fix-64bit-build-warnings.patch b/queue-3.18/message-i2o-fix-64bit-build-warnings.patch
deleted file mode 100644 (file)
index 9528f73..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From foo@baz Thu May  4 16:01:53 PDT 2017
-Date: Thu, 04 May 2017 16:01:53 -0700
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: message: i2o: fix 64bit build warnings
-
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
-It seems that most of the 64bit build warnings were fixed up in this
-driver, but 2 were forgotten.  This code is long deleted from newer
-kernels, so the fix is not needed there, but make it here in the 3.18
-tree to keep the build quiet.
-
-Cc: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
-
----
- drivers/message/i2o/i2o_config.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/message/i2o/i2o_config.c
-+++ b/drivers/message/i2o/i2o_config.c
-@@ -890,7 +890,7 @@ static int i2o_cfg_passthru(unsigned lon
-                           flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) {
-                               // TODO 64bit fix
-                               if (copy_from_user
--                                  (p->virt, (void __user *)sg[i].addr_bus,
-+                                  (p->virt, (void __user *)(u64)sg[i].addr_bus,
-                                    sg_size)) {
-                                       printk(KERN_DEBUG
-                                              "%s: Could not copy SG buf %d FROM user\n",
-@@ -950,7 +950,7 @@ static int i2o_cfg_passthru(unsigned lon
-                               sg_size = sg[j].flag_count & 0xffffff;
-                               // TODO 64bit fix
-                               if (copy_to_user
--                                  ((void __user *)sg[j].addr_bus, sg_list[j].virt,
-+                                  ((void __user *)(u64)sg[j].addr_bus, sg_list[j].virt,
-                                    sg_size)) {
-                                       printk(KERN_WARNING
-                                              "%s: Could not copy %p TO user %x\n",
diff --git a/queue-3.18/net-ipv4-fix-multipath-rtm_getroute-behavior-when-iif-is-given.patch b/queue-3.18/net-ipv4-fix-multipath-rtm_getroute-behavior-when-iif-is-given.patch
deleted file mode 100644 (file)
index 91aa26c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-From foo@baz Sun Apr 30 15:50:51 CEST 2017
-From: Florian Larysch <fl@n621.de>
-Date: Mon, 3 Apr 2017 16:46:09 +0200
-Subject: net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given
-
-From: Florian Larysch <fl@n621.de>
-
-
-[ Upstream commit a8801799c6975601fd58ae62f48964caec2eb83f ]
-
-inet_rtm_getroute synthesizes a skeletal ICMP skb, which is passed to
-ip_route_input when iif is given. If a multipath route is present for
-the designated destination, ip_multipath_icmp_hash ends up being called,
-which uses the source/destination addresses within the skb to calculate
-a hash. However, those are not set in the synthetic skb, causing it to
-return an arbitrary and incorrect result.
-
-Instead, use UDP, which gets no such special treatment.
-
-Signed-off-by: Florian Larysch <fl@n621.de>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/ipv4/route.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/net/ipv4/route.c
-+++ b/net/ipv4/route.c
-@@ -2436,7 +2436,7 @@ static int inet_rtm_getroute(struct sk_b
-       skb_reset_network_header(skb);
-       /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */
--      ip_hdr(skb)->protocol = IPPROTO_ICMP;
-+      ip_hdr(skb)->protocol = IPPROTO_UDP;
-       skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr));
-       src = tb[RTA_SRC] ? nla_get_be32(tb[RTA_SRC]) : 0;
index d31bc1d29830148505d60459924736543b9275e5..3fbce0450604b8993e77cb0dd5eb1f60e9f9d366 100644 (file)
@@ -13,7 +13,6 @@ net-phy-handle-state-correctly-in-phy_stop_machine.patch
 l2tp-purge-socket-queues-in-the-.destruct-callback.patch
 net-packet-fix-overflow-in-check-for-tp_frame_nr.patch
 net-packet-fix-overflow-in-check-for-tp_reserve.patch
-net-ipv4-fix-multipath-rtm_getroute-behavior-when-iif-is-given.patch
 sctp-listen-on-the-sock-only-when-it-s-state-is-listening-or-closed.patch
 netpoll-check-for-skb-queue_mapping.patch
 ip6mr-fix-notification-device-destruction.patch
@@ -58,7 +57,7 @@ mips-jz4740-fix-build-error-in-irq.h.patch
 mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.patch
 mips-elf2ecoff-fix-warning-due-to-dead-code.patch
 staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch
-message-i2o-fix-64bit-build-warnings.patch
+i2o-hide-unsafe-ioctl-on-64-bit.patch
 scsi-advansys-remove-warning-message.patch
 modpost-expand-pattern-matching-to-support-substring-matches.patch
 modpost-don-t-emit-section-mismatch-warnings-for-compiler-optimizations.patch