]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Mar 2014 21:24:52 +0000 (14:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Mar 2014 21:24:52 +0000 (14:24 -0700)
added patches:
input-elantech-improve-clickpad-detection.patch
kvm-mmu-handle-invalid-root_hpa-at-__direct_map.patch
kvm-vmx-fix-use-after-free-of-vmx-loaded_vmcs.patch
xhci-fix-resume-issues-on-renesas-chips-in-samsung-laptops.patch

queue-3.4/input-elantech-improve-clickpad-detection.patch [new file with mode: 0644]
queue-3.4/kvm-mmu-handle-invalid-root_hpa-at-__direct_map.patch [new file with mode: 0644]
queue-3.4/kvm-vmx-fix-use-after-free-of-vmx-loaded_vmcs.patch [new file with mode: 0644]
queue-3.4/series
queue-3.4/xhci-fix-resume-issues-on-renesas-chips-in-samsung-laptops.patch [new file with mode: 0644]

diff --git a/queue-3.4/input-elantech-improve-clickpad-detection.patch b/queue-3.4/input-elantech-improve-clickpad-detection.patch
new file mode 100644 (file)
index 0000000..6ce87da
--- /dev/null
@@ -0,0 +1,111 @@
+From c15bdfd5b9831e4cab8cfc118243956e267dd30e Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Mon, 16 Dec 2013 07:09:25 -0800
+Subject: Input: elantech -  improve clickpad detection
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit c15bdfd5b9831e4cab8cfc118243956e267dd30e upstream.
+
+The current assumption in the elantech driver that hw version 3 touchpads
+are never clickpads and hw version 4 touchpads are always clickpads is
+wrong.
+
+There are several bug reports for this, ie:
+https://bugzilla.redhat.com/show_bug.cgi?id=1030802
+http://superuser.com/questions/619582/right-elantech-touchpad-button-not-working-in-linux
+
+I've spend a couple of hours wading through various bugzillas, launchpads
+and forum posts to create a list of fw-versions and capabilities for
+different laptop models to find a good method to differentiate between
+clickpads and versions with separate hardware buttons.
+
+Which shows that a device being a clickpad is reliable indicated by bit 12
+being set in the fw_version. I've included the gathered list inside the
+driver, so that we've this info at hand if we need to revisit this later.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Cc: Josh Boyer <jwboyer@fedoraproject.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/mouse/elantech.c |   45 ++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 42 insertions(+), 3 deletions(-)
+
+--- a/drivers/input/mouse/elantech.c
++++ b/drivers/input/mouse/elantech.c
+@@ -486,6 +486,7 @@ static void elantech_input_sync_v4(struc
+       unsigned char *packet = psmouse->packet;
+       input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
++      input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
+       input_mt_report_pointer_emulation(dev, true);
+       input_sync(dev);
+ }
+@@ -954,6 +955,44 @@ static int elantech_get_resolution_v4(st
+ }
+ /*
++ * Advertise INPUT_PROP_BUTTONPAD for clickpads. The testing of bit 12 in
++ * fw_version for this is based on the following fw_version & caps table:
++ *
++ * Laptop-model:           fw_version:     caps:           buttons:
++ * Acer S3                 0x461f00        10, 13, 0e      clickpad
++ * Acer S7-392             0x581f01        50, 17, 0d      clickpad
++ * Acer V5-131             0x461f02        01, 16, 0c      clickpad
++ * Acer V5-551             0x461f00        ?               clickpad
++ * Asus K53SV              0x450f01        78, 15, 0c      2 hw buttons
++ * Asus G46VW              0x460f02        00, 18, 0c      2 hw buttons
++ * Asus G750JX             0x360f00        00, 16, 0c      2 hw buttons
++ * Asus UX31               0x361f00        20, 15, 0e      clickpad
++ * Asus UX32VD             0x361f02        00, 15, 0e      clickpad
++ * Avatar AVIU-145A2       0x361f00        ?               clickpad
++ * Gigabyte U2442          0x450f01        58, 17, 0c      2 hw buttons
++ * Lenovo L430             0x350f02        b9, 15, 0c      2 hw buttons (*)
++ * Samsung NF210           0x150b00        78, 14, 0a      2 hw buttons
++ * Samsung NP770Z5E        0x575f01        10, 15, 0f      clickpad
++ * Samsung NP700Z5B        0x361f06        21, 15, 0f      clickpad
++ * Samsung NP900X3E-A02    0x575f03        ?               clickpad
++ * Samsung NP-QX410        0x851b00        19, 14, 0c      clickpad
++ * Samsung RC512           0x450f00        08, 15, 0c      2 hw buttons
++ * Samsung RF710           0x450f00        ?               2 hw buttons
++ * System76 Pangolin       0x250f01        ?               2 hw buttons
++ * (*) + 3 trackpoint buttons
++ */
++static void elantech_set_buttonpad_prop(struct psmouse *psmouse)
++{
++      struct input_dev *dev = psmouse->dev;
++      struct elantech_data *etd = psmouse->private;
++
++      if (etd->fw_version & 0x001000) {
++              __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
++              __clear_bit(BTN_RIGHT, dev->keybit);
++      }
++}
++
++/*
+  * Set the appropriate event bits for the input subsystem
+  */
+ static int elantech_set_input_params(struct psmouse *psmouse)
+@@ -996,6 +1035,8 @@ static int elantech_set_input_params(str
+               __set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
+               /* fall through */
+       case 3:
++              if (etd->hw_version == 3)
++                      elantech_set_buttonpad_prop(psmouse);
+               input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
+               input_set_abs_params(dev, ABS_Y, y_min, y_max, 0, 0);
+               if (etd->reports_pressure) {
+@@ -1017,9 +1058,7 @@ static int elantech_set_input_params(str
+                        */
+                       psmouse_warn(psmouse, "couldn't query resolution data.\n");
+               }
+-              /* v4 is clickpad, with only one button. */
+-              __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
+-              __clear_bit(BTN_RIGHT, dev->keybit);
++              elantech_set_buttonpad_prop(psmouse);
+               __set_bit(BTN_TOOL_QUADTAP, dev->keybit);
+               /* For X to recognize me as touchpad. */
+               input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
diff --git a/queue-3.4/kvm-mmu-handle-invalid-root_hpa-at-__direct_map.patch b/queue-3.4/kvm-mmu-handle-invalid-root_hpa-at-__direct_map.patch
new file mode 100644 (file)
index 0000000..235329f
--- /dev/null
@@ -0,0 +1,43 @@
+From 989c6b34f6a9480e397b170cc62237e89bf4fdb9 Mon Sep 17 00:00:00 2001
+From: Marcelo Tosatti <mtosatti@redhat.com>
+Date: Thu, 19 Dec 2013 15:28:51 -0200
+Subject: KVM: MMU: handle invalid root_hpa at __direct_map
+
+From: Marcelo Tosatti <mtosatti@redhat.com>
+
+commit 989c6b34f6a9480e397b170cc62237e89bf4fdb9 upstream.
+
+It is possible for __direct_map to be called on invalid root_hpa
+(-1), two examples:
+
+1) try_async_pf -> can_do_async_pf
+    -> vmx_interrupt_allowed -> nested_vmx_vmexit
+2) vmx_handle_exit -> vmx_interrupt_allowed -> nested_vmx_vmexit
+
+Then to load_vmcs12_host_state and kvm_mmu_reset_context.
+
+Check for this possibility, let fault exception be regenerated.
+
+BZ: https://bugzilla.redhat.com/show_bug.cgi?id=924916
+
+Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Cc: Josh Boyer <jwboyer@fedoraproject.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/mmu.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/arch/x86/kvm/mmu.c
++++ b/arch/x86/kvm/mmu.c
+@@ -2451,6 +2451,9 @@ static int __direct_map(struct kvm_vcpu
+       int emulate = 0;
+       gfn_t pseudo_gfn;
++      if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
++              return 0;
++
+       for_each_shadow_entry(vcpu, (u64)gfn << PAGE_SHIFT, iterator) {
+               if (iterator.level == level) {
+                       unsigned pte_access = ACC_ALL;
diff --git a/queue-3.4/kvm-vmx-fix-use-after-free-of-vmx-loaded_vmcs.patch b/queue-3.4/kvm-vmx-fix-use-after-free-of-vmx-loaded_vmcs.patch
new file mode 100644 (file)
index 0000000..cd5e125
--- /dev/null
@@ -0,0 +1,39 @@
+From 26a865f4aa8e66a6d94958de7656f7f1b03c6c56 Mon Sep 17 00:00:00 2001
+From: Marcelo Tosatti <mtosatti@redhat.com>
+Date: Fri, 3 Jan 2014 17:00:51 -0200
+Subject: KVM: VMX: fix use after free of vmx->loaded_vmcs
+
+From: Marcelo Tosatti <mtosatti@redhat.com>
+
+commit 26a865f4aa8e66a6d94958de7656f7f1b03c6c56 upstream.
+
+After free_loaded_vmcs executes, the "loaded_vmcs" structure
+is kfreed, and now vmx->loaded_vmcs points to a kfreed area.
+Subsequent free_loaded_vmcs then attempts to manipulate
+vmx->loaded_vmcs.
+
+Switch the order to avoid the problem.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1047892
+
+Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
+Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
+Cc: Josh Boyer <jwboyer@fedoraproject.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/vmx.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kvm/vmx.c
++++ b/arch/x86/kvm/vmx.c
+@@ -6281,8 +6281,8 @@ static void vmx_free_vcpu(struct kvm_vcp
+       struct vcpu_vmx *vmx = to_vmx(vcpu);
+       free_vpid(vmx);
+-      free_nested(vmx);
+       free_loaded_vmcs(vmx->loaded_vmcs);
++      free_nested(vmx);
+       kfree(vmx->guest_msrs);
+       kvm_vcpu_uninit(vcpu);
+       kmem_cache_free(kvm_vcpu_cache, vmx);
index 7b3fdb38b3d285998c091c60c7852e72a131bdb0..9d4ca175783ab13bda7755d2a33d91bb8b5c16bf 100644 (file)
@@ -7,3 +7,7 @@ deb-pkg-fix-cross-building-linux-headers-package.patch
 p54-clamp-properly-instead-of-just-truncating.patch
 i7300_edac-fix-device-reference-count.patch
 arm-move-outer_cache-declaration-out-of-ifdef.patch
+input-elantech-improve-clickpad-detection.patch
+kvm-mmu-handle-invalid-root_hpa-at-__direct_map.patch
+kvm-vmx-fix-use-after-free-of-vmx-loaded_vmcs.patch
+xhci-fix-resume-issues-on-renesas-chips-in-samsung-laptops.patch
diff --git a/queue-3.4/xhci-fix-resume-issues-on-renesas-chips-in-samsung-laptops.patch b/queue-3.4/xhci-fix-resume-issues-on-renesas-chips-in-samsung-laptops.patch
new file mode 100644 (file)
index 0000000..de71c7a
--- /dev/null
@@ -0,0 +1,43 @@
+From 1aa9578c1a9450fb21501c4f549f5b1edb557e6d Mon Sep 17 00:00:00 2001
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Fri, 17 Jan 2014 15:38:12 -0800
+Subject: xhci: Fix resume issues on Renesas chips in Samsung laptops
+
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+
+commit 1aa9578c1a9450fb21501c4f549f5b1edb557e6d upstream.
+
+Don Zickus <dzickus@redhat.com> writes:
+
+Some co-workers of mine bought Samsung laptops that had mostly usb3 ports.
+Those ports did not resume correctly (the driver would timeout communicating
+and fail).  This led to frustration as suspend/resume is a common use for
+laptops.
+
+Poking around, I applied the reset on resume quirk to this chipset and the
+resume started working.  Reloading the xhci_hcd module had been the temporary
+workaround.
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Reported-by: Don Zickus <dzickus@redhat.com>
+Tested-by: Prarit Bhargava <prarit@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-pci.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -109,6 +109,11 @@ static void xhci_pci_quirks(struct devic
+               xhci_dbg(xhci, "QUIRK: Resetting on resume\n");
+               xhci->quirks |= XHCI_TRUST_TX_LENGTH;
+       }
++      if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
++                      pdev->device == 0x0015 &&
++                      pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG &&
++                      pdev->subsystem_device == 0xc0cd)
++              xhci->quirks |= XHCI_RESET_ON_RESUME;
+       if (pdev->vendor == PCI_VENDOR_ID_VIA)
+               xhci->quirks |= XHCI_RESET_ON_RESUME;
+ }