From a10ef0a8ca99db182f5c0dec684dbe393f199d3b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 19 Apr 2012 09:12:13 -0700 Subject: [PATCH] 3.0-stable patches added patches: ath9k-fix-max-noise-floor-threshold.patch fcaps-clear-the-same-personality-flags-as-suid-when-fcaps-are-used.patch serial-pl011-clear-pending-interrupts.patch serial-pl011-move-interrupt-clearing.patch xhci-add-xhci_reset_on_resume-quirk-for-via-xhci-host.patch --- .../ath9k-fix-max-noise-floor-threshold.patch | 53 ++++++++++++ ...ty-flags-as-suid-when-fcaps-are-used.patch | 38 +++++++++ ...erial-pl011-clear-pending-interrupts.patch | 80 +++++++++++++++++++ ...serial-pl011-move-interrupt-clearing.patch | 53 ++++++++++++ queue-3.0/series | 5 ++ ...et_on_resume-quirk-for-via-xhci-host.patch | 41 ++++++++++ 6 files changed, 270 insertions(+) create mode 100644 queue-3.0/ath9k-fix-max-noise-floor-threshold.patch create mode 100644 queue-3.0/fcaps-clear-the-same-personality-flags-as-suid-when-fcaps-are-used.patch create mode 100644 queue-3.0/serial-pl011-clear-pending-interrupts.patch create mode 100644 queue-3.0/serial-pl011-move-interrupt-clearing.patch create mode 100644 queue-3.0/xhci-add-xhci_reset_on_resume-quirk-for-via-xhci-host.patch diff --git a/queue-3.0/ath9k-fix-max-noise-floor-threshold.patch b/queue-3.0/ath9k-fix-max-noise-floor-threshold.patch new file mode 100644 index 00000000000..9fa2e39b4d9 --- /dev/null +++ b/queue-3.0/ath9k-fix-max-noise-floor-threshold.patch @@ -0,0 +1,53 @@ +From 6d19cb7b3325e6c460db0f07f178793f4500783a Mon Sep 17 00:00:00 2001 +From: Rajkumar Manoharan +Date: Thu, 15 Mar 2012 06:08:04 +0530 +Subject: [PATCH] ath9k: fix max noise floor threshold + +From: Rajkumar Manoharan + +commit 2ee0a07028d2cde6e131b73f029dae2b93c50f3a upstream. + +Currently the maximum noise floor limit is set as too high (-60dB). The +assumption of having a higher threshold limit is that it would help +de-sensitize the receiver (reduce phy errors) from continuous +interference. But when we have a bursty interference where there are +collisions and then free air time and if the receiver is desensitized too +much, it will miss the normal packets too. Lets make use of chips +specific min, nom and max limits always. This patch helps to improve the +connection stability in congested networks. + +Cc: Paul Stewart +Tested-by: Gary Morain +Signed-off-by: Madhan Jaganathan +Signed-off-by: Rajkumar Manoharan +Signed-off-by: John W. Linville +[bwh: Backported to 3.0/3.2: adjust context] +Signed-off-by: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/ath/ath9k/calib.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/calib.c ++++ b/drivers/net/wireless/ath/ath9k/calib.c +@@ -19,7 +19,6 @@ + + /* Common calibration code */ + +-#define ATH9K_NF_TOO_HIGH -60 + + static int16_t ath9k_hw_get_nf_hist_mid(int16_t *nfCalBuffer) + { +@@ -335,10 +334,10 @@ static void ath9k_hw_nf_sanitize(struct + "NF calibrated [%s] [chain %d] is %d\n", + (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]); + +- if (nf[i] > ATH9K_NF_TOO_HIGH) { ++ if (nf[i] > limit->max) { + ath_dbg(common, ATH_DBG_CALIBRATE, + "NF[%d] (%d) > MAX (%d), correcting to MAX\n", +- i, nf[i], ATH9K_NF_TOO_HIGH); ++ i, nf[i], limit->max); + nf[i] = limit->max; + } else if (nf[i] < limit->min) { + ath_dbg(common, ATH_DBG_CALIBRATE, diff --git a/queue-3.0/fcaps-clear-the-same-personality-flags-as-suid-when-fcaps-are-used.patch b/queue-3.0/fcaps-clear-the-same-personality-flags-as-suid-when-fcaps-are-used.patch new file mode 100644 index 00000000000..e603b409ac4 --- /dev/null +++ b/queue-3.0/fcaps-clear-the-same-personality-flags-as-suid-when-fcaps-are-used.patch @@ -0,0 +1,38 @@ +From d52fc5dde171f030170a6cb78034d166b13c9445 Mon Sep 17 00:00:00 2001 +From: Eric Paris +Date: Tue, 17 Apr 2012 16:26:54 -0400 +Subject: fcaps: clear the same personality flags as suid when fcaps are used + +From: Eric Paris + +commit d52fc5dde171f030170a6cb78034d166b13c9445 upstream. + +If a process increases permissions using fcaps all of the dangerous +personality flags which are cleared for suid apps should also be cleared. +Thus programs given priviledge with fcaps will continue to have address space +randomization enabled even if the parent tried to disable it to make it +easier to attack. + +Signed-off-by: Eric Paris +Reviewed-by: Serge Hallyn +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- + security/commoncap.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/security/commoncap.c ++++ b/security/commoncap.c +@@ -510,6 +510,11 @@ int cap_bprm_set_creds(struct linux_binp + } + skip: + ++ /* if we have fs caps, clear dangerous personality flags */ ++ if (!cap_issubset(new->cap_permitted, old->cap_permitted)) ++ bprm->per_clear |= PER_CLEAR_ON_SETID; ++ ++ + /* Don't let someone trace a set[ug]id/setpcap binary with the revised + * credentials unless they have the appropriate permit + */ diff --git a/queue-3.0/serial-pl011-clear-pending-interrupts.patch b/queue-3.0/serial-pl011-clear-pending-interrupts.patch new file mode 100644 index 00000000000..64a4e24e4a9 --- /dev/null +++ b/queue-3.0/serial-pl011-clear-pending-interrupts.patch @@ -0,0 +1,80 @@ +From 9b96fbacda34079dea0638ee1e92c56286f6114a Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Tue, 13 Mar 2012 13:27:23 +0100 +Subject: serial: PL011: clear pending interrupts + +From: Linus Walleij + +commit 9b96fbacda34079dea0638ee1e92c56286f6114a upstream. + +Chanho Min reported that when the boot loader transfers +control to the kernel, there may be pending interrupts +causing the UART to lock up in an eternal loop trying to +pick tokens from the FIFO (since the RX interrupt flag +indicates there are tokens) while in practice there are +no tokens - in fact there is only a pending IRQ flag. + +This patch address the issue with a combination of two +patches suggested by Russell King that clears and mask +all interrupts at probe() and clears any pending error +and RX interrupts at port startup time. + +We suspect the spurious interrupts are a side-effect of +switching the UART from FIFO to non-FIFO mode. + +Cc: Shreshtha Kumar Sahu +Reported-by: Chanho Min +Suggested-by: Russell King +Signed-off-by: Linus Walleij +Reviewed-by: Jong-Sung Kim +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/amba-pl011.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +--- a/drivers/tty/serial/amba-pl011.c ++++ b/drivers/tty/serial/amba-pl011.c +@@ -1376,6 +1376,10 @@ static int pl011_startup(struct uart_por + + uap->port.uartclk = clk_get_rate(uap->clk); + ++ /* Clear pending error and receive interrupts */ ++ writew(UART011_OEIS | UART011_BEIS | UART011_PEIS | UART011_FEIS | ++ UART011_RTIS | UART011_RXIS, uap->port.membase + UART011_ICR); ++ + /* + * Allocate the IRQ + */ +@@ -1410,10 +1414,6 @@ static int pl011_startup(struct uart_por + cr = UART01x_CR_UARTEN | UART011_CR_RXE | UART011_CR_TXE; + writew(cr, uap->port.membase + UART011_CR); + +- /* Clear pending error interrupts */ +- writew(UART011_OEIS | UART011_BEIS | UART011_PEIS | UART011_FEIS, +- uap->port.membase + UART011_ICR); +- + /* + * initialise the old status of the modem signals + */ +@@ -1428,6 +1428,9 @@ static int pl011_startup(struct uart_por + * as well. + */ + spin_lock_irq(&uap->port.lock); ++ /* Clear out any spuriously appearing RX interrupts */ ++ writew(UART011_RTIS | UART011_RXIS, ++ uap->port.membase + UART011_ICR); + uap->im = UART011_RTIM; + if (!pl011_dma_rx_running(uap)) + uap->im |= UART011_RXIM; +@@ -1904,6 +1907,10 @@ static int pl011_probe(struct amba_devic + goto unmap; + } + ++ /* Ensure interrupts from this UART are masked and cleared */ ++ writew(0, uap->port.membase + UART011_IMSC); ++ writew(0xffff, uap->port.membase + UART011_ICR); ++ + uap->vendor = vendor; + uap->lcrh_rx = vendor->lcrh_rx; + uap->lcrh_tx = vendor->lcrh_tx; diff --git a/queue-3.0/serial-pl011-move-interrupt-clearing.patch b/queue-3.0/serial-pl011-move-interrupt-clearing.patch new file mode 100644 index 00000000000..4fee507a906 --- /dev/null +++ b/queue-3.0/serial-pl011-move-interrupt-clearing.patch @@ -0,0 +1,53 @@ +From c3d8b76f61586714cdc5f219ba45592a54caaa55 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Wed, 21 Mar 2012 20:15:18 +0100 +Subject: serial: PL011: move interrupt clearing + +From: Linus Walleij + +commit c3d8b76f61586714cdc5f219ba45592a54caaa55 upstream. + +Commit 360f748b204275229f8398cb2f9f53955db1503b +"serial: PL011: clear pending interrupts" +attempts to clear interrupts by writing to a +yet-unassigned memory address. This fixes the issue. + +The breaking patch is marked for stable so should be +carried along with the other patch. + +Cc: Shreshtha Kumar Sahu +Cc: Russell King +Cc: Nicolas Pitre +Reported-by: Viresh Kumar +Signed-off-by: Linus Walleij +Tested-by: Grant Likely +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/amba-pl011.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/tty/serial/amba-pl011.c ++++ b/drivers/tty/serial/amba-pl011.c +@@ -1907,10 +1907,6 @@ static int pl011_probe(struct amba_devic + goto unmap; + } + +- /* Ensure interrupts from this UART are masked and cleared */ +- writew(0, uap->port.membase + UART011_IMSC); +- writew(0xffff, uap->port.membase + UART011_ICR); +- + uap->vendor = vendor; + uap->lcrh_rx = vendor->lcrh_rx; + uap->lcrh_tx = vendor->lcrh_tx; +@@ -1927,6 +1923,10 @@ static int pl011_probe(struct amba_devic + uap->port.line = i; + pl011_dma_probe(uap); + ++ /* Ensure interrupts from this UART are masked and cleared */ ++ writew(0, uap->port.membase + UART011_IMSC); ++ writew(0xffff, uap->port.membase + UART011_ICR); ++ + snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev)); + + amba_ports[i] = uap; diff --git a/queue-3.0/series b/queue-3.0/series index d644729875e..3f9d1136d80 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -24,3 +24,8 @@ xhci-don-t-re-enable-ie-constantly.patch xhci-don-t-write-zeroed-pointers-to-xhc-registers.patch xhci-restore-event-ring-dequeue-pointer-on-resume.patch xhci-correct-the-define-xhci_legacy_disable_smi.patch +xhci-add-xhci_reset_on_resume-quirk-for-via-xhci-host.patch +serial-pl011-clear-pending-interrupts.patch +serial-pl011-move-interrupt-clearing.patch +fcaps-clear-the-same-personality-flags-as-suid-when-fcaps-are-used.patch +ath9k-fix-max-noise-floor-threshold.patch diff --git a/queue-3.0/xhci-add-xhci_reset_on_resume-quirk-for-via-xhci-host.patch b/queue-3.0/xhci-add-xhci_reset_on_resume-quirk-for-via-xhci-host.patch new file mode 100644 index 00000000000..aa39896fd25 --- /dev/null +++ b/queue-3.0/xhci-add-xhci_reset_on_resume-quirk-for-via-xhci-host.patch @@ -0,0 +1,41 @@ +From 457a4f61f9bfc3ae76e5b49f30f25d86bb696f67 Mon Sep 17 00:00:00 2001 +From: Elric Fu +Date: Thu, 29 Mar 2012 15:47:50 +0800 +Subject: xHCI: add XHCI_RESET_ON_RESUME quirk for VIA xHCI host + +From: Elric Fu + +commit 457a4f61f9bfc3ae76e5b49f30f25d86bb696f67 upstream. + +The suspend operation of VIA xHCI host have some issues and +hibernate operation works fine, so The XHCI_RESET_ON_RESUME +quirk is added for it. + +This patch should base on "xHCI: Don't write zeroed pointer +to xHC registers" that is released by Sarah. Otherwise, the +host system error will ocurr in the hibernate operation +process. + +This should be backported to stable kernels as old as 2.6.37, +that contain the commit c877b3b2ad5cb9d4fe523c5496185cc328ff3ae9 +"xhci: Add reset on resume quirk for asrock p67 host". + +Signed-off-by: Elric Fu +Signed-off-by: Sarah Sharp +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-pci.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/host/xhci-pci.c ++++ b/drivers/usb/host/xhci-pci.c +@@ -145,6 +145,8 @@ static int xhci_pci_setup(struct usb_hcd + xhci->quirks |= XHCI_RESET_ON_RESUME; + xhci_dbg(xhci, "QUIRK: Resetting on resume\n"); + } ++ if (pdev->vendor == PCI_VENDOR_ID_VIA) ++ xhci->quirks |= XHCI_RESET_ON_RESUME; + + /* Make sure the HC is halted. */ + retval = xhci_halt(xhci); -- 2.47.3