]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2013 17:11:10 +0000 (10:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2013 17:11:10 +0000 (10:11 -0700)
added patches:
m32r-add-memcpy-for-config_kernel_gzip-y.patch
m32r-consistently-use-suffix.patch
m32r-make-memset-global-for-config_kernel_bzip2-y.patch
revert-kvm-x86-emulator-fix-source-operand-decoding-for-8bit-movx-instructions.patch

queue-3.4/m32r-add-memcpy-for-config_kernel_gzip-y.patch [new file with mode: 0644]
queue-3.4/m32r-consistently-use-suffix.patch [new file with mode: 0644]
queue-3.4/m32r-make-memset-global-for-config_kernel_bzip2-y.patch [new file with mode: 0644]
queue-3.4/revert-kvm-x86-emulator-fix-source-operand-decoding-for-8bit-movx-instructions.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/m32r-add-memcpy-for-config_kernel_gzip-y.patch b/queue-3.4/m32r-add-memcpy-for-config_kernel_gzip-y.patch
new file mode 100644 (file)
index 0000000..d11ef4e
--- /dev/null
@@ -0,0 +1,49 @@
+From a8abbca6617e1caa2344d2d38d0a35f3e5928b79 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+Date: Tue, 17 Jul 2012 15:48:04 -0700
+Subject: m32r: add memcpy() for CONFIG_KERNEL_GZIP=y
+
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+
+commit a8abbca6617e1caa2344d2d38d0a35f3e5928b79 upstream.
+
+Fix the m32r link error:
+
+    LD      arch/m32r/boot/compressed/vmlinux
+  arch/m32r/boot/compressed/misc.o: In function `zlib_updatewindow':
+  misc.c:(.text+0x190): undefined reference to `memcpy'
+  misc.c:(.text+0x190): relocation truncated to fit: R_M32R_26_PLTREL against undefined symbol `memcpy'
+  make[5]: *** [arch/m32r/boot/compressed/vmlinux] Error 1
+
+by adding our own implementation of memcpy().
+
+Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Cc: Hirokazu Takata <takata@linux-m32r.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/m32r/boot/compressed/misc.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/arch/m32r/boot/compressed/misc.c
++++ b/arch/m32r/boot/compressed/misc.c
+@@ -39,6 +39,16 @@ static void *memset(void *s, int c, size
+ #endif
+ #ifdef CONFIG_KERNEL_GZIP
++void *memcpy(void *dest, const void *src, size_t n)
++{
++      char *d = dest;
++      const char *s = src;
++      while (n--)
++              *d++ = *s++;
++
++      return dest;
++}
++
+ #define BOOT_HEAP_SIZE             0x10000
+ #include "../../../../lib/decompress_inflate.c"
+ #endif
diff --git a/queue-3.4/m32r-consistently-use-suffix.patch b/queue-3.4/m32r-consistently-use-suffix.patch
new file mode 100644 (file)
index 0000000..ed3ed3e
--- /dev/null
@@ -0,0 +1,45 @@
+From df12aef6a19bb2d69859a94936bda0e6ccaf3327 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+Date: Tue, 17 Jul 2012 15:48:02 -0700
+Subject: m32r: consistently use "suffix-$(...)"
+
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+
+commit df12aef6a19bb2d69859a94936bda0e6ccaf3327 upstream.
+
+Commit a556bec9955c ("m32r: fix arch/m32r/boot/compressed/Makefile")
+changed "$(suffix_y)" to "$(suffix-y)", but didn't update any location
+where "suffix_y" is set, causing:
+
+  make[5]: *** No rule to make target `arch/m32r/boot/compressed/vmlinux.bin.', needed by `arch/m32r/boot/compressed/piggy.o'.  Stop.
+  make[4]: *** [arch/m32r/boot/compressed/vmlinux] Error 2
+  make[3]: *** [zImage] Error 2
+
+Correct the other locations to fix this.
+
+Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Cc: Hirokazu Takata <takata@linux-m32r.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/m32r/boot/compressed/Makefile |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/m32r/boot/compressed/Makefile
++++ b/arch/m32r/boot/compressed/Makefile
+@@ -43,9 +43,9 @@ endif
+ OBJCOPYFLAGS += -R .empty_zero_page
+-suffix_$(CONFIG_KERNEL_GZIP)  = gz
+-suffix_$(CONFIG_KERNEL_BZIP2) = bz2
+-suffix_$(CONFIG_KERNEL_LZMA)  = lzma
++suffix-$(CONFIG_KERNEL_GZIP)  = gz
++suffix-$(CONFIG_KERNEL_BZIP2) = bz2
++suffix-$(CONFIG_KERNEL_LZMA)  = lzma
+ $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
+       $(call if_changed,ld)
diff --git a/queue-3.4/m32r-make-memset-global-for-config_kernel_bzip2-y.patch b/queue-3.4/m32r-make-memset-global-for-config_kernel_bzip2-y.patch
new file mode 100644 (file)
index 0000000..1e1901a
--- /dev/null
@@ -0,0 +1,39 @@
+From 9a75c6e5240f7edc5955e8da5b94bde6f96070b3 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+Date: Tue, 17 Jul 2012 15:48:05 -0700
+Subject: m32r: make memset() global for CONFIG_KERNEL_BZIP2=y
+
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+
+commit 9a75c6e5240f7edc5955e8da5b94bde6f96070b3 upstream.
+
+Fix the m32r compile error:
+
+  arch/m32r/boot/compressed/misc.c:31:14: error: static declaration of 'memset' follows non-static declaration
+  make[5]: *** [arch/m32r/boot/compressed/misc.o] Error 1
+  make[4]: *** [arch/m32r/boot/compressed/vmlinux] Error 2
+
+by removing the static keyword.
+
+Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Cc: Hirokazu Takata <takata@linux-m32r.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/m32r/boot/compressed/misc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/m32r/boot/compressed/misc.c
++++ b/arch/m32r/boot/compressed/misc.c
+@@ -28,7 +28,7 @@ static unsigned long free_mem_ptr;
+ static unsigned long free_mem_end_ptr;
+ #ifdef CONFIG_KERNEL_BZIP2
+-static void *memset(void *s, int c, size_t n)
++void *memset(void *s, int c, size_t n)
+ {
+       char *ss = s;
diff --git a/queue-3.4/revert-kvm-x86-emulator-fix-source-operand-decoding-for-8bit-movx-instructions.patch b/queue-3.4/revert-kvm-x86-emulator-fix-source-operand-decoding-for-8bit-movx-instructions.patch
new file mode 100644 (file)
index 0000000..02b4df6
--- /dev/null
@@ -0,0 +1,57 @@
+From foo@baz Thu Sep 12 09:53:11 PDT 2013
+Date: Thu, 12 Sep 2013 09:53:11 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: Revert "KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x instructions"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit 5b5b30580218eae22609989546bac6e44d0eda6e, which was
+commit 660696d1d16a71e15549ce1bf74953be1592bcd3 upstream.
+
+Paul Gortmaker <paul.gortmaker@windriver.com> writes:
+
+[this patch] introduces the following:
+
+arch/x86/kvm/emulate.c: In function ‘decode_operand’:
+arch/x86/kvm/emulate.c:3974:4: warning: passing argument 1 of ‘decode_register’ makes integer from pointer
++without a cast [enabled by default]
+arch/x86/kvm/emulate.c:789:14: note: expected ‘u8’ but argument is of type ‘struct x86_emulate_ctxt *’
+arch/x86/kvm/emulate.c:3974:4: warning: passing argument 2 of ‘decode_register’ makes pointer from integer
++without a cast [enabled by default]
+arch/x86/kvm/emulate.c:789:14: note: expected ‘long unsigned int *’ but argument is of type ‘u8’
+
+Based on the severity of the warnings above, I'm reasonably sure there will
+be some kind of runtime regressions due to this, but I stopped to investigate
+the warnings as soon as I saw them, before any run time testing.
+
+It happens because mainline v3.7-rc1~113^2~40 (dd856efafe60) does this:
+
+-static void *decode_register(u8 modrm_reg, unsigned long *regs,
++static void *decode_register(struct x86_emulate_ctxt *ctxt, u8 modrm_reg,
+
+Since 660696d1d16a71e1 was only applied to stable 3.4, 3.8, and 3.9 -- and
+the prerequisite above is in 3.7+, the issue should be limited to 3.4.44+
+
+Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+Acked-by: Paolo Bonzini <pbonzini@redhat.com>
+Cc: Gleb Natapov <gleb@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/emulate.c |    4 ----
+ 1 file changed, 4 deletions(-)
+
+--- a/arch/x86/kvm/emulate.c
++++ b/arch/x86/kvm/emulate.c
+@@ -3737,10 +3737,6 @@ static int decode_operand(struct x86_emu
+               break;
+       case OpMem8:
+               ctxt->memop.bytes = 1;
+-              if (ctxt->memop.type == OP_REG) {
+-                      ctxt->memop.addr.reg = decode_register(ctxt, ctxt->modrm_rm, 1);
+-                      fetch_register_operand(&ctxt->memop);
+-              }
+               goto mem_common;
+       case OpMem16:
+               ctxt->memop.bytes = 2;
index b9e02d2e2fdcb758407dcd8d7a1cab320cb7c99d..fa01b08e88e32563ead07c66a3baaf1b0e5dffdd 100644 (file)
@@ -17,3 +17,7 @@ net-ipv6-tcp-fix-potential-use-after-free-in-tcp_v6_do_rcv.patch
 vhost-zerocopy-poll-vq-in-zerocopy-callback.patch
 macvtap-do-not-zerocopy-if-iov-needs-more-pages-than-max_skb_frags.patch
 tipc-fix-lockdep-warning-during-bearer-initialization.patch
+m32r-consistently-use-suffix.patch
+m32r-add-memcpy-for-config_kernel_gzip-y.patch
+m32r-make-memset-global-for-config_kernel_bzip2-y.patch
+revert-kvm-x86-emulator-fix-source-operand-decoding-for-8bit-movx-instructions.patch