]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.17-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Dec 2014 22:30:50 +0000 (14:30 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Dec 2014 22:30:50 +0000 (14:30 -0800)
added patches:
clk-qcom-fix-duplicate-rbcpr-clock-name.patch
drm-i915-ignore-long-hpds-on-edp-ports.patch
netfilter-conntrack-fix-race-in-__nf_conntrack_confirm-against-get_next_corpse.patch
x86-kvm-use-alternatives-for-vmcall-vs.-vmmcall-if-kernel-text-is-read-only.patch

queue-3.17/clk-qcom-fix-duplicate-rbcpr-clock-name.patch [new file with mode: 0644]
queue-3.17/drm-i915-ignore-long-hpds-on-edp-ports.patch [new file with mode: 0644]
queue-3.17/netfilter-conntrack-fix-race-in-__nf_conntrack_confirm-against-get_next_corpse.patch [new file with mode: 0644]
queue-3.17/series
queue-3.17/x86-kvm-use-alternatives-for-vmcall-vs.-vmmcall-if-kernel-text-is-read-only.patch [new file with mode: 0644]

diff --git a/queue-3.17/clk-qcom-fix-duplicate-rbcpr-clock-name.patch b/queue-3.17/clk-qcom-fix-duplicate-rbcpr-clock-name.patch
new file mode 100644 (file)
index 0000000..586bba8
--- /dev/null
@@ -0,0 +1,48 @@
+From 9a6cb70f40b0268297024949eb0a2689e3b7769b Mon Sep 17 00:00:00 2001
+From: Georgi Djakov <gdjakov@mm-sol.com>
+Date: Fri, 10 Oct 2014 16:57:24 +0300
+Subject: clk: qcom: Fix duplicate rbcpr clock name
+
+From: Georgi Djakov <gdjakov@mm-sol.com>
+
+commit 9a6cb70f40b0268297024949eb0a2689e3b7769b upstream.
+
+There is a duplication in a clock name for apq8084 platform that causes
+the following warning: "RBCPR_CLK_SRC" redefined
+
+Resolve this by adding a MMSS_ prefix to this clock and making its name
+coherent with msm8974 platform.
+
+Fixes: 2b46cd23a5a2 ("clk: qcom: Add APQ8084 Multimedia Clock Controller (MMCC) support")
+Signed-off-by: Georgi Djakov <gdjakov@mm-sol.com>
+Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
+Signed-off-by: Michael Turquette <mturquette@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clk/qcom/mmcc-apq8084.c               |    2 +-
+ include/dt-bindings/clock/qcom,mmcc-apq8084.h |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/clk/qcom/mmcc-apq8084.c
++++ b/drivers/clk/qcom/mmcc-apq8084.c
+@@ -3122,7 +3122,7 @@ static struct clk_regmap *mmcc_apq8084_c
+       [ESC1_CLK_SRC] = &esc1_clk_src.clkr,
+       [HDMI_CLK_SRC] = &hdmi_clk_src.clkr,
+       [VSYNC_CLK_SRC] = &vsync_clk_src.clkr,
+-      [RBCPR_CLK_SRC] = &rbcpr_clk_src.clkr,
++      [MMSS_RBCPR_CLK_SRC] = &rbcpr_clk_src.clkr,
+       [RBBMTIMER_CLK_SRC] = &rbbmtimer_clk_src.clkr,
+       [MAPLE_CLK_SRC] = &maple_clk_src.clkr,
+       [VDP_CLK_SRC] = &vdp_clk_src.clkr,
+--- a/include/dt-bindings/clock/qcom,mmcc-apq8084.h
++++ b/include/dt-bindings/clock/qcom,mmcc-apq8084.h
+@@ -60,7 +60,7 @@
+ #define ESC1_CLK_SRC                  43
+ #define HDMI_CLK_SRC                  44
+ #define VSYNC_CLK_SRC                 45
+-#define RBCPR_CLK_SRC                 46
++#define MMSS_RBCPR_CLK_SRC            46
+ #define RBBMTIMER_CLK_SRC             47
+ #define MAPLE_CLK_SRC                 48
+ #define VDP_CLK_SRC                   49
diff --git a/queue-3.17/drm-i915-ignore-long-hpds-on-edp-ports.patch b/queue-3.17/drm-i915-ignore-long-hpds-on-edp-ports.patch
new file mode 100644 (file)
index 0000000..a2f0662
--- /dev/null
@@ -0,0 +1,55 @@
+From 7a7f84ccb82e542c845c43f604665ccea1247866 Mon Sep 17 00:00:00 2001
+From: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Date: Thu, 16 Oct 2014 20:46:10 +0300
+Subject: drm/i915: Ignore long hpds on eDP ports
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ville Syrjälä <ville.syrjala@linux.intel.com>
+
+original upstream id: 7a7f84ccb82e542c845c43f604665ccea1247866
+
+Turning vdd on/off can generate a long hpd pulse on eDP ports. In order
+to handle hpd we would need to turn on vdd to perform aux transfers.
+This would lead to an endless cycle of
+"vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."
+
+So ignore long hpd pulses on eDP ports. eDP panels should be physically
+tied to the machine anyway so they should not actually disappear and
+thus don't need long hpd handling. Short hpds are still needed for link
+re-train and whatnot so we can't just turn off the hpd interrupt
+entirely for eDP ports. Perhaps we could turn it off whenever the panel
+is disabled, but just ignoring the long hpd seems sufficient.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Reviewed-by: Dave Airlie <airlied@redhat.com>
+Reviewed-by: Todd Previte <tprevite@gmail.com>
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_dp.c |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_dp.c
++++ b/drivers/gpu/drm/i915/intel_dp.c
+@@ -4084,6 +4084,18 @@ intel_dp_hpd_pulse(struct intel_digital_
+       if (intel_dig_port->base.type != INTEL_OUTPUT_EDP)
+               intel_dig_port->base.type = INTEL_OUTPUT_DISPLAYPORT;
++      if (long_hpd && intel_dig_port->base.type == INTEL_OUTPUT_EDP) {
++              /*
++               * vdd off can generate a long pulse on eDP which
++               * would require vdd on to handle it, and thus we
++               * would end up in an endless cycle of
++               * "vdd off -> long hpd -> vdd on -> detect -> vdd off -> ..."
++               */
++              DRM_DEBUG_KMS("ignoring long hpd on eDP port %c\n",
++                            port_name(intel_dig_port->port));
++              return false;
++      }
++
+       DRM_DEBUG_KMS("got hpd irq on port %d - %s\n", intel_dig_port->port,
+                     long_hpd ? "long" : "short");
diff --git a/queue-3.17/netfilter-conntrack-fix-race-in-__nf_conntrack_confirm-against-get_next_corpse.patch b/queue-3.17/netfilter-conntrack-fix-race-in-__nf_conntrack_confirm-against-get_next_corpse.patch
new file mode 100644 (file)
index 0000000..3c85eb2
--- /dev/null
@@ -0,0 +1,68 @@
+From 5195c14c8b27cc0b18220ddbf0e5ad3328a04187 Mon Sep 17 00:00:00 2001
+From: bill bonaparte <programme110@gmail.com>
+Date: Thu, 6 Nov 2014 14:36:48 +0100
+Subject: netfilter: conntrack: fix race in __nf_conntrack_confirm against get_next_corpse
+
+From: bill bonaparte <programme110@gmail.com>
+
+commit 5195c14c8b27cc0b18220ddbf0e5ad3328a04187 upstream.
+
+After removal of the central spinlock nf_conntrack_lock, in
+commit 93bb0ceb75be2 ("netfilter: conntrack: remove central
+spinlock nf_conntrack_lock"), it is possible to race against
+get_next_corpse().
+
+The race is against the get_next_corpse() cleanup on
+the "unconfirmed" list (a per-cpu list with seperate locking),
+which set the DYING bit.
+
+Fix this race, in __nf_conntrack_confirm(), by removing the CT
+from unconfirmed list before checking the DYING bit.  In case
+race occured, re-add the CT to the dying list.
+
+While at this, fix coding style of the comment that has been
+updated.
+
+Fixes: 93bb0ceb75be2 ("netfilter: conntrack: remove central spinlock nf_conntrack_lock")
+Reported-by: bill bonaparte <programme110@gmail.com>
+Signed-off-by: bill bonaparte <programme110@gmail.com>
+Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/netfilter/nf_conntrack_core.c |   14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/net/netfilter/nf_conntrack_core.c
++++ b/net/netfilter/nf_conntrack_core.c
+@@ -611,12 +611,16 @@ __nf_conntrack_confirm(struct sk_buff *s
+        */
+       NF_CT_ASSERT(!nf_ct_is_confirmed(ct));
+       pr_debug("Confirming conntrack %p\n", ct);
+-      /* We have to check the DYING flag inside the lock to prevent
+-         a race against nf_ct_get_next_corpse() possibly called from
+-         user context, else we insert an already 'dead' hash, blocking
+-         further use of that particular connection -JM */
++
++      /* We have to check the DYING flag after unlink to prevent
++       * a race against nf_ct_get_next_corpse() possibly called from
++       * user context, else we insert an already 'dead' hash, blocking
++       * further use of that particular connection -JM.
++       */
++      nf_ct_del_from_dying_or_unconfirmed_list(ct);
+       if (unlikely(nf_ct_is_dying(ct))) {
++              nf_ct_add_to_dying_list(ct);
+               nf_conntrack_double_unlock(hash, reply_hash);
+               local_bh_enable();
+               return NF_ACCEPT;
+@@ -636,8 +640,6 @@ __nf_conntrack_confirm(struct sk_buff *s
+                   zone == nf_ct_zone(nf_ct_tuplehash_to_ctrack(h)))
+                       goto out;
+-      nf_ct_del_from_dying_or_unconfirmed_list(ct);
+-
+       /* Timer relative to confirmation time, not original
+          setting time, otherwise we'd get timer wrap in
+          weird delay cases. */
index adeaff0aec8ccbfba3b282e6900e6f7f80024530..1a87c26d0de84284c96e60d78237d12ee8e31ca0 100644 (file)
@@ -116,3 +116,7 @@ bitops-fix-shift-overflow-in-genmask-macros.patch
 powerpc-powernv-honor-the-generic-no_64bit_msi-flag.patch
 iwlwifi-mvm-roc-bug-fixes-around-time-events-and-locking.patch
 iwlwifi-mvm-check-tlv-flag-before-trying-to-use-hotspot.patch
+drm-i915-ignore-long-hpds-on-edp-ports.patch
+clk-qcom-fix-duplicate-rbcpr-clock-name.patch
+x86-kvm-use-alternatives-for-vmcall-vs.-vmmcall-if-kernel-text-is-read-only.patch
+netfilter-conntrack-fix-race-in-__nf_conntrack_confirm-against-get_next_corpse.patch
diff --git a/queue-3.17/x86-kvm-use-alternatives-for-vmcall-vs.-vmmcall-if-kernel-text-is-read-only.patch b/queue-3.17/x86-kvm-use-alternatives-for-vmcall-vs.-vmmcall-if-kernel-text-is-read-only.patch
new file mode 100644 (file)
index 0000000..ed299a9
--- /dev/null
@@ -0,0 +1,89 @@
+From c1118b3602c2329671ad5ec8bdf8e374323d6343 Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Mon, 22 Sep 2014 13:17:48 +0200
+Subject: x86: kvm: use alternatives for VMCALL vs. VMMCALL if kernel text is read-only
+
+From: Paolo Bonzini <pbonzini@redhat.com>
+
+commit c1118b3602c2329671ad5ec8bdf8e374323d6343 upstream.
+
+On x86_64, kernel text mappings are mapped read-only with CONFIG_DEBUG_RODATA.
+In that case, KVM will fail to patch VMCALL instructions to VMMCALL
+as required on AMD processors.
+
+The failure mode is currently a divide-by-zero exception, which obviously
+is a KVM bug that has to be fixed.  However, picking the right instruction
+between VMCALL and VMMCALL will be faster and will help if you cannot upgrade
+the hypervisor.
+
+Reported-by: Chris Webb <chris@arachsys.com>
+Tested-by: Chris Webb <chris@arachsys.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: x86@kernel.org
+Acked-by: Borislav Petkov <bp@suse.de>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Cc: Chris J Arges <chris.j.arges@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/include/asm/cpufeature.h |    1 +
+ arch/x86/include/asm/kvm_para.h   |   10 ++++++++--
+ arch/x86/kernel/cpu/amd.c         |    7 +++++++
+ 3 files changed, 16 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/include/asm/cpufeature.h
++++ b/arch/x86/include/asm/cpufeature.h
+@@ -202,6 +202,7 @@
+ #define X86_FEATURE_DECODEASSISTS ( 8*32+12) /* AMD Decode Assists support */
+ #define X86_FEATURE_PAUSEFILTER ( 8*32+13) /* AMD filtered pause intercept */
+ #define X86_FEATURE_PFTHRESHOLD ( 8*32+14) /* AMD pause filter threshold */
++#define X86_FEATURE_VMMCALL     ( 8*32+15) /* Prefer vmmcall to vmcall */
+ /* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */
+--- a/arch/x86/include/asm/kvm_para.h
++++ b/arch/x86/include/asm/kvm_para.h
+@@ -2,6 +2,7 @@
+ #define _ASM_X86_KVM_PARA_H
+ #include <asm/processor.h>
++#include <asm/alternative.h>
+ #include <uapi/asm/kvm_para.h>
+ extern void kvmclock_init(void);
+@@ -16,10 +17,15 @@ static inline bool kvm_check_and_clear_g
+ }
+ #endif /* CONFIG_KVM_GUEST */
+-/* This instruction is vmcall.  On non-VT architectures, it will generate a
+- * trap that we will then rewrite to the appropriate instruction.
++#ifdef CONFIG_DEBUG_RODATA
++#define KVM_HYPERCALL \
++        ALTERNATIVE(".byte 0x0f,0x01,0xc1", ".byte 0x0f,0x01,0xd9", X86_FEATURE_VMMCALL)
++#else
++/* On AMD processors, vmcall will generate a trap that we will
++ * then rewrite to the appropriate instruction.
+  */
+ #define KVM_HYPERCALL ".byte 0x0f,0x01,0xc1"
++#endif
+ /* For KVM hypercalls, a three-byte sequence of either the vmcall or the vmmcall
+  * instruction.  The hypervisor may replace it with something else but only the
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -525,6 +525,13 @@ static void early_init_amd(struct cpuinf
+       }
+ #endif
++      /*
++       * This is only needed to tell the kernel whether to use VMCALL
++       * and VMMCALL.  VMMCALL is never executed except under virt, so
++       * we can set it unconditionally.
++       */
++      set_cpu_cap(c, X86_FEATURE_VMMCALL);
++
+       /* F16h erratum 793, CVE-2013-6885 */
+       if (c->x86 == 0x16 && c->x86_model <= 0xf)
+               msr_set_bit(MSR_AMD64_LS_CFG, 15);