From: Greg Kroah-Hartman Date: Wed, 4 Mar 2015 04:45:21 +0000 (-0800) Subject: 3.10-stable patches X-Git-Tag: v3.10.71~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9c82a6fc1e85f35965467be7d867d03333960ad;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: arm64-compat-fix-siginfo_t-compat_siginfo_t-conversion-on-big-endian.patch hx4700-regulator-declare-full-constraints.patch kvm-x86-update-masterclock-values-on-tsc-writes.patch --- diff --git a/queue-3.10/arm64-compat-fix-siginfo_t-compat_siginfo_t-conversion-on-big-endian.patch b/queue-3.10/arm64-compat-fix-siginfo_t-compat_siginfo_t-conversion-on-big-endian.patch new file mode 100644 index 00000000000..e66eba06c51 --- /dev/null +++ b/queue-3.10/arm64-compat-fix-siginfo_t-compat_siginfo_t-conversion-on-big-endian.patch @@ -0,0 +1,51 @@ +From 9d42d48a342aee208c1154696196497fdc556bbf Mon Sep 17 00:00:00 2001 +From: Catalin Marinas +Date: Mon, 23 Feb 2015 15:13:40 +0000 +Subject: arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian + +From: Catalin Marinas + +commit 9d42d48a342aee208c1154696196497fdc556bbf upstream. + +The native (64-bit) sigval_t union contains sival_int (32-bit) and +sival_ptr (64-bit). When a compat application invokes a syscall that +takes a sigval_t value (as part of a larger structure, e.g. +compat_sys_mq_notify, compat_sys_timer_create), the compat_sigval_t +union is converted to the native sigval_t with sival_int overlapping +with either the least or the most significant half of sival_ptr, +depending on endianness. When the corresponding signal is delivered to a +compat application, on big endian the current (compat_uptr_t)sival_ptr +cast always returns 0 since sival_int corresponds to the top part of +sival_ptr. This patch fixes copy_siginfo_to_user32() so that sival_int +is copied to the compat_siginfo_t structure. + +Reported-by: Bamvor Jian Zhang +Tested-by: Bamvor Jian Zhang +Signed-off-by: Catalin Marinas +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/kernel/signal32.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/arch/arm64/kernel/signal32.c ++++ b/arch/arm64/kernel/signal32.c +@@ -179,8 +179,7 @@ int copy_siginfo_to_user32(compat_siginf + case __SI_TIMER: + err |= __put_user(from->si_tid, &to->si_tid); + err |= __put_user(from->si_overrun, &to->si_overrun); +- err |= __put_user((compat_uptr_t)(unsigned long)from->si_ptr, +- &to->si_ptr); ++ err |= __put_user(from->si_int, &to->si_int); + break; + case __SI_POLL: + err |= __put_user(from->si_band, &to->si_band); +@@ -209,7 +208,7 @@ int copy_siginfo_to_user32(compat_siginf + case __SI_MESGQ: /* But this is */ + err |= __put_user(from->si_pid, &to->si_pid); + err |= __put_user(from->si_uid, &to->si_uid); +- err |= __put_user((compat_uptr_t)(unsigned long)from->si_ptr, &to->si_ptr); ++ err |= __put_user(from->si_int, &to->si_int); + break; + default: /* this is just in case for now ... */ + err |= __put_user(from->si_pid, &to->si_pid); diff --git a/queue-3.10/hx4700-regulator-declare-full-constraints.patch b/queue-3.10/hx4700-regulator-declare-full-constraints.patch new file mode 100644 index 00000000000..2033010373f --- /dev/null +++ b/queue-3.10/hx4700-regulator-declare-full-constraints.patch @@ -0,0 +1,32 @@ +From a52d209336f8fc7483a8c7f4a8a7d2a8e1692a6c Mon Sep 17 00:00:00 2001 +From: Martin Vajnar +Date: Wed, 24 Dec 2014 00:27:57 +0100 +Subject: hx4700: regulator: declare full constraints + +From: Martin Vajnar + +commit a52d209336f8fc7483a8c7f4a8a7d2a8e1692a6c upstream. + +Since the removal of CONFIG_REGULATOR_DUMMY option, the touchscreen stopped +working. This patch enables the "replacement" for REGULATOR_DUMMY and +allows the touchscreen to work even though there is no regulator for "vcc". + +Signed-off-by: Martin Vajnar +Signed-off-by: Robert Jarzmik +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-pxa/hx4700.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm/mach-pxa/hx4700.c ++++ b/arch/arm/mach-pxa/hx4700.c +@@ -891,6 +891,8 @@ static void __init hx4700_init(void) + mdelay(10); + gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 1); + mdelay(10); ++ ++ regulator_has_full_constraints(); + } + + MACHINE_START(H4700, "HP iPAQ HX4700") diff --git a/queue-3.10/kvm-x86-update-masterclock-values-on-tsc-writes.patch b/queue-3.10/kvm-x86-update-masterclock-values-on-tsc-writes.patch new file mode 100644 index 00000000000..39a1f1a2bfe --- /dev/null +++ b/queue-3.10/kvm-x86-update-masterclock-values-on-tsc-writes.patch @@ -0,0 +1,60 @@ +From 7f187922ddf6b67f2999a76dcb71663097b75497 Mon Sep 17 00:00:00 2001 +From: Marcelo Tosatti +Date: Tue, 4 Nov 2014 21:30:44 -0200 +Subject: KVM: x86: update masterclock values on TSC writes + +From: Marcelo Tosatti + +commit 7f187922ddf6b67f2999a76dcb71663097b75497 upstream. + +When the guest writes to the TSC, the masterclock TSC copy must be +updated as well along with the TSC_OFFSET update, otherwise a negative +tsc_timestamp is calculated at kvm_guest_time_update. + +Once "if (!vcpus_matched && ka->use_master_clock)" is simplified to +"if (ka->use_master_clock)", the corresponding "if (!ka->use_master_clock)" +becomes redundant, so remove the do_request boolean and collapse +everything into a single condition. + +Signed-off-by: Marcelo Tosatti +Signed-off-by: Paolo Bonzini +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kvm/x86.c | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +--- a/arch/x86/kvm/x86.c ++++ b/arch/x86/kvm/x86.c +@@ -1182,21 +1182,22 @@ void kvm_track_tsc_matching(struct kvm_v + { + #ifdef CONFIG_X86_64 + bool vcpus_matched; +- bool do_request = false; + struct kvm_arch *ka = &vcpu->kvm->arch; + struct pvclock_gtod_data *gtod = &pvclock_gtod_data; + + vcpus_matched = (ka->nr_vcpus_matched_tsc + 1 == + atomic_read(&vcpu->kvm->online_vcpus)); + +- if (vcpus_matched && gtod->clock.vclock_mode == VCLOCK_TSC) +- if (!ka->use_master_clock) +- do_request = 1; +- +- if (!vcpus_matched && ka->use_master_clock) +- do_request = 1; +- +- if (do_request) ++ /* ++ * Once the masterclock is enabled, always perform request in ++ * order to update it. ++ * ++ * In order to enable masterclock, the host clocksource must be TSC ++ * and the vcpus need to have matched TSCs. When that happens, ++ * perform request to enable masterclock. ++ */ ++ if (ka->use_master_clock || ++ (gtod->clock.vclock_mode == VCLOCK_TSC && vcpus_matched)) + kvm_make_request(KVM_REQ_MASTERCLOCK_UPDATE, vcpu); + + trace_kvm_track_tsc(vcpu->vcpu_id, ka->nr_vcpus_matched_tsc, diff --git a/queue-3.10/series b/queue-3.10/series index 1a1c70dc70b..c081b771de2 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -41,3 +41,6 @@ ntp-fixup-adjtimex-freq-validation-on-32-bit-systems.patch arc-fix-page-address-calculation-if-page_offset-linux_link_base.patch kvm-s390-floating-irqs-fix-user-triggerable-endless-loop.patch kvm-mips-don-t-leak-fpu-dsp-to-guest.patch +kvm-x86-update-masterclock-values-on-tsc-writes.patch +hx4700-regulator-declare-full-constraints.patch +arm64-compat-fix-siginfo_t-compat_siginfo_t-conversion-on-big-endian.patch