]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Dec 2013 19:25:22 +0000 (11:25 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Dec 2013 19:25:22 +0000 (11:25 -0800)
added patches:
x86-build-icc-remove-uninitialized_var-from-compiler-intel.h.patch
x86-build-pass-in-additional-mno-mmx-mno-sse-options.patch
x86-uv-fix-null-pointer-dereference-in-uv_flush_tlb_others-if-the-nobau-boot-option-is-used.patch

queue-3.12/series
queue-3.12/x86-build-icc-remove-uninitialized_var-from-compiler-intel.h.patch [new file with mode: 0644]
queue-3.12/x86-build-pass-in-additional-mno-mmx-mno-sse-options.patch [new file with mode: 0644]
queue-3.12/x86-uv-fix-null-pointer-dereference-in-uv_flush_tlb_others-if-the-nobau-boot-option-is-used.patch [new file with mode: 0644]

index ed3f2db486f5a8dd4b687ef211458d1ee81fd171..2114eb687d7e82e3621772d553f4459561e69305 100644 (file)
@@ -65,3 +65,6 @@ drm-radeon-program-dce2-audio-dto-just-like-dce3.patch
 drm-radeon-fixup-bad-vram-size-on-si.patch
 drm-radeon-atom-fix-bus-probes-when-hw_i2c-is-set-v2.patch
 x86-efi-don-t-use-u-efi-time-services-on-32-bit.patch
+x86-uv-fix-null-pointer-dereference-in-uv_flush_tlb_others-if-the-nobau-boot-option-is-used.patch
+x86-build-pass-in-additional-mno-mmx-mno-sse-options.patch
+x86-build-icc-remove-uninitialized_var-from-compiler-intel.h.patch
diff --git a/queue-3.12/x86-build-icc-remove-uninitialized_var-from-compiler-intel.h.patch b/queue-3.12/x86-build-icc-remove-uninitialized_var-from-compiler-intel.h.patch
new file mode 100644 (file)
index 0000000..5d3738f
--- /dev/null
@@ -0,0 +1,36 @@
+From 503cf95c061a0551eb684da364509297efbe55d9 Mon Sep 17 00:00:00 2001
+From: "H. Peter Anvin" <hpa@linux.intel.com>
+Date: Tue, 10 Dec 2013 14:56:06 -0800
+Subject: x86, build, icc: Remove uninitialized_var() from compiler-intel.h
+
+From: "H. Peter Anvin" <hpa@linux.intel.com>
+
+commit 503cf95c061a0551eb684da364509297efbe55d9 upstream.
+
+When compiling with icc, <linux/compiler-gcc.h> ends up included
+because the icc environment defines __GNUC__.  Thus, we neither need
+nor want to have this macro defined in both compiler-gcc.h and
+compiler-intel.h, and the fact that they are inconsistent just makes
+the compiler spew warnings.
+
+Reported-by: Sunil K. Pandey <sunil.k.pandey@intel.com>
+Cc: Kevin B. Smith <kevin.b.smith@intel.com>
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Link: http://lkml.kernel.org/n/tip-0mbwou1zt7pafij09b897lg3@git.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/compiler-intel.h |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/include/linux/compiler-intel.h
++++ b/include/linux/compiler-intel.h
+@@ -28,8 +28,6 @@
+ #endif
+-#define uninitialized_var(x) x
+-
+ #ifndef __HAVE_BUILTIN_BSWAP16__
+ /* icc has this, but it's called _bswap16 */
+ #define __HAVE_BUILTIN_BSWAP16__
diff --git a/queue-3.12/x86-build-pass-in-additional-mno-mmx-mno-sse-options.patch b/queue-3.12/x86-build-pass-in-additional-mno-mmx-mno-sse-options.patch
new file mode 100644 (file)
index 0000000..f297acc
--- /dev/null
@@ -0,0 +1,111 @@
+From 8b3b005d675726e38bc504d2e35a991e55819155 Mon Sep 17 00:00:00 2001
+From: "H. Peter Anvin" <hpa@linux.intel.com>
+Date: Mon, 9 Dec 2013 15:43:38 -0800
+Subject: x86, build: Pass in additional -mno-mmx, -mno-sse options
+
+From: "H. Peter Anvin" <hpa@linux.intel.com>
+
+commit 8b3b005d675726e38bc504d2e35a991e55819155 upstream.
+
+In checkin
+
+    5551a34e5aea x86-64, build: Always pass in -mno-sse
+
+we unconditionally added -mno-sse to the main build, to keep newer
+compilers from generating SSE instructions from autovectorization.
+However, this did not extend to the special environments
+(arch/x86/boot, arch/x86/boot/compressed, and arch/x86/realmode/rm).
+Add -mno-sse to the compiler command line for these environments, and
+add -mno-mmx to all the environments as well, as we don't want a
+compiler to generate MMX code either.
+
+This patch also removes a $(cc-option) call for -m32, since we have
+long since stopped supporting compilers too old for the -m32 option,
+and in fact hardcode it in other places in the Makefiles.
+
+Reported-by: Kevin B. Smith <kevin.b.smith@intel.com>
+Cc: Sunil K. Pandey <sunil.k.pandey@intel.com>
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Cc: H. J. Lu <hjl.tools@gmail.com>
+Link: http://lkml.kernel.org/n/tip-j21wzqv790q834n7yc6g80j1@git.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/Makefile                 |    8 ++++----
+ arch/x86/boot/Makefile            |    6 +++---
+ arch/x86/boot/compressed/Makefile |    1 +
+ arch/x86/realmode/rm/Makefile     |    3 ++-
+ 4 files changed, 10 insertions(+), 8 deletions(-)
+
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -31,8 +31,8 @@ ifeq ($(CONFIG_X86_32),y)
+         KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return
+-        # Don't autogenerate SSE instructions
+-      KBUILD_CFLAGS += -mno-sse
++        # Don't autogenerate MMX or SSE instructions
++        KBUILD_CFLAGS += -mno-mmx -mno-sse
+         # Never want PIC in a 32-bit kernel, prevent breakage with GCC built
+         # with nonstandard options
+@@ -60,8 +60,8 @@ else
+         KBUILD_AFLAGS += -m64
+         KBUILD_CFLAGS += -m64
+-        # Don't autogenerate SSE instructions
+-      KBUILD_CFLAGS += -mno-sse
++        # Don't autogenerate MMX or SSE instructions
++        KBUILD_CFLAGS += -mno-mmx -mno-sse
+       # Use -mpreferred-stack-boundary=3 if supported.
+       KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3)
+--- a/arch/x86/boot/Makefile
++++ b/arch/x86/boot/Makefile
+@@ -53,18 +53,18 @@ $(obj)/cpustr.h: $(obj)/mkcpustr FORCE
+ # How to compile the 16-bit code.  Note we always compile for -march=i386,
+ # that way we can complain to the user if the CPU is insufficient.
+-KBUILD_CFLAGS := $(USERINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
++KBUILD_CFLAGS := $(USERINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ \
+                  -DDISABLE_BRANCH_PROFILING \
+                  -Wall -Wstrict-prototypes \
+                  -march=i386 -mregparm=3 \
+                  -include $(srctree)/$(src)/code16gcc.h \
+                  -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
++                 -mno-mmx -mno-sse \
+                  $(call cc-option, -ffreestanding) \
+                  $(call cc-option, -fno-toplevel-reorder,\
+-                      $(call cc-option, -fno-unit-at-a-time)) \
++                 $(call cc-option, -fno-unit-at-a-time)) \
+                  $(call cc-option, -fno-stack-protector) \
+                  $(call cc-option, -mpreferred-stack-boundary=2)
+-KBUILD_CFLAGS += $(call cc-option, -m32)
+ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
+ GCOV_PROFILE := n
+--- a/arch/x86/boot/compressed/Makefile
++++ b/arch/x86/boot/compressed/Makefile
+@@ -13,6 +13,7 @@ KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFIL
+ cflags-$(CONFIG_X86_32) := -march=i386
+ cflags-$(CONFIG_X86_64) := -mcmodel=small
+ KBUILD_CFLAGS += $(cflags-y)
++KBUILD_CFLAGS += -mno-mmx -mno-sse
+ KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
+ KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
+--- a/arch/x86/realmode/rm/Makefile
++++ b/arch/x86/realmode/rm/Makefile
+@@ -73,9 +73,10 @@ KBUILD_CFLAGS       := $(LINUXINCLUDE) -m32 -g
+                  -march=i386 -mregparm=3 \
+                  -include $(srctree)/$(src)/../../boot/code16gcc.h \
+                  -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
++                 -mno-mmx -mno-sse \
+                  $(call cc-option, -ffreestanding) \
+                  $(call cc-option, -fno-toplevel-reorder,\
+-                      $(call cc-option, -fno-unit-at-a-time)) \
++                 $(call cc-option, -fno-unit-at-a-time)) \
+                  $(call cc-option, -fno-stack-protector) \
+                  $(call cc-option, -mpreferred-stack-boundary=2)
+ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
diff --git a/queue-3.12/x86-uv-fix-null-pointer-dereference-in-uv_flush_tlb_others-if-the-nobau-boot-option-is-used.patch b/queue-3.12/x86-uv-fix-null-pointer-dereference-in-uv_flush_tlb_others-if-the-nobau-boot-option-is-used.patch
new file mode 100644 (file)
index 0000000..460593e
--- /dev/null
@@ -0,0 +1,48 @@
+From 3eae49ca8954f958b2001ab5643ef302cb7b67c7 Mon Sep 17 00:00:00 2001
+From: cpw <cpw@sgi.com>
+Date: Tue, 3 Dec 2013 17:15:30 -0600
+Subject: x86/UV: Fix NULL pointer dereference in uv_flush_tlb_others() if the 'nobau' boot option is used
+
+From: cpw <cpw@sgi.com>
+
+commit 3eae49ca8954f958b2001ab5643ef302cb7b67c7 upstream.
+
+The SGI UV tlb shootdown code panics the system with a NULL
+pointer deference if 'nobau' is specified on the boot
+commandline.
+
+uv_flush_tlb_other() gets called for every flush, whether the
+BAU is disabled or not.  It should not be keeping the s_enters
+statistic while the BAU is disabled.
+
+The panic occurs because during initialization
+init_per_cpu_tunables() does not set the bcp->statp pointer if
+'nobau' was specified.
+
+Signed-off-by: Cliff Wickman <cpw@sgi.com>
+Link: http://lkml.kernel.org/r/E1VnzBi-0005yF-MU@eag09.americas.sgi.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/platform/uv/tlb_uv.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/platform/uv/tlb_uv.c
++++ b/arch/x86/platform/uv/tlb_uv.c
+@@ -1070,12 +1070,13 @@ const struct cpumask *uv_flush_tlb_other
+       unsigned long status;
+       bcp = &per_cpu(bau_control, cpu);
+-      stat = bcp->statp;
+-      stat->s_enters++;
+       if (bcp->nobau)
+               return cpumask;
++      stat = bcp->statp;
++      stat->s_enters++;
++
+       if (bcp->busy) {
+               descriptor_status =
+                       read_lmmr(UVH_LB_BAU_SB_ACTIVATION_STATUS_0);