]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jul 2017 07:36:45 +0000 (09:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jul 2017 07:36:45 +0000 (09:36 +0200)
added patches:
adding-asm-prototypes.h-for-genksyms-to-generate-crc.patch
adding-the-type-of-exported-symbols.patch
sed-regex-in-makefile.build-requires-line-break-between-exported-symbols.patch
sparc64-fix-gup_huge_pmd.patch

queue-4.11/adding-asm-prototypes.h-for-genksyms-to-generate-crc.patch [new file with mode: 0644]
queue-4.11/adding-the-type-of-exported-symbols.patch [new file with mode: 0644]
queue-4.11/sed-regex-in-makefile.build-requires-line-break-between-exported-symbols.patch [new file with mode: 0644]
queue-4.11/series
queue-4.11/sparc64-fix-gup_huge_pmd.patch [new file with mode: 0644]

diff --git a/queue-4.11/adding-asm-prototypes.h-for-genksyms-to-generate-crc.patch b/queue-4.11/adding-asm-prototypes.h-for-genksyms-to-generate-crc.patch
new file mode 100644 (file)
index 0000000..60c6b42
--- /dev/null
@@ -0,0 +1,50 @@
+From foo@baz Tue Jul 18 09:36:36 CEST 2017
+From: Nagarathnam Muthusamy <nagarathnam.muthusamy@oracle.com>
+Date: Mon, 19 Jun 2017 13:08:48 -0400
+Subject: Adding asm-prototypes.h for genksyms to generate crc
+
+From: Nagarathnam Muthusamy <nagarathnam.muthusamy@oracle.com>
+
+
+[ Upstream commit bdca8cc096203b17ad0ac4e19f50578207e054d2 ]
+
+This patch adds the prototypes of assembly defined functions to asm-prototypes.h.
+Some prototypes are directly added as they are not present in any existing header
+files.
+
+Signed-off-by: Nagarathnam Muthusamy <nagarathnam.muthusamy@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/include/asm/asm-prototypes.h |   24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+ create mode 100644 arch/sparc/include/asm/asm-prototypes.h
+
+--- /dev/null
++++ b/arch/sparc/include/asm/asm-prototypes.h
+@@ -0,0 +1,24 @@
++/*
++ * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
++ */
++
++#include <asm/xor.h>
++#include <asm/checksum.h>
++#include <asm/trap_block.h>
++#include <asm/uaccess.h>
++#include <asm/atomic.h>
++#include <asm/ftrace.h>
++#include <asm/cacheflush.h>
++#include <asm/oplib.h>
++#include <linux/atomic.h>
++
++void *__memscan_zero(void *, size_t);
++void *__memscan_generic(void *, int, size_t);
++void *__bzero(void *, size_t);
++void VISenter(void); /* Dummy prototype to supress warning */
++#undef memcpy
++#undef memset
++void *memcpy(void *dest, const void *src, size_t n);
++void *memset(void *s, int c, size_t n);
++typedef int TItype __attribute__((mode(TI)));
++TItype __multi3(TItype a, TItype b);
diff --git a/queue-4.11/adding-the-type-of-exported-symbols.patch b/queue-4.11/adding-the-type-of-exported-symbols.patch
new file mode 100644 (file)
index 0000000..6f48ba0
--- /dev/null
@@ -0,0 +1,65 @@
+From foo@baz Tue Jul 18 09:36:36 CEST 2017
+From: Nagarathnam Muthusamy <nagarathnam.muthusamy@oracle.com>
+Date: Mon, 19 Jun 2017 13:08:50 -0400
+Subject: Adding the type of exported symbols
+
+From: Nagarathnam Muthusamy <nagarathnam.muthusamy@oracle.com>
+
+
+[ Upstream commit f5a651f1d5e524cab345250a783702fb6a3f14d6 ]
+
+Missing symbol type for few functions prevents genksyms from generating
+symbol versions for those functions. This patch fixes them.
+
+Signed-off-by: Nagarathnam Muthusamy <nagarathnam.muthusamy@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/lib/checksum_64.S |    1 +
+ arch/sparc/lib/csum_copy.S   |    1 +
+ arch/sparc/lib/memscan_64.S  |    2 ++
+ arch/sparc/lib/memset.S      |    1 +
+ 4 files changed, 5 insertions(+)
+
+--- a/arch/sparc/lib/checksum_64.S
++++ b/arch/sparc/lib/checksum_64.S
+@@ -38,6 +38,7 @@ csum_partial_fix_alignment:
+       .align          32
+       .globl          csum_partial
++      .type           csum_partial,#function
+       EXPORT_SYMBOL(csum_partial)
+ csum_partial:         /* %o0=buff, %o1=len, %o2=sum */
+       prefetch        [%o0 + 0x000], #n_reads
+--- a/arch/sparc/lib/csum_copy.S
++++ b/arch/sparc/lib/csum_copy.S
+@@ -65,6 +65,7 @@
+        add            %o5, %o4, %o4
+       .globl          FUNC_NAME
++      .type           FUNC_NAME,#function
+       EXPORT_SYMBOL(FUNC_NAME)
+ FUNC_NAME:            /* %o0=src, %o1=dst, %o2=len, %o3=sum */
+       LOAD(prefetch, %o0 + 0x000, #n_reads)
+--- a/arch/sparc/lib/memscan_64.S
++++ b/arch/sparc/lib/memscan_64.S
+@@ -14,6 +14,8 @@
+       .text
+       .align  32
+       .globl          __memscan_zero, __memscan_generic
++      .type           __memscan_zero,#function
++      .type           __memscan_generic,#function
+       .globl          memscan
+       EXPORT_SYMBOL(__memscan_zero)
+       EXPORT_SYMBOL(__memscan_generic)
+--- a/arch/sparc/lib/memset.S
++++ b/arch/sparc/lib/memset.S
+@@ -63,6 +63,7 @@
+ __bzero_begin:
+       .globl  __bzero
++      .type   __bzero,#function
+       .globl  memset
+       EXPORT_SYMBOL(__bzero)
+       EXPORT_SYMBOL(memset)
diff --git a/queue-4.11/sed-regex-in-makefile.build-requires-line-break-between-exported-symbols.patch b/queue-4.11/sed-regex-in-makefile.build-requires-line-break-between-exported-symbols.patch
new file mode 100644 (file)
index 0000000..35d60e4
--- /dev/null
@@ -0,0 +1,95 @@
+From foo@baz Tue Jul 18 09:36:36 CEST 2017
+From: Nagarathnam Muthusamy <nagarathnam.muthusamy@oracle.com>
+Date: Mon, 19 Jun 2017 13:08:49 -0400
+Subject: sed regex in Makefile.build requires line break between exported symbols
+
+From: Nagarathnam Muthusamy <nagarathnam.muthusamy@oracle.com>
+
+
+[ Upstream commit d16c0649feb4fe4e814f44803df5a617769c3233 ]
+
+The following regex in Makefile.build matches only one ___EXPORT_SYMBOL per line.
+
+sed
+'s/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/'
+
+ATOMIC_OPS macro in atomic_64.S expands multiple symbols in same line hence
+version generation is done only for the last matched symbol. This patch adds
+new line between the symbol expansions.
+
+Signed-off-by: Nagarathnam Muthusamy <nagarathnam.muthusamy@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/lib/atomic_64.S |   44 ++++++++++++++++++++++++++------------------
+ 1 file changed, 26 insertions(+), 18 deletions(-)
+
+--- a/arch/sparc/lib/atomic_64.S
++++ b/arch/sparc/lib/atomic_64.S
+@@ -62,19 +62,23 @@ ENTRY(atomic_fetch_##op) /* %o0 = increm
+ ENDPROC(atomic_fetch_##op);                                           \
+ EXPORT_SYMBOL(atomic_fetch_##op);
+-#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op) ATOMIC_FETCH_OP(op)
++ATOMIC_OP(add)
++ATOMIC_OP_RETURN(add)
++ATOMIC_FETCH_OP(add)
++
++ATOMIC_OP(sub)
++ATOMIC_OP_RETURN(sub)
++ATOMIC_FETCH_OP(sub)
+-ATOMIC_OPS(add)
+-ATOMIC_OPS(sub)
++ATOMIC_OP(and)
++ATOMIC_FETCH_OP(and)
+-#undef ATOMIC_OPS
+-#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op)
++ATOMIC_OP(or)
++ATOMIC_FETCH_OP(or)
+-ATOMIC_OPS(and)
+-ATOMIC_OPS(or)
+-ATOMIC_OPS(xor)
++ATOMIC_OP(xor)
++ATOMIC_FETCH_OP(xor)
+-#undef ATOMIC_OPS
+ #undef ATOMIC_FETCH_OP
+ #undef ATOMIC_OP_RETURN
+ #undef ATOMIC_OP
+@@ -124,19 +128,23 @@ ENTRY(atomic64_fetch_##op) /* %o0 = incr
+ ENDPROC(atomic64_fetch_##op);                                         \
+ EXPORT_SYMBOL(atomic64_fetch_##op);
+-#define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_OP_RETURN(op) ATOMIC64_FETCH_OP(op)
++ATOMIC64_OP(add)
++ATOMIC64_OP_RETURN(add)
++ATOMIC64_FETCH_OP(add)
++
++ATOMIC64_OP(sub)
++ATOMIC64_OP_RETURN(sub)
++ATOMIC64_FETCH_OP(sub)
+-ATOMIC64_OPS(add)
+-ATOMIC64_OPS(sub)
++ATOMIC64_OP(and)
++ATOMIC64_FETCH_OP(and)
+-#undef ATOMIC64_OPS
+-#define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_FETCH_OP(op)
++ATOMIC64_OP(or)
++ATOMIC64_FETCH_OP(or)
+-ATOMIC64_OPS(and)
+-ATOMIC64_OPS(or)
+-ATOMIC64_OPS(xor)
++ATOMIC64_OP(xor)
++ATOMIC64_FETCH_OP(xor)
+-#undef ATOMIC64_OPS
+ #undef ATOMIC64_FETCH_OP
+ #undef ATOMIC64_OP_RETURN
+ #undef ATOMIC64_OP
index 6afae6f875aed0dc3fa17a5a9d850a02c2dd8332..4ceac0b4c240d09749c0b8339cfc55cf4bee369a 100644 (file)
@@ -28,3 +28,7 @@ tap-convert-a-mutex-to-a-spinlock.patch
 bridge-mdb-fix-leak-on-complete_info-ptr-on-fail-path.patch
 brcmfmac-fix-possible-buffer-overflow-in-brcmf_cfg80211_mgmt_tx.patch
 sfc-don-t-read-beyond-unicast-address-list.patch
+adding-asm-prototypes.h-for-genksyms-to-generate-crc.patch
+sed-regex-in-makefile.build-requires-line-break-between-exported-symbols.patch
+adding-the-type-of-exported-symbols.patch
+sparc64-fix-gup_huge_pmd.patch
diff --git a/queue-4.11/sparc64-fix-gup_huge_pmd.patch b/queue-4.11/sparc64-fix-gup_huge_pmd.patch
new file mode 100644 (file)
index 0000000..786ad63
--- /dev/null
@@ -0,0 +1,37 @@
+From foo@baz Tue Jul 18 09:36:36 CEST 2017
+From: Nitin Gupta <nitin.m.gupta@oracle.com>
+Date: Thu, 22 Jun 2017 17:15:08 -0700
+Subject: sparc64: Fix gup_huge_pmd
+
+From: Nitin Gupta <nitin.m.gupta@oracle.com>
+
+
+[ Upstream commit dbd2667a4fb9ce4f547982b07cd69dda127c47ea ]
+
+The function assumes that each PMD points to head of a
+huge page. This is not correct as a PMD can point to
+start of any 8M region with a, say 256M, hugepage. The
+fix ensures that it points to the correct head of any PMD
+huge page.
+
+Cc: Julian Calaby <julian.calaby@gmail.com>
+Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/sparc/mm/gup.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/sparc/mm/gup.c
++++ b/arch/sparc/mm/gup.c
+@@ -78,8 +78,8 @@ static int gup_huge_pmd(pmd_t *pmdp, pmd
+               return 0;
+       refs = 0;
+-      head = pmd_page(pmd);
+-      page = head + ((addr & ~PMD_MASK) >> PAGE_SHIFT);
++      page = pmd_page(pmd) + ((addr & ~PMD_MASK) >> PAGE_SHIFT);
++      head = compound_head(page);
+       do {
+               VM_BUG_ON(compound_head(page) != head);
+               pages[*nr] = page;