From: Greg Kroah-Hartman Date: Fri, 5 Dec 2014 22:30:50 +0000 (-0800) Subject: 3.17-stable patches X-Git-Tag: v3.10.62~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a055c89cdbc4a521456b3430cadaa52fdeeb6284;p=thirdparty%2Fkernel%2Fstable-queue.git 3.17-stable patches 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 --- 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 index 00000000000..586bba8bcb5 --- /dev/null +++ b/queue-3.17/clk-qcom-fix-duplicate-rbcpr-clock-name.patch @@ -0,0 +1,48 @@ +From 9a6cb70f40b0268297024949eb0a2689e3b7769b Mon Sep 17 00:00:00 2001 +From: Georgi Djakov +Date: Fri, 10 Oct 2014 16:57:24 +0300 +Subject: clk: qcom: Fix duplicate rbcpr clock name + +From: Georgi Djakov + +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 +Reviewed-by: Stephen Boyd +Signed-off-by: Michael Turquette +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..a2f0662c83c --- /dev/null +++ b/queue-3.17/drm-i915-ignore-long-hpds-on-edp-ports.patch @@ -0,0 +1,55 @@ +From 7a7f84ccb82e542c845c43f604665ccea1247866 Mon Sep 17 00:00:00 2001 +From: Ville Syrjälä +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ä + +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ä +Reviewed-by: Dave Airlie +Reviewed-by: Todd Previte +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..3c85eb29d26 --- /dev/null +++ b/queue-3.17/netfilter-conntrack-fix-race-in-__nf_conntrack_confirm-against-get_next_corpse.patch @@ -0,0 +1,68 @@ +From 5195c14c8b27cc0b18220ddbf0e5ad3328a04187 Mon Sep 17 00:00:00 2001 +From: bill bonaparte +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 + +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 +Signed-off-by: bill bonaparte +Signed-off-by: Jesper Dangaard Brouer +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Greg Kroah-Hartman + +--- + 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. */ diff --git a/queue-3.17/series b/queue-3.17/series index adeaff0aec8..1a87c26d0de 100644 --- a/queue-3.17/series +++ b/queue-3.17/series @@ -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 index 00000000000..ed299a9e24b --- /dev/null +++ b/queue-3.17/x86-kvm-use-alternatives-for-vmcall-vs.-vmmcall-if-kernel-text-is-read-only.patch @@ -0,0 +1,89 @@ +From c1118b3602c2329671ad5ec8bdf8e374323d6343 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +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 + +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 +Tested-by: Chris Webb +Cc: Thomas Gleixner +Cc: Ingo Molnar +Cc: "H. Peter Anvin" +Cc: x86@kernel.org +Acked-by: Borislav Petkov +Signed-off-by: Paolo Bonzini +Cc: Chris J Arges +Signed-off-by: Greg Kroah-Hartman + +--- + 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 ++#include + #include + + 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);