From bf1b7b3f5fdf297c49789efb09374555ca871dc5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 3 May 2018 08:43:49 -0700 Subject: [PATCH] drop some broken 4.14 patches --- ...i-rgb-fix-potential-division-by-zero.patch | 36 ---- ...ge-pages-in-radix-page-fault-handler.patch | 167 ------------------ ...ta-phy-when-salvator-x-board-resumes.patch | 141 --------------- queue-4.14/series | 4 - ...-crypto-info-if-copy_from_user-fails.patch | 35 ---- 5 files changed, 383 deletions(-) delete mode 100644 queue-4.14/drm-sun4i-rgb-fix-potential-division-by-zero.patch delete mode 100644 queue-4.14/kvm-ppc-book3s-hv-fix-handling-of-large-pages-in-radix-page-fault-handler.patch delete mode 100644 queue-4.14/sata_rcar-reset-sata-phy-when-salvator-x-board-resumes.patch delete mode 100644 queue-4.14/tls-reset-the-crypto-info-if-copy_from_user-fails.patch diff --git a/queue-4.14/drm-sun4i-rgb-fix-potential-division-by-zero.patch b/queue-4.14/drm-sun4i-rgb-fix-potential-division-by-zero.patch deleted file mode 100644 index 01a941c020e..00000000000 --- a/queue-4.14/drm-sun4i-rgb-fix-potential-division-by-zero.patch +++ /dev/null @@ -1,36 +0,0 @@ -From foo@baz Tue May 1 16:18:20 PDT 2018 -From: Maxime Ripard -Date: Wed, 21 Feb 2018 13:57:02 +0100 -Subject: drm/sun4i: rgb: Fix potential division by zero - -From: Maxime Ripard - -[ Upstream commit 5af894bd20fa16970378cae8ff55917294e0d9dd ] - -In the case where mode_valid callback of our RGB connector was called -before mode_set was being called, the range of dividers would not be set, -resulting in a division by zero later on in the clk_round_rate logic. - -Set the range of dividers before calling clk_round_rate to fix this. - -Reviewed-by: Chen-Yu Tsai -Tested-by: Giulio Benetti -Signed-off-by: Maxime Ripard -Link: https://patchwork.freedesktop.org/patch/msgid/20180221125703.4595-2-maxime.ripard@bootlin.com -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/gpu/drm/sun4i/sun4i_rgb.c -+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c -@@ -92,6 +92,8 @@ static int sun4i_rgb_mode_valid(struct d - - DRM_DEBUG_DRIVER("Vertical parameters OK\n"); - -+ tcon->dclk_min_div = 6; -+ tcon->dclk_max_div = 127; - rounded_rate = clk_round_rate(tcon->dclk, rate); - if (rounded_rate < rate) - return MODE_CLOCK_LOW; diff --git a/queue-4.14/kvm-ppc-book3s-hv-fix-handling-of-large-pages-in-radix-page-fault-handler.patch b/queue-4.14/kvm-ppc-book3s-hv-fix-handling-of-large-pages-in-radix-page-fault-handler.patch deleted file mode 100644 index e525ca60ecf..00000000000 --- a/queue-4.14/kvm-ppc-book3s-hv-fix-handling-of-large-pages-in-radix-page-fault-handler.patch +++ /dev/null @@ -1,167 +0,0 @@ -From foo@baz Tue May 1 16:18:20 PDT 2018 -From: Paul Mackerras -Date: Fri, 23 Feb 2018 21:21:12 +1100 -Subject: KVM: PPC: Book3S HV: Fix handling of large pages in radix page fault handler - -From: Paul Mackerras - -[ Upstream commit c3856aeb29402e94ad9b3879030165cc6a4fdc56 ] - -This fixes several bugs in the radix page fault handler relating to -the way large pages in the memory backing the guest were handled. -First, the check for large pages only checked for explicit huge pages -and missed transparent huge pages. Then the check that the addresses -(host virtual vs. guest physical) had appropriate alignment was -wrong, meaning that the code never put a large page in the partition -scoped radix tree; it was always demoted to a small page. - -Fixing this exposed bugs in kvmppc_create_pte(). We were never -invalidating a 2MB PTE, which meant that if a page was initially -faulted in without write permission and the guest then attempted -to store to it, we would never update the PTE to have write permission. -If we find a valid 2MB PTE in the PMD, we need to clear it and -do a TLB invalidation before installing either the new 2MB PTE or -a pointer to a page table page. - -This also corrects an assumption that get_user_pages_fast would set -the _PAGE_DIRTY bit if we are writing, which is not true. Instead we -mark the page dirty explicitly with set_page_dirty_lock(). This -also means we don't need the dirty bit set on the host PTE when -providing write access on a read fault. - -Signed-off-by: Paul Mackerras -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - arch/powerpc/kvm/book3s_64_mmu_radix.c | 69 ++++++++++++++++++++------------- - 1 file changed, 43 insertions(+), 26 deletions(-) - ---- a/arch/powerpc/kvm/book3s_64_mmu_radix.c -+++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c -@@ -195,6 +195,12 @@ static void kvmppc_pte_free(pte_t *ptep) - kmem_cache_free(kvm_pte_cache, ptep); - } - -+/* Like pmd_huge() and pmd_large(), but works regardless of config options */ -+static inline int pmd_is_leaf(pmd_t pmd) -+{ -+ return !!(pmd_val(pmd) & _PAGE_PTE); -+} -+ - static int kvmppc_create_pte(struct kvm *kvm, pte_t pte, unsigned long gpa, - unsigned int level, unsigned long mmu_seq) - { -@@ -219,7 +225,7 @@ static int kvmppc_create_pte(struct kvm - else - new_pmd = pmd_alloc_one(kvm->mm, gpa); - -- if (level == 0 && !(pmd && pmd_present(*pmd))) -+ if (level == 0 && !(pmd && pmd_present(*pmd) && !pmd_is_leaf(*pmd))) - new_ptep = kvmppc_pte_alloc(); - - /* Check if we might have been invalidated; let the guest retry if so */ -@@ -244,12 +250,30 @@ static int kvmppc_create_pte(struct kvm - new_pmd = NULL; - } - pmd = pmd_offset(pud, gpa); -- if (pmd_large(*pmd)) { -- /* Someone else has instantiated a large page here; retry */ -- ret = -EAGAIN; -- goto out_unlock; -- } -- if (level == 1 && !pmd_none(*pmd)) { -+ if (pmd_is_leaf(*pmd)) { -+ unsigned long lgpa = gpa & PMD_MASK; -+ -+ /* -+ * If we raced with another CPU which has just put -+ * a 2MB pte in after we saw a pte page, try again. -+ */ -+ if (level == 0 && !new_ptep) { -+ ret = -EAGAIN; -+ goto out_unlock; -+ } -+ /* Valid 2MB page here already, remove it */ -+ old = kvmppc_radix_update_pte(kvm, pmdp_ptep(pmd), -+ ~0UL, 0, lgpa, PMD_SHIFT); -+ kvmppc_radix_tlbie_page(kvm, lgpa, PMD_SHIFT); -+ if (old & _PAGE_DIRTY) { -+ unsigned long gfn = lgpa >> PAGE_SHIFT; -+ struct kvm_memory_slot *memslot; -+ memslot = gfn_to_memslot(kvm, gfn); -+ if (memslot && memslot->dirty_bitmap) -+ kvmppc_update_dirty_map(memslot, -+ gfn, PMD_SIZE); -+ } -+ } else if (level == 1 && !pmd_none(*pmd)) { - /* - * There's a page table page here, but we wanted - * to install a large page. Tell the caller and let -@@ -412,28 +436,24 @@ int kvmppc_book3s_radix_page_fault(struc - } else { - page = pages[0]; - pfn = page_to_pfn(page); -- if (PageHuge(page)) { -- page = compound_head(page); -- pte_size <<= compound_order(page); -+ if (PageCompound(page)) { -+ pte_size <<= compound_order(compound_head(page)); - /* See if we can insert a 2MB large-page PTE here */ - if (pte_size >= PMD_SIZE && -- (gpa & PMD_MASK & PAGE_MASK) == -- (hva & PMD_MASK & PAGE_MASK)) { -+ (gpa & (PMD_SIZE - PAGE_SIZE)) == -+ (hva & (PMD_SIZE - PAGE_SIZE))) { - level = 1; - pfn &= ~((PMD_SIZE >> PAGE_SHIFT) - 1); - } - } - /* See if we can provide write access */ - if (writing) { -- /* -- * We assume gup_fast has set dirty on the host PTE. -- */ - pgflags |= _PAGE_WRITE; - } else { - local_irq_save(flags); - ptep = find_current_mm_pte(current->mm->pgd, - hva, NULL, NULL); -- if (ptep && pte_write(*ptep) && pte_dirty(*ptep)) -+ if (ptep && pte_write(*ptep)) - pgflags |= _PAGE_WRITE; - local_irq_restore(flags); - } -@@ -459,18 +479,15 @@ int kvmppc_book3s_radix_page_fault(struc - pte = pfn_pte(pfn, __pgprot(pgflags)); - ret = kvmppc_create_pte(kvm, pte, gpa, level, mmu_seq); - } -- if (ret == 0 || ret == -EAGAIN) -- ret = RESUME_GUEST; - - if (page) { -- /* -- * We drop pages[0] here, not page because page might -- * have been set to the head page of a compound, but -- * we have to drop the reference on the correct tail -- * page to match the get inside gup() -- */ -- put_page(pages[0]); -+ if (!ret && (pgflags & _PAGE_WRITE)) -+ set_page_dirty_lock(page); -+ put_page(page); - } -+ -+ if (ret == 0 || ret == -EAGAIN) -+ ret = RESUME_GUEST; - return ret; - } - -@@ -676,7 +693,7 @@ void kvmppc_free_radix(struct kvm *kvm) - continue; - pmd = pmd_offset(pud, 0); - for (im = 0; im < PTRS_PER_PMD; ++im, ++pmd) { -- if (pmd_huge(*pmd)) { -+ if (pmd_is_leaf(*pmd)) { - pmd_clear(pmd); - continue; - } diff --git a/queue-4.14/sata_rcar-reset-sata-phy-when-salvator-x-board-resumes.patch b/queue-4.14/sata_rcar-reset-sata-phy-when-salvator-x-board-resumes.patch deleted file mode 100644 index 7223926ed6e..00000000000 --- a/queue-4.14/sata_rcar-reset-sata-phy-when-salvator-x-board-resumes.patch +++ /dev/null @@ -1,141 +0,0 @@ -From foo@baz Tue May 1 16:18:19 PDT 2018 -From: Khiem Nguyen -Date: Mon, 5 Feb 2018 04:18:51 +0900 -Subject: sata_rcar: Reset SATA PHY when Salvator-X board resumes - -From: Khiem Nguyen - -[ Upstream commit da77d76b95a0e8940793f4f7fe12a4a2d2048e39 ] - -Because power of Salvator-X board is cut off in suspend, -it needs to reset SATA PHY state in resume. -Otherwise, SATA partition could not be accessed anymore. - -Signed-off-by: Khiem Nguyen -Signed-off-by: Hien Dang -[reinit phy in sata_rcar_resume() function on R-Car Gen3 only] -[factor out SATA module init sequence] -[fixed the prefix for the subject] -Signed-off-by: Yoshihiro Kaneko -Signed-off-by: Tejun Heo -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - drivers/ata/sata_rcar.c | 63 ++++++++++++++++++++++++++++++------------------ - 1 file changed, 40 insertions(+), 23 deletions(-) - ---- a/drivers/ata/sata_rcar.c -+++ b/drivers/ata/sata_rcar.c -@@ -146,6 +146,7 @@ - enum sata_rcar_type { - RCAR_GEN1_SATA, - RCAR_GEN2_SATA, -+ RCAR_GEN3_SATA, - RCAR_R8A7790_ES1_SATA, - }; - -@@ -784,26 +785,11 @@ static void sata_rcar_setup_port(struct - ioaddr->command_addr = ioaddr->cmd_addr + (ATA_REG_CMD << 2); - } - --static void sata_rcar_init_controller(struct ata_host *host) -+static void sata_rcar_init_module(struct sata_rcar_priv *priv) - { -- struct sata_rcar_priv *priv = host->private_data; - void __iomem *base = priv->base; - u32 val; - -- /* reset and setup phy */ -- switch (priv->type) { -- case RCAR_GEN1_SATA: -- sata_rcar_gen1_phy_init(priv); -- break; -- case RCAR_GEN2_SATA: -- case RCAR_R8A7790_ES1_SATA: -- sata_rcar_gen2_phy_init(priv); -- break; -- default: -- dev_warn(host->dev, "SATA phy is not initialized\n"); -- break; -- } -- - /* SATA-IP reset state */ - val = ioread32(base + ATAPI_CONTROL1_REG); - val |= ATAPI_CONTROL1_RESET; -@@ -824,10 +810,34 @@ static void sata_rcar_init_controller(st - /* ack and mask */ - iowrite32(0, base + SATAINTSTAT_REG); - iowrite32(0x7ff, base + SATAINTMASK_REG); -+ - /* enable interrupts */ - iowrite32(ATAPI_INT_ENABLE_SATAINT, base + ATAPI_INT_ENABLE_REG); - } - -+static void sata_rcar_init_controller(struct ata_host *host) -+{ -+ struct sata_rcar_priv *priv = host->private_data; -+ void __iomem *base = priv->base; -+ -+ /* reset and setup phy */ -+ switch (priv->type) { -+ case RCAR_GEN1_SATA: -+ sata_rcar_gen1_phy_init(priv); -+ break; -+ case RCAR_GEN2_SATA: -+ case RCAR_GEN3_SATA: -+ case RCAR_R8A7790_ES1_SATA: -+ sata_rcar_gen2_phy_init(priv); -+ break; -+ default: -+ dev_warn(host->dev, "SATA phy is not initialized\n"); -+ break; -+ } -+ -+ sata_rcar_init_module(priv); -+} -+ - static const struct of_device_id sata_rcar_match[] = { - { - /* Deprecated by "renesas,sata-r8a7779" */ -@@ -856,7 +866,7 @@ static const struct of_device_id sata_rc - }, - { - .compatible = "renesas,sata-r8a7795", -- .data = (void *)RCAR_GEN2_SATA -+ .data = (void *)RCAR_GEN3_SATA - }, - { - .compatible = "renesas,rcar-gen2-sata", -@@ -864,7 +874,7 @@ static const struct of_device_id sata_rc - }, - { - .compatible = "renesas,rcar-gen3-sata", -- .data = (void *)RCAR_GEN2_SATA -+ .data = (void *)RCAR_GEN3_SATA - }, - { }, - }; -@@ -987,11 +997,18 @@ static int sata_rcar_resume(struct devic - if (ret) - return ret; - -- /* ack and mask */ -- iowrite32(0, base + SATAINTSTAT_REG); -- iowrite32(0x7ff, base + SATAINTMASK_REG); -- /* enable interrupts */ -- iowrite32(ATAPI_INT_ENABLE_SATAINT, base + ATAPI_INT_ENABLE_REG); -+ if (priv->type == RCAR_GEN3_SATA) { -+ sata_rcar_gen2_phy_init(priv); -+ sata_rcar_init_module(priv); -+ } else { -+ /* ack and mask */ -+ iowrite32(0, base + SATAINTSTAT_REG); -+ iowrite32(0x7ff, base + SATAINTMASK_REG); -+ -+ /* enable interrupts */ -+ iowrite32(ATAPI_INT_ENABLE_SATAINT, -+ base + ATAPI_INT_ENABLE_REG); -+ } - - ata_host_resume(host); - diff --git a/queue-4.14/series b/queue-4.14/series index d356b9239f3..dc99a174d2f 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -18,7 +18,6 @@ usb-gadget-core-fix-use-after-free-of-usb_request.patch usb-gadget-fsl_udc_core-fix-ep-valid-checks.patch usb-dwc2-fix-dwc2_hsotg_core_init_disconnected.patch libata-fix-compile-warning-with-ata_debug-enabled.patch -sata_rcar-reset-sata-phy-when-salvator-x-board-resumes.patch selftests-sync-missing-cflags-while-compiling.patch selftest-vdso-fix-o.patch selftests-pstore-adding-config-fragment-config_pstore_ram-m.patch @@ -35,7 +34,6 @@ ibmvnic-wait-until-reset-is-complete-to-set-carrier-on.patch ibmvnic-free-rx-socket-buffer-in-case-of-adapter-error.patch ibmvnic-clean-rx-pool-buffers-during-device-close.patch tls-retrun-the-correct-iv-in-getsockopt.patch -tls-reset-the-crypto-info-if-copy_from_user-fails.patch xhci-workaround-for-amd-promontory-disabled-ports-wakeup.patch usb-serial-option-add-support-for-quectel-ep06.patch ib-uverbs-fix-method-merging-in-uverbs_ioctl_merge.patch @@ -170,7 +168,6 @@ selftests-powerpc-skip-the-subpage_prot-tests-if-the-syscall-is-unavailable.patc scsi-core-return-blk_sts_ok-for-did_ok-in-__scsi_error_from_host_byte.patch scsi-qedi-fix-kernel-crash-during-port-toggle.patch net-ethtool-don-t-ignore-return-from-driver-get_fecparam-method.patch -kvm-ppc-book3s-hv-fix-handling-of-large-pages-in-radix-page-fault-handler.patch kvm-ppc-book3s-hv-fix-vrma-initialization-with-2mb-or-1gb-memory-backing.patch iwlwifi-mvm-fix-tx-of-ccmp-256.patch iwlwifi-mvm-fix-channel-switch-for-count-0-and-1.patch @@ -198,7 +195,6 @@ perf-record-fix-crash-in-pipe-mode.patch e1000e-fix-check_for_link-return-value-with-autoneg-off.patch e1000e-allocate-ring-descriptors-with-dma_zalloc_coherent.patch ia64-err-inject-use-get_user_pages_fast.patch -drm-sun4i-rgb-fix-potential-division-by-zero.patch rdma-qedr-fix-kernel-panic-when-running-fio-over-nfsordma.patch rdma-qedr-fix-iwarp-write-and-send-with-immediate.patch scsi-mpt3sas-do-not-mark-fw_event-workqueue-as-wq_mem_reclaim.patch diff --git a/queue-4.14/tls-reset-the-crypto-info-if-copy_from_user-fails.patch b/queue-4.14/tls-reset-the-crypto-info-if-copy_from_user-fails.patch deleted file mode 100644 index 7be28de8489..00000000000 --- a/queue-4.14/tls-reset-the-crypto-info-if-copy_from_user-fails.patch +++ /dev/null @@ -1,35 +0,0 @@ -From foo@baz Tue May 1 16:18:19 PDT 2018 -From: Boris Pismenny -Date: Wed, 14 Feb 2018 10:46:07 +0200 -Subject: tls: reset the crypto info if copy_from_user fails - -From: Boris Pismenny - -[ Upstream commit 257082e6ae23e92898440f6bcb2857555bf7957c ] - -copy_from_user could copy some partial information, as a result -TLS_CRYPTO_INFO_READY(crypto_info) could be true while crypto_info is -using uninitialzed data. - -This patch resets crypto_info when copy_from_user fails. - -fixes: 3c4d7559159b ("tls: kernel TLS support") -Signed-off-by: Boris Pismenny -Signed-off-by: David S. Miller -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - net/tls/tls_main.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/net/tls/tls_main.c -+++ b/net/tls/tls_main.c -@@ -352,7 +352,7 @@ static int do_tls_setsockopt_tx(struct s - rc = copy_from_user(&tmp_crypto_info, optval, sizeof(*crypto_info)); - if (rc) { - rc = -EFAULT; -- goto out; -+ goto err_crypto_info; - } - - /* check version */ -- 2.47.3