]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 22:35:40 +0000 (15:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 22:35:40 +0000 (15:35 -0700)
added patches:
revert-sparc64-fix-__copy_-to-from-_user_inatomic-defines.patch
sparc32-fix-build-failure-for-arch_jump_label_transform.patch
sparc64-don-t-treat-64-bit-syscall-return-codes-as-32-bit.patch
sparc-pci-fix-incorrect-address-calculation-of-pci-bridge-windows-on-simba-bridges.patch

queue-3.4/revert-sparc64-fix-__copy_-to-from-_user_inatomic-defines.patch [new file with mode: 0644]
queue-3.4/series
queue-3.4/sparc-pci-fix-incorrect-address-calculation-of-pci-bridge-windows-on-simba-bridges.patch [new file with mode: 0644]
queue-3.4/sparc32-fix-build-failure-for-arch_jump_label_transform.patch [new file with mode: 0644]
queue-3.4/sparc64-don-t-treat-64-bit-syscall-return-codes-as-32-bit.patch [new file with mode: 0644]

diff --git a/queue-3.4/revert-sparc64-fix-__copy_-to-from-_user_inatomic-defines.patch b/queue-3.4/revert-sparc64-fix-__copy_-to-from-_user_inatomic-defines.patch
new file mode 100644 (file)
index 0000000..141d387
--- /dev/null
@@ -0,0 +1,42 @@
+From foo@baz Mon Apr 14 15:35:09 PDT 2014
+From: Dave Kleikamp <dave.kleikamp@oracle.com>
+Date: Mon, 16 Dec 2013 15:01:00 -0600
+Subject: Revert "sparc64: Fix __copy_{to,from}_user_inatomic defines."
+
+From: Dave Kleikamp <dave.kleikamp@oracle.com>
+
+[ Upstream commit 16932237f2978a2265662f8de4af743b1f55a209 ]
+
+This reverts commit 145e1c0023585e0e8f6df22316308ec61c5066b2.
+
+This commit broke the behavior of __copy_from_user_inatomic when
+it is only partially successful. Instead of returning the number
+of bytes not copied, it now returns 1. This translates to the
+wrong value being returned by iov_iter_copy_from_user_atomic.
+
+xfstests generic/246 and LTP writev01 both fail on btrfs and nfs
+because of this.
+
+Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
+Cc: Hugh Dickins <hughd@google.com>
+Cc: David S. Miller <davem@davemloft.net>
+Cc: sparclinux@vger.kernel.org
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/sparc/include/asm/uaccess_64.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/sparc/include/asm/uaccess_64.h
++++ b/arch/sparc/include/asm/uaccess_64.h
+@@ -266,8 +266,8 @@ extern long __strnlen_user(const char __
+ #define strlen_user __strlen_user
+ #define strnlen_user __strnlen_user
+-#define __copy_to_user_inatomic ___copy_to_user
+-#define __copy_from_user_inatomic ___copy_from_user
++#define __copy_to_user_inatomic __copy_to_user
++#define __copy_from_user_inatomic __copy_from_user
+ #endif  /* __ASSEMBLY__ */
index c028d10c9190289ccbe63251fcb5034cc4918065..97719f80cea01cc8054e1ebfd054e06f1a2a0a25 100644 (file)
@@ -14,3 +14,7 @@ netlink-don-t-compare-the-nul-termination-in-nla_strcmp.patch
 isdnloop-validate-nul-terminated-strings-from-user.patch
 isdnloop-several-buffer-overflows.patch
 rds-prevent-dereference-of-a-null-device-in-rds_iw_laddr_check.patch
+sparc-pci-fix-incorrect-address-calculation-of-pci-bridge-windows-on-simba-bridges.patch
+revert-sparc64-fix-__copy_-to-from-_user_inatomic-defines.patch
+sparc32-fix-build-failure-for-arch_jump_label_transform.patch
+sparc64-don-t-treat-64-bit-syscall-return-codes-as-32-bit.patch
diff --git a/queue-3.4/sparc-pci-fix-incorrect-address-calculation-of-pci-bridge-windows-on-simba-bridges.patch b/queue-3.4/sparc-pci-fix-incorrect-address-calculation-of-pci-bridge-windows-on-simba-bridges.patch
new file mode 100644 (file)
index 0000000..f391658
--- /dev/null
@@ -0,0 +1,43 @@
+From foo@baz Mon Apr 14 15:35:09 PDT 2014
+From: oftedal <oftedal@gmail.com>
+Date: Fri, 18 Oct 2013 22:28:29 +0200
+Subject: sparc: PCI: Fix incorrect address calculation of PCI Bridge windows on Simba-bridges
+
+From: oftedal <oftedal@gmail.com>
+
+[ Upstream commit 557fc5873ef178c4b3e1e36a42db547ecdc43f9b ]
+
+The SIMBA APB Bridges lacks the 'ranges' of-property describing the
+PCI I/O and memory areas located beneath the bridge. Faking this
+information has been performed by reading range registers in the
+APB bridge, and calculating the corresponding areas.
+
+In commit 01f94c4a6ced476ce69b895426fc29bfc48c69bd
+("Fix sabre pci controllers with new probing scheme.") a bug was
+introduced into this calculation, causing the PCI memory areas
+to be calculated incorrectly: The shift size was set to be
+identical for I/O and MEM ranges, which is incorrect.
+
+This patch set the shift size of the MEM range back to the
+value used before 01f94c4a6ced476ce69b895426fc29bfc48c69bd.
+
+Signed-off-by: Kjetil Oftedal <oftedal@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/sparc/kernel/pci.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/sparc/kernel/pci.c
++++ b/arch/sparc/kernel/pci.c
+@@ -486,8 +486,8 @@ static void __devinit apb_fake_ranges(st
+       apb_calc_first_last(map, &first, &last);
+       res = bus->resource[1];
+       res->flags = IORESOURCE_MEM;
+-      region.start = (first << 21);
+-      region.end = (last << 21) + ((1 << 21) - 1);
++      region.start = (first << 29);
++      region.end = (last << 29) + ((1 << 29) - 1);
+       pcibios_bus_to_resource(dev, res, &region);
+ }
diff --git a/queue-3.4/sparc32-fix-build-failure-for-arch_jump_label_transform.patch b/queue-3.4/sparc32-fix-build-failure-for-arch_jump_label_transform.patch
new file mode 100644 (file)
index 0000000..1ce2069
--- /dev/null
@@ -0,0 +1,44 @@
+From foo@baz Mon Apr 14 15:35:09 PDT 2014
+From: Paul Gortmaker <paul.gortmaker@windriver.com>
+Date: Thu, 13 Feb 2014 13:57:44 -0500
+Subject: sparc32: fix build failure for arch_jump_label_transform
+
+From: Paul Gortmaker <paul.gortmaker@windriver.com>
+
+[ Upstream commit 4f6500fff5f7644a03c46728fd7ef0f62fa6940b ]
+
+In arch/sparc/Kernel/Makefile, we see:
+
+   obj-$(CONFIG_SPARC64)   += jump_label.o
+
+However, the Kconfig selects HAVE_ARCH_JUMP_LABEL unconditionally
+for all SPARC.  This in turn leads to the following failure when
+doing allmodconfig coverage builds:
+
+kernel/built-in.o: In function `__jump_label_update':
+jump_label.c:(.text+0x8560c): undefined reference to `arch_jump_label_transform'
+kernel/built-in.o: In function `arch_jump_label_transform_static':
+(.text+0x85cf4): undefined reference to `arch_jump_label_transform'
+make: *** [vmlinux] Error 1
+
+Change HAVE_ARCH_JUMP_LABEL to be conditional on SPARC64 so that it
+matches the Makefile.
+
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/sparc/Kconfig |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/sparc/Kconfig
++++ b/arch/sparc/Kconfig
+@@ -24,7 +24,7 @@ config SPARC
+       select HAVE_IRQ_WORK
+       select HAVE_DMA_ATTRS
+       select HAVE_DMA_API_DEBUG
+-      select HAVE_ARCH_JUMP_LABEL
++      select HAVE_ARCH_JUMP_LABEL if SPARC64
+       select HAVE_GENERIC_HARDIRQS
+       select GENERIC_IRQ_SHOW
+       select USE_GENERIC_SMP_HELPERS if SMP
diff --git a/queue-3.4/sparc64-don-t-treat-64-bit-syscall-return-codes-as-32-bit.patch b/queue-3.4/sparc64-don-t-treat-64-bit-syscall-return-codes-as-32-bit.patch
new file mode 100644 (file)
index 0000000..a0ba640
--- /dev/null
@@ -0,0 +1,47 @@
+From foo@baz Mon Apr 14 15:35:09 PDT 2014
+From: Dave Kleikamp <dave.kleikamp@oracle.com>
+Date: Fri, 14 Mar 2014 10:42:01 -0500
+Subject: sparc64: don't treat 64-bit syscall return codes as 32-bit
+
+From: Dave Kleikamp <dave.kleikamp@oracle.com>
+
+[ Upstream commit 1535bd8adbdedd60a0ee62e28fd5225d66434371 ]
+
+When checking a system call return code for an error,
+linux_sparc_syscall was sign-extending the lower 32-bit value and
+comparing it to -ERESTART_RESTARTBLOCK. lseek can return valid return
+codes whose lower 32-bits alone would indicate a failure (such as 4G-1).
+Use the whole 64-bit value to check for errors. Only the 32-bit path
+should sign extend the lower 32-bit value.
+
+Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
+Acked-by: Bob Picco <bob.picco@oracle.com>
+Acked-by: Allen Pais <allen.pais@oracle.com>
+Cc: David S. Miller <davem@davemloft.net>
+Cc: sparclinux@vger.kernel.org
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/sparc/kernel/syscalls.S |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/sparc/kernel/syscalls.S
++++ b/arch/sparc/kernel/syscalls.S
+@@ -184,7 +184,8 @@ linux_sparc_syscall32:
+        mov    %i0, %l5                                ! IEU1
+ 5:    call    %l7                                     ! CTI   Group brk forced
+        srl    %i5, 0, %o5                             ! IEU1
+-      ba,a,pt %xcc, 3f
++      ba,pt   %xcc, 3f
++       sra    %o0, 0, %o0
+       /* Linux native system calls enter here... */
+       .align  32
+@@ -212,7 +213,6 @@ linux_sparc_syscall:
+ 3:    stx     %o0, [%sp + PTREGS_OFF + PT_V9_I0]
+ ret_sys_call:
+       ldx     [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3
+-      sra     %o0, 0, %o0
+       mov     %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2
+       sllx    %g2, 32, %g2