]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jan 2015 22:17:25 +0000 (14:17 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jan 2015 22:17:25 +0000 (14:17 -0800)
added patches:
can-dev-fix-crtlmode_supported-check.patch
clocksource-exynos_mct-fix-bitmask-regression-for-exynos4_mct_write.patch
x86-boot-skip-relocs-when-load-address-unchanged.patch
x86-hyperv-mark-the-hyper-v-clocksource-as-being-continuous.patch
x86-tsc-change-fast-tsc-calibration-failed-from-error-to-info.patch

queue-3.14/can-dev-fix-crtlmode_supported-check.patch [new file with mode: 0644]
queue-3.14/clocksource-exynos_mct-fix-bitmask-regression-for-exynos4_mct_write.patch [new file with mode: 0644]
queue-3.14/series
queue-3.14/x86-boot-skip-relocs-when-load-address-unchanged.patch [new file with mode: 0644]
queue-3.14/x86-hyperv-mark-the-hyper-v-clocksource-as-being-continuous.patch [new file with mode: 0644]
queue-3.14/x86-tsc-change-fast-tsc-calibration-failed-from-error-to-info.patch [new file with mode: 0644]

diff --git a/queue-3.14/can-dev-fix-crtlmode_supported-check.patch b/queue-3.14/can-dev-fix-crtlmode_supported-check.patch
new file mode 100644 (file)
index 0000000..18ce179
--- /dev/null
@@ -0,0 +1,47 @@
+From 9b1087aa5e86448fe6ad40a58964e35f3ba423d5 Mon Sep 17 00:00:00 2001
+From: Oliver Hartkopp <socketcan@hartkopp.net>
+Date: Mon, 5 Jan 2015 18:40:15 +0100
+Subject: can: dev: fix crtlmode_supported check
+
+From: Oliver Hartkopp <socketcan@hartkopp.net>
+
+commit 9b1087aa5e86448fe6ad40a58964e35f3ba423d5 upstream.
+
+When changing flags in the CAN drivers ctrlmode the provided new content has to
+be checked whether the bits are allowed to be changed. The bits that are to be
+changed are given as a bitfield in cm->mask. Therefore checking against
+cm->flags is wrong as the content can hold any kind of values.
+
+The iproute2 tool sets the bits in cm->mask and cm->flags depending on the
+detected command line options. To be robust against bogus user space
+applications additionally sanitize the provided flags with the provided mask.
+
+Cc: Wolfgang Grandegger <wg@grandegger.com>
+Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/net/can/dev.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/can/dev.c
++++ b/drivers/net/can/dev.c
+@@ -664,10 +664,14 @@ static int can_changelink(struct net_dev
+               if (dev->flags & IFF_UP)
+                       return -EBUSY;
+               cm = nla_data(data[IFLA_CAN_CTRLMODE]);
+-              if (cm->flags & ~priv->ctrlmode_supported)
++
++              /* check whether changed bits are allowed to be modified */
++              if (cm->mask & ~priv->ctrlmode_supported)
+                       return -EOPNOTSUPP;
++
++              /* clear bits to be modified and copy the flag values */
+               priv->ctrlmode &= ~cm->mask;
+-              priv->ctrlmode |= cm->flags;
++              priv->ctrlmode |= (cm->flags & cm->mask);
+       }
+       if (data[IFLA_CAN_RESTART_MS]) {
diff --git a/queue-3.14/clocksource-exynos_mct-fix-bitmask-regression-for-exynos4_mct_write.patch b/queue-3.14/clocksource-exynos_mct-fix-bitmask-regression-for-exynos4_mct_write.patch
new file mode 100644 (file)
index 0000000..676378e
--- /dev/null
@@ -0,0 +1,42 @@
+From 8c38d28ba8da98f7102c31d35359b4dbe9d1f329 Mon Sep 17 00:00:00 2001
+From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
+Date: Wed, 22 Oct 2014 03:37:08 +0200
+Subject: clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write
+
+From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
+
+commit 8c38d28ba8da98f7102c31d35359b4dbe9d1f329 upstream.
+
+EXYNOS4_MCT_L_MASK is defined as 0xffffff00, so applying this bitmask
+produces a number outside the range 0x00 to 0xff, which always results
+in execution of the default switch statement.
+
+Obviously this is wrong and git history shows that the bitmask inversion
+was incorrectly set during a refactoring of the MCT code.
+
+Fix this by putting the inversion at the correct position again.
+
+Acked-by: Kukjin Kim <kgene.kim@samsung.com>
+Reported-by: GP Orcullo <kinsamanka@gmail.com>
+Reviewed-by: Doug Anderson <dianders@chromium.org>
+Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
+Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clocksource/exynos_mct.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/clocksource/exynos_mct.c
++++ b/drivers/clocksource/exynos_mct.c
+@@ -98,8 +98,8 @@ static void exynos4_mct_write(unsigned i
+       __raw_writel(value, reg_base + offset);
+       if (likely(offset >= EXYNOS4_MCT_L_BASE(0))) {
+-              stat_addr = (offset & ~EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
+-              switch (offset & EXYNOS4_MCT_L_MASK) {
++              stat_addr = (offset & EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
++              switch (offset & ~EXYNOS4_MCT_L_MASK) {
+               case MCT_L_TCON_OFFSET:
+                       mask = 1 << 3;          /* L_TCON write status */
+                       break;
index e4d1c329edb3916324a7a792fa2a5e24c6139b49..ef07b9132f694bfa1bd66038bcfe98f8102f1913 100644 (file)
@@ -18,3 +18,8 @@ time-adjtimex-validate-the-adj_frequency-values.patch
 arm-dts-imx25-fix-pwm-per-clocks.patch
 bus-mvebu-mbus-fix-support-of-mbus-window-13.patch
 fix-deadlock-in-cifs_ioctl_clone.patch
+can-dev-fix-crtlmode_supported-check.patch
+clocksource-exynos_mct-fix-bitmask-regression-for-exynos4_mct_write.patch
+x86-hyperv-mark-the-hyper-v-clocksource-as-being-continuous.patch
+x86-tsc-change-fast-tsc-calibration-failed-from-error-to-info.patch
+x86-boot-skip-relocs-when-load-address-unchanged.patch
diff --git a/queue-3.14/x86-boot-skip-relocs-when-load-address-unchanged.patch b/queue-3.14/x86-boot-skip-relocs-when-load-address-unchanged.patch
new file mode 100644 (file)
index 0000000..de303ae
--- /dev/null
@@ -0,0 +1,53 @@
+From f285f4a21c3253887caceed493089ece17579d59 Mon Sep 17 00:00:00 2001
+From: Kees Cook <keescook@chromium.org>
+Date: Thu, 15 Jan 2015 16:51:46 -0800
+Subject: x86, boot: Skip relocs when load address unchanged
+
+From: Kees Cook <keescook@chromium.org>
+
+commit f285f4a21c3253887caceed493089ece17579d59 upstream.
+
+On 64-bit, relocation is not required unless the load address gets
+changed. Without this, relocations do unexpected things when the kernel
+is above 4G.
+
+Reported-by: Baoquan He <bhe@redhat.com>
+Signed-off-by: Kees Cook <keescook@chromium.org>
+Tested-by: Thomas D. <whissi@whissi.de>
+Cc: Vivek Goyal <vgoyal@redhat.com>
+Cc: Jan Beulich <JBeulich@suse.com>
+Cc: Junjie Mao <eternal.n08@gmail.com>
+Cc: Andi Kleen <ak@linux.intel.com>
+Link: http://lkml.kernel.org/r/20150116005146.GA4212@www.outflux.net
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/boot/compressed/misc.c |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/boot/compressed/misc.c
++++ b/arch/x86/boot/compressed/misc.c
+@@ -396,6 +396,8 @@ asmlinkage void *decompress_kernel(void
+                                 unsigned long output_len,
+                                 unsigned long run_size)
+ {
++      unsigned char *output_orig = output;
++
+       real_mode = rmode;
+       sanitize_boot_params(real_mode);
+@@ -444,7 +446,12 @@ asmlinkage void *decompress_kernel(void
+       debug_putstr("\nDecompressing Linux... ");
+       decompress(input_data, input_len, NULL, NULL, output, NULL, error);
+       parse_elf(output);
+-      handle_relocations(output, output_len);
++      /*
++       * 32-bit always performs relocations. 64-bit relocations are only
++       * needed if kASLR has chosen a different load address.
++       */
++      if (!IS_ENABLED(CONFIG_X86_64) || output != output_orig)
++              handle_relocations(output, output_len);
+       debug_putstr("done.\nBooting the kernel.\n");
+       return output;
+ }
diff --git a/queue-3.14/x86-hyperv-mark-the-hyper-v-clocksource-as-being-continuous.patch b/queue-3.14/x86-hyperv-mark-the-hyper-v-clocksource-as-being-continuous.patch
new file mode 100644 (file)
index 0000000..96344ba
--- /dev/null
@@ -0,0 +1,35 @@
+From 32c6590d126836a062b3140ed52d898507987017 Mon Sep 17 00:00:00 2001
+From: "K. Y. Srinivasan" <kys@microsoft.com>
+Date: Mon, 12 Jan 2015 16:26:02 -0800
+Subject: x86, hyperv: Mark the Hyper-V clocksource as being continuous
+
+From: "K. Y. Srinivasan" <kys@microsoft.com>
+
+commit 32c6590d126836a062b3140ed52d898507987017 upstream.
+
+The Hyper-V clocksource is continuous; mark it accordingly.
+
+Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
+Acked-by: jasowang@redhat.com
+Cc: gregkh@linuxfoundation.org
+Cc: devel@linuxdriverproject.org
+Cc: olaf@aepfle.de
+Cc: apw@canonical.com
+Link: http://lkml.kernel.org/r/1421108762-3331-1-git-send-email-kys@microsoft.com
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/cpu/mshyperv.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/x86/kernel/cpu/mshyperv.c
++++ b/arch/x86/kernel/cpu/mshyperv.c
+@@ -67,6 +67,7 @@ static struct clocksource hyperv_cs = {
+       .rating         = 400, /* use this when running on Hyperv*/
+       .read           = read_hv_clock,
+       .mask           = CLOCKSOURCE_MASK(64),
++      .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
+ };
+ static void __init ms_hyperv_init_platform(void)
diff --git a/queue-3.14/x86-tsc-change-fast-tsc-calibration-failed-from-error-to-info.patch b/queue-3.14/x86-tsc-change-fast-tsc-calibration-failed-from-error-to-info.patch
new file mode 100644 (file)
index 0000000..9d0ef7a
--- /dev/null
@@ -0,0 +1,44 @@
+From 520452172e6b318f3a8bd9d4fe1e25066393de25 Mon Sep 17 00:00:00 2001
+From: Alexandre Demers <alexandre.f.demers@gmail.com>
+Date: Tue, 9 Dec 2014 01:27:50 -0500
+Subject: x86/tsc: Change Fast TSC calibration failed from error to info
+
+From: Alexandre Demers <alexandre.f.demers@gmail.com>
+
+commit 520452172e6b318f3a8bd9d4fe1e25066393de25 upstream.
+
+Many users see this message when booting without knowning that it is
+of no importance and that TSC calibration may have succeeded by
+another way.
+
+As explained by Paul Bolle in
+http://lkml.kernel.org/r/1348488259.1436.22.camel@x61.thuisdomein
+
+  "Fast TSC calibration failed" should not be considered as an error
+  since other calibration methods are being tried afterward. At most,
+  those send a warning if they fail (not an error). So let's change
+  the message from error to warning.
+
+[ tglx: Make if pr_info. It's really not important at all ]
+
+Fixes: c767a54ba065 x86/debug: Add KERN_<LEVEL> to bare printks, convert printks to pr_<level>
+Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
+Link: http://lkml.kernel.org/r/1418106470-6906-1-git-send-email-alexandre.f.demers@gmail.com
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/tsc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/tsc.c
++++ b/arch/x86/kernel/tsc.c
+@@ -618,7 +618,7 @@ static unsigned long quick_pit_calibrate
+                       goto success;
+               }
+       }
+-      pr_err("Fast TSC calibration failed\n");
++      pr_info("Fast TSC calibration failed\n");
+       return 0;
+ success: