]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2017 08:25:53 +0000 (10:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2017 08:25:53 +0000 (10:25 +0200)
added patches:
sparc64-fix-fault-handling-in-ngbzero.s-and-genbzero.s.patch

queue-4.11/series
queue-4.11/sparc64-fix-fault-handling-in-ngbzero.s-and-genbzero.s.patch [new file with mode: 0644]

index c5c06d6c91f0a48bf1a68adf81a0521992c6fa2f..6f964ef6003fe631f5d37d494bb68e4079482a7a 100644 (file)
@@ -3,3 +3,4 @@ drm-sti-fix-gdp-size-to-support-up-to-uhd-resolution.patch
 power-supply-lp8788-prevent-out-of-bounds-array-access.patch
 brcmfmac-ensure-pointer-correctly-set-if-skb-data-location-changes.patch
 brcmfmac-make-skb-header-writable-before-use.patch
+sparc64-fix-fault-handling-in-ngbzero.s-and-genbzero.s.patch
diff --git a/queue-4.11/sparc64-fix-fault-handling-in-ngbzero.s-and-genbzero.s.patch b/queue-4.11/sparc64-fix-fault-handling-in-ngbzero.s-and-genbzero.s.patch
new file mode 100644 (file)
index 0000000..495c7bc
--- /dev/null
@@ -0,0 +1,67 @@
+From 3c7f62212018b904ae17f5636ead18a4dca3a88f Mon Sep 17 00:00:00 2001
+From: Dave Aldridge <david.j.aldridge@oracle.com>
+Date: Tue, 9 May 2017 02:57:35 -0600
+Subject: sparc64: fix fault handling in NGbzero.S and GENbzero.S
+
+From: Dave Aldridge <david.j.aldridge@oracle.com>
+
+commit 3c7f62212018b904ae17f5636ead18a4dca3a88f upstream.
+
+When any of the functions contained in NGbzero.S and GENbzero.S
+vector through *bzero_from_clear_user, we may end up taking a
+fault when executing one of the store alternate address space
+instructions. If this happens, the exception handler does not
+restore the %asi register.
+
+This commit fixes the issue by introducing a new exception
+handler that ensures the %asi register is restored when
+a fault is handled.
+
+Orabug: 25577560
+
+Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
+Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
+Reviewed-by: Babu Moger <babu.moger@oracle.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/sparc/kernel/head_64.S |    6 ++++++
+ arch/sparc/lib/GENbzero.S   |    2 +-
+ arch/sparc/lib/NGbzero.S    |    2 +-
+ 3 files changed, 8 insertions(+), 2 deletions(-)
+
+--- a/arch/sparc/kernel/head_64.S
++++ b/arch/sparc/kernel/head_64.S
+@@ -939,3 +939,9 @@ ENTRY(__retl_o1)
+       retl
+        mov    %o1, %o0
+ ENDPROC(__retl_o1)
++
++ENTRY(__retl_o1_asi)
++      wr      %o5, 0x0, %asi
++      retl
++       mov    %o1, %o0
++ENDPROC(__retl_o1_asi)
+--- a/arch/sparc/lib/GENbzero.S
++++ b/arch/sparc/lib/GENbzero.S
+@@ -8,7 +8,7 @@
+ 98:   x,y;                    \
+       .section __ex_table,"a";\
+       .align 4;               \
+-      .word 98b, __retl_o1;   \
++      .word 98b, __retl_o1_asi;\
+       .text;                  \
+       .align 4;
+--- a/arch/sparc/lib/NGbzero.S
++++ b/arch/sparc/lib/NGbzero.S
+@@ -8,7 +8,7 @@
+ 98:   x,y;                    \
+       .section __ex_table,"a";\
+       .align 4;               \
+-      .word 98b, __retl_o1;   \
++      .word 98b, __retl_o1_asi;\
+       .text;                  \
+       .align 4;