From: Greg Kroah-Hartman Date: Mon, 1 Mar 2021 19:35:33 +0000 (+0100) Subject: drop a bunch of broken patches X-Git-Tag: v4.4.259~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=05157ddb3073ad5c57244a2040430b8fa4cc2765;p=thirdparty%2Fkernel%2Fstable-queue.git drop a bunch of broken patches --- diff --git a/queue-4.14/crypto-sun4i-ss-handle-bigendian-for-cipher.patch b/queue-4.14/crypto-sun4i-ss-handle-bigendian-for-cipher.patch index 71fe3627921..64233a8fbf5 100644 --- a/queue-4.14/crypto-sun4i-ss-handle-bigendian-for-cipher.patch +++ b/queue-4.14/crypto-sun4i-ss-handle-bigendian-for-cipher.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c -@@ -63,13 +63,13 @@ static int sun4i_ss_opti_poll(struct skc +@@ -55,13 +55,13 @@ static int sun4i_ss_opti_poll(struct skc spin_lock_irqsave(&ss->slock, flags); @@ -38,7 +38,7 @@ Signed-off-by: Greg Kroah-Hartman } } writel(mode, ss->base + SS_CTL); -@@ -223,13 +223,13 @@ static int sun4i_ss_cipher_poll(struct s +@@ -204,13 +204,13 @@ static int sun4i_ss_cipher_poll(struct s spin_lock_irqsave(&ss->slock, flags); diff --git a/queue-4.14/crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch b/queue-4.14/crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch deleted file mode 100644 index d7b1efe3ffe..00000000000 --- a/queue-4.14/crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch +++ /dev/null @@ -1,101 +0,0 @@ -From b756f1c8fc9d84e3f546d7ffe056c5352f4aab05 Mon Sep 17 00:00:00 2001 -From: Corentin Labbe -Date: Mon, 14 Dec 2020 20:02:27 +0000 -Subject: crypto: sun4i-ss - IV register does not work on A10 and A13 - -From: Corentin Labbe - -commit b756f1c8fc9d84e3f546d7ffe056c5352f4aab05 upstream. - -Allwinner A10 and A13 SoC have a version of the SS which produce -invalid IV in IVx register. - -Instead of adding a variant for those, let's convert SS to produce IV -directly from data. -Fixes: 6298e948215f2 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") -Cc: -Signed-off-by: Corentin Labbe -Signed-off-by: Herbert Xu -Signed-off-by: Greg Kroah-Hartman ---- - drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 34 ++++++++++++++++++++++++------ - 1 file changed, 28 insertions(+), 6 deletions(-) - ---- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c -+++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c -@@ -24,6 +24,7 @@ static int sun4i_ss_opti_poll(struct skc - unsigned int ivsize = crypto_skcipher_ivsize(tfm); - struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq); - u32 mode = ctx->mode; -+ void *backup_iv = NULL; - /* when activating SS, the default FIFO space is SS_RX_DEFAULT(32) */ - u32 rx_cnt = SS_RX_DEFAULT; - u32 tx_cnt = 0; -@@ -53,6 +54,13 @@ static int sun4i_ss_opti_poll(struct skc - return -EINVAL; - } - -+ if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) { -+ backup_iv = kzalloc(ivsize, GFP_KERNEL); -+ if (!backup_iv) -+ return -ENOMEM; -+ scatterwalk_map_and_copy(backup_iv, areq->src, areq->cryptlen - ivsize, ivsize, 0); -+ } -+ - spin_lock_irqsave(&ss->slock, flags); - - for (i = 0; i < op->keylen; i += 4) -@@ -126,9 +134,12 @@ static int sun4i_ss_opti_poll(struct skc - } while (oleft); - - if (areq->iv) { -- for (i = 0; i < 4 && i < ivsize / 4; i++) { -- v = readl(ss->base + SS_IV0 + i * 4); -- *(u32 *)(areq->iv + i * 4) = v; -+ if (mode & SS_DECRYPTION) { -+ memcpy(areq->iv, backup_iv, ivsize); -+ kfree_sensitive(backup_iv); -+ } else { -+ scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize, -+ ivsize, 0); - } - } - -@@ -160,6 +171,7 @@ static int sun4i_ss_cipher_poll(struct s - unsigned int ileft = areq->cryptlen; - unsigned int oleft = areq->cryptlen; - unsigned int todo; -+ void *backup_iv = NULL; - struct sg_mapping_iter mi, mo; - unsigned long pi = 0, po = 0; /* progress for in and out */ - bool miter_err; -@@ -202,6 +214,13 @@ static int sun4i_ss_cipher_poll(struct s - if (no_chunk == 1) - return sun4i_ss_opti_poll(areq); - -+ if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) { -+ backup_iv = kzalloc(ivsize, GFP_KERNEL); -+ if (!backup_iv) -+ return -ENOMEM; -+ scatterwalk_map_and_copy(backup_iv, areq->src, areq->cryptlen - ivsize, ivsize, 0); -+ } -+ - spin_lock_irqsave(&ss->slock, flags); - - for (i = 0; i < op->keylen; i += 4) -@@ -330,9 +349,12 @@ static int sun4i_ss_cipher_poll(struct s - sg_miter_stop(&mo); - } - if (areq->iv) { -- for (i = 0; i < 4 && i < ivsize / 4; i++) { -- v = readl(ss->base + SS_IV0 + i * 4); -- *(u32 *)(areq->iv + i * 4) = v; -+ if (mode & SS_DECRYPTION) { -+ memcpy(areq->iv, backup_iv, ivsize); -+ kfree_sensitive(backup_iv); -+ } else { -+ scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize, -+ ivsize, 0); - } - } - diff --git a/queue-4.14/series b/queue-4.14/series index d159ffe9c53..e25b1fa2cb0 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -139,7 +139,6 @@ btrfs-abort-the-transaction-if-we-fail-to-inc-ref-in-btrfs_copy_root.patch btrfs-fix-reloc-root-leak-with-0-ref-reloc-roots-on-recovery.patch btrfs-fix-extent-buffer-leak-on-failure-to-copy-root.patch crypto-sun4i-ss-checking-sg-length-is-not-sufficient.patch -crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch crypto-sun4i-ss-handle-bigendian-for-cipher.patch seccomp-add-missing-return-in-non-void-function.patch drivers-misc-vmw_vmci-restrict-too-big-queue-size-in-qp_host_alloc_queue.patch diff --git a/queue-4.19/crypto-sun4i-ss-handle-bigendian-for-cipher.patch b/queue-4.19/crypto-sun4i-ss-handle-bigendian-for-cipher.patch index 71fe3627921..64233a8fbf5 100644 --- a/queue-4.19/crypto-sun4i-ss-handle-bigendian-for-cipher.patch +++ b/queue-4.19/crypto-sun4i-ss-handle-bigendian-for-cipher.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c -@@ -63,13 +63,13 @@ static int sun4i_ss_opti_poll(struct skc +@@ -55,13 +55,13 @@ static int sun4i_ss_opti_poll(struct skc spin_lock_irqsave(&ss->slock, flags); @@ -38,7 +38,7 @@ Signed-off-by: Greg Kroah-Hartman } } writel(mode, ss->base + SS_CTL); -@@ -223,13 +223,13 @@ static int sun4i_ss_cipher_poll(struct s +@@ -204,13 +204,13 @@ static int sun4i_ss_cipher_poll(struct s spin_lock_irqsave(&ss->slock, flags); diff --git a/queue-4.19/crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch b/queue-4.19/crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch deleted file mode 100644 index d7b1efe3ffe..00000000000 --- a/queue-4.19/crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch +++ /dev/null @@ -1,101 +0,0 @@ -From b756f1c8fc9d84e3f546d7ffe056c5352f4aab05 Mon Sep 17 00:00:00 2001 -From: Corentin Labbe -Date: Mon, 14 Dec 2020 20:02:27 +0000 -Subject: crypto: sun4i-ss - IV register does not work on A10 and A13 - -From: Corentin Labbe - -commit b756f1c8fc9d84e3f546d7ffe056c5352f4aab05 upstream. - -Allwinner A10 and A13 SoC have a version of the SS which produce -invalid IV in IVx register. - -Instead of adding a variant for those, let's convert SS to produce IV -directly from data. -Fixes: 6298e948215f2 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") -Cc: -Signed-off-by: Corentin Labbe -Signed-off-by: Herbert Xu -Signed-off-by: Greg Kroah-Hartman ---- - drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 34 ++++++++++++++++++++++++------ - 1 file changed, 28 insertions(+), 6 deletions(-) - ---- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c -+++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c -@@ -24,6 +24,7 @@ static int sun4i_ss_opti_poll(struct skc - unsigned int ivsize = crypto_skcipher_ivsize(tfm); - struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq); - u32 mode = ctx->mode; -+ void *backup_iv = NULL; - /* when activating SS, the default FIFO space is SS_RX_DEFAULT(32) */ - u32 rx_cnt = SS_RX_DEFAULT; - u32 tx_cnt = 0; -@@ -53,6 +54,13 @@ static int sun4i_ss_opti_poll(struct skc - return -EINVAL; - } - -+ if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) { -+ backup_iv = kzalloc(ivsize, GFP_KERNEL); -+ if (!backup_iv) -+ return -ENOMEM; -+ scatterwalk_map_and_copy(backup_iv, areq->src, areq->cryptlen - ivsize, ivsize, 0); -+ } -+ - spin_lock_irqsave(&ss->slock, flags); - - for (i = 0; i < op->keylen; i += 4) -@@ -126,9 +134,12 @@ static int sun4i_ss_opti_poll(struct skc - } while (oleft); - - if (areq->iv) { -- for (i = 0; i < 4 && i < ivsize / 4; i++) { -- v = readl(ss->base + SS_IV0 + i * 4); -- *(u32 *)(areq->iv + i * 4) = v; -+ if (mode & SS_DECRYPTION) { -+ memcpy(areq->iv, backup_iv, ivsize); -+ kfree_sensitive(backup_iv); -+ } else { -+ scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize, -+ ivsize, 0); - } - } - -@@ -160,6 +171,7 @@ static int sun4i_ss_cipher_poll(struct s - unsigned int ileft = areq->cryptlen; - unsigned int oleft = areq->cryptlen; - unsigned int todo; -+ void *backup_iv = NULL; - struct sg_mapping_iter mi, mo; - unsigned long pi = 0, po = 0; /* progress for in and out */ - bool miter_err; -@@ -202,6 +214,13 @@ static int sun4i_ss_cipher_poll(struct s - if (no_chunk == 1) - return sun4i_ss_opti_poll(areq); - -+ if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) { -+ backup_iv = kzalloc(ivsize, GFP_KERNEL); -+ if (!backup_iv) -+ return -ENOMEM; -+ scatterwalk_map_and_copy(backup_iv, areq->src, areq->cryptlen - ivsize, ivsize, 0); -+ } -+ - spin_lock_irqsave(&ss->slock, flags); - - for (i = 0; i < op->keylen; i += 4) -@@ -330,9 +349,12 @@ static int sun4i_ss_cipher_poll(struct s - sg_miter_stop(&mo); - } - if (areq->iv) { -- for (i = 0; i < 4 && i < ivsize / 4; i++) { -- v = readl(ss->base + SS_IV0 + i * 4); -- *(u32 *)(areq->iv + i * 4) = v; -+ if (mode & SS_DECRYPTION) { -+ memcpy(areq->iv, backup_iv, ivsize); -+ kfree_sensitive(backup_iv); -+ } else { -+ scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize, -+ ivsize, 0); - } - } - diff --git a/queue-4.19/series b/queue-4.19/series index a7c583fc906..d7b1cc666b6 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -199,7 +199,6 @@ btrfs-fix-reloc-root-leak-with-0-ref-reloc-roots-on-recovery.patch btrfs-fix-extent-buffer-leak-on-failure-to-copy-root.patch crypto-arm64-sha-add-missing-module-aliases.patch crypto-sun4i-ss-checking-sg-length-is-not-sufficient.patch -crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch crypto-sun4i-ss-handle-bigendian-for-cipher.patch seccomp-add-missing-return-in-non-void-function.patch misc-rtsx-init-of-rts522a-add-ocp-power-off-when-no-card-is-present.patch diff --git a/queue-5.10/drm-rcar-du-fix-leak-of-cmm-platform-device-referenc.patch b/queue-5.10/drm-rcar-du-fix-leak-of-cmm-platform-device-referenc.patch deleted file mode 100644 index b18d5ac293a..00000000000 --- a/queue-5.10/drm-rcar-du-fix-leak-of-cmm-platform-device-referenc.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 42ad28a1036fe03ea783244ef85f6b07280fd19c Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 16 Dec 2020 03:19:46 +0200 -Subject: drm: rcar-du: Fix leak of CMM platform device reference - -From: Laurent Pinchart - -[ Upstream commit 9fa120458da142da0d1d3eaf6f6a3a2c2c91d27b ] - -The device references acquired by of_find_device_by_node() are not -released by the driver. Fix this by registering a cleanup action. - -Fixes: 8de707aeb452 ("drm: rcar-du: kms: Initialize CMM instances") -Signed-off-by: Laurent Pinchart -Reviewed-by: Jacopo Mondi -Signed-off-by: Sasha Levin ---- - drivers/gpu/drm/rcar-du/rcar_du_kms.c | 22 +++++++++++++++++++--- - 1 file changed, 19 insertions(+), 3 deletions(-) - -diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c -index 7015e22872bbe..ecc894f0bc430 100644 ---- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c -+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -726,8 +727,12 @@ static int rcar_du_cmm_init(struct rcar_du_device *rcdu) - * disabled: return 0 and let the DU continue probing. - */ - ret = rcar_cmm_init(pdev); -- if (ret) -+ if (ret) { -+ platform_device_put(pdev); - return ret == -ENODEV ? 0 : ret; -+ } -+ -+ rcdu->cmms[i] = pdev; - - /* - * Enforce suspend/resume ordering by making the CMM a provider -@@ -739,13 +744,20 @@ static int rcar_du_cmm_init(struct rcar_du_device *rcdu) - "Failed to create device link to CMM%u\n", i); - return -EINVAL; - } -- -- rcdu->cmms[i] = pdev; - } - - return 0; - } - -+static void rcar_du_modeset_cleanup(struct drm_device *dev, void *res) -+{ -+ struct rcar_du_device *rcdu = to_rcar_du_device(dev); -+ unsigned int i; -+ -+ for (i = 0; i < ARRAY_SIZE(rcdu->cmms); ++i) -+ platform_device_put(rcdu->cmms[i]); -+} -+ - int rcar_du_modeset_init(struct rcar_du_device *rcdu) - { - static const unsigned int mmio_offsets[] = { -@@ -766,6 +778,10 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu) - if (ret) - return ret; - -+ ret = drmm_add_action(&rcdu->ddev, rcar_du_modeset_cleanup, NULL); -+ if (ret) -+ return ret; -+ - dev->mode_config.min_width = 0; - dev->mode_config.min_height = 0; - dev->mode_config.normalize_zpos = true; --- -2.27.0 - diff --git a/queue-5.10/powerpc-sstep-fix-incorrect-return-from-analyze_inst.patch b/queue-5.10/powerpc-sstep-fix-incorrect-return-from-analyze_inst.patch deleted file mode 100644 index 05555093645..00000000000 --- a/queue-5.10/powerpc-sstep-fix-incorrect-return-from-analyze_inst.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 4df5aea3f96d418f5a3bc06a5a1e32b3fddd4fb2 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 25 Jan 2021 18:36:43 +0530 -Subject: powerpc/sstep: Fix incorrect return from analyze_instr() - -From: Ananth N Mavinakayanahalli - -[ Upstream commit 718aae916fa6619c57c348beaedd675835cf1aa1 ] - -We currently just percolate the return value from analyze_instr() -to the caller of emulate_step(), especially if it is a -1. - -For one particular case (opcode = 4) for instructions that aren't -currently emulated, we are returning 'should not be single-stepped' -while we should have returned 0 which says 'did not emulate, may -have to single-step'. - -Fixes: 930d6288a26787 ("powerpc: sstep: Add support for maddhd, maddhdu, maddld instructions") -Signed-off-by: Ananth N Mavinakayanahalli -Suggested-by: Michael Ellerman -Tested-by: Naveen N. Rao -Reviewed-by: Sandipan Das -Signed-off-by: Michael Ellerman -Link: https://lore.kernel.org/r/161157999039.64773.14950289716779364766.stgit@thinktux.local -Signed-off-by: Sasha Levin ---- - arch/powerpc/lib/sstep.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c -index b18bce1a209fa..edd4b275bd6a5 100644 ---- a/arch/powerpc/lib/sstep.c -+++ b/arch/powerpc/lib/sstep.c -@@ -1380,6 +1380,11 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, - - #ifdef __powerpc64__ - case 4: -+ /* -+ * There are very many instructions with this primary opcode -+ * introduced in the ISA as early as v2.03. However, the ones -+ * we currently emulate were all introduced with ISA 3.0 -+ */ - if (!cpu_has_feature(CPU_FTR_ARCH_300)) - return -1; - -@@ -1407,7 +1412,7 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, - * There are other instructions from ISA 3.0 with the same - * primary opcode which do not have emulation support yet. - */ -- return -1; -+ goto unknown_opcode; - #endif - - case 7: /* mulli */ --- -2.27.0 - diff --git a/queue-5.10/series b/queue-5.10/series index 6330c463c84..f05341d7447 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -150,7 +150,6 @@ kcsan-rewrite-kcsan_prandom_u32_max-without-prandom_.patch drm-rcar-du-fix-pm-reference-leak-in-rcar_cmm_enable.patch drm-rcar-du-fix-crash-when-using-lvds1-clock-for-crt.patch drm-rcar-du-fix-the-return-check-of-of_parse_phandle.patch -drm-rcar-du-fix-leak-of-cmm-platform-device-referenc.patch drm-amdgpu-fix-macro-name-_amdgpu_trace_h_-in-prepro.patch mips-c-r4k-fix-section-mismatch-for-loongson2_sc_ini.patch mips-lantiq-explicitly-compare-ltq_ebu_pcc_istat-aga.patch @@ -324,7 +323,6 @@ ib-umad-return-eio-in-case-of-when-device-disassocia.patch ib-umad-return-epollerr-in-case-of-when-device-disas.patch kvm-ppc-make-the-vmx-instruction-emulation-routines-.patch powerpc-47x-disable-256k-page-size.patch -powerpc-sstep-fix-incorrect-return-from-analyze_inst.patch powerpc-time-enable-sched-clock-for-irqtime.patch mmc-owl-mmc-fix-a-resource-leak-in-an-error-handling.patch mmc-sdhci-sprd-fix-some-resource-leaks-in-the-remove.patch diff --git a/queue-5.11/drm-rcar-du-fix-leak-of-cmm-platform-device-referenc.patch b/queue-5.11/drm-rcar-du-fix-leak-of-cmm-platform-device-referenc.patch deleted file mode 100644 index 9b793ac63c0..00000000000 --- a/queue-5.11/drm-rcar-du-fix-leak-of-cmm-platform-device-referenc.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 325f040d5f8b69f1c68bdca1d73757f567424d4a Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 16 Dec 2020 03:19:46 +0200 -Subject: drm: rcar-du: Fix leak of CMM platform device reference - -From: Laurent Pinchart - -[ Upstream commit 9fa120458da142da0d1d3eaf6f6a3a2c2c91d27b ] - -The device references acquired by of_find_device_by_node() are not -released by the driver. Fix this by registering a cleanup action. - -Fixes: 8de707aeb452 ("drm: rcar-du: kms: Initialize CMM instances") -Signed-off-by: Laurent Pinchart -Reviewed-by: Jacopo Mondi -Signed-off-by: Sasha Levin ---- - drivers/gpu/drm/rcar-du/rcar_du_kms.c | 22 +++++++++++++++++++--- - 1 file changed, 19 insertions(+), 3 deletions(-) - -diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c -index 7015e22872bbe..ecc894f0bc430 100644 ---- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c -+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -726,8 +727,12 @@ static int rcar_du_cmm_init(struct rcar_du_device *rcdu) - * disabled: return 0 and let the DU continue probing. - */ - ret = rcar_cmm_init(pdev); -- if (ret) -+ if (ret) { -+ platform_device_put(pdev); - return ret == -ENODEV ? 0 : ret; -+ } -+ -+ rcdu->cmms[i] = pdev; - - /* - * Enforce suspend/resume ordering by making the CMM a provider -@@ -739,13 +744,20 @@ static int rcar_du_cmm_init(struct rcar_du_device *rcdu) - "Failed to create device link to CMM%u\n", i); - return -EINVAL; - } -- -- rcdu->cmms[i] = pdev; - } - - return 0; - } - -+static void rcar_du_modeset_cleanup(struct drm_device *dev, void *res) -+{ -+ struct rcar_du_device *rcdu = to_rcar_du_device(dev); -+ unsigned int i; -+ -+ for (i = 0; i < ARRAY_SIZE(rcdu->cmms); ++i) -+ platform_device_put(rcdu->cmms[i]); -+} -+ - int rcar_du_modeset_init(struct rcar_du_device *rcdu) - { - static const unsigned int mmio_offsets[] = { -@@ -766,6 +778,10 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu) - if (ret) - return ret; - -+ ret = drmm_add_action(&rcdu->ddev, rcar_du_modeset_cleanup, NULL); -+ if (ret) -+ return ret; -+ - dev->mode_config.min_width = 0; - dev->mode_config.min_height = 0; - dev->mode_config.normalize_zpos = true; --- -2.27.0 - diff --git a/queue-5.11/series b/queue-5.11/series index 827085223ac..e8e33707576 100644 --- a/queue-5.11/series +++ b/queue-5.11/series @@ -184,7 +184,6 @@ kcsan-rewrite-kcsan_prandom_u32_max-without-prandom_.patch drm-rcar-du-fix-pm-reference-leak-in-rcar_cmm_enable.patch drm-rcar-du-fix-crash-when-using-lvds1-clock-for-crt.patch drm-rcar-du-fix-the-return-check-of-of_parse_phandle.patch -drm-rcar-du-fix-leak-of-cmm-platform-device-referenc.patch drm-amdgpu-fix-macro-name-_amdgpu_trace_h_-in-prepro.patch mips-c-r4k-fix-section-mismatch-for-loongson2_sc_ini.patch mips-lantiq-explicitly-compare-ltq_ebu_pcc_istat-aga.patch diff --git a/queue-5.4/crypto-sun4i-ss-handle-bigendian-for-cipher.patch b/queue-5.4/crypto-sun4i-ss-handle-bigendian-for-cipher.patch index a064d2f586a..caafd05deb5 100644 --- a/queue-5.4/crypto-sun4i-ss-handle-bigendian-for-cipher.patch +++ b/queue-5.4/crypto-sun4i-ss-handle-bigendian-for-cipher.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c -@@ -54,13 +54,13 @@ static int noinline_for_stack sun4i_ss_o +@@ -46,13 +46,13 @@ static int noinline_for_stack sun4i_ss_o spin_lock_irqsave(&ss->slock, flags); @@ -38,7 +38,7 @@ Signed-off-by: Greg Kroah-Hartman } } writel(mode, ss->base + SS_CTL); -@@ -240,13 +240,13 @@ static int sun4i_ss_cipher_poll(struct s +@@ -221,13 +221,13 @@ static int sun4i_ss_cipher_poll(struct s spin_lock_irqsave(&ss->slock, flags); diff --git a/queue-5.4/crypto-sun4i-ss-initialize-need_fallback.patch b/queue-5.4/crypto-sun4i-ss-initialize-need_fallback.patch index ff3616dd7af..329db66f65b 100644 --- a/queue-5.4/crypto-sun4i-ss-initialize-need_fallback.patch +++ b/queue-5.4/crypto-sun4i-ss-initialize-need_fallback.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c -@@ -196,7 +196,7 @@ static int sun4i_ss_cipher_poll(struct s +@@ -184,7 +184,7 @@ static int sun4i_ss_cipher_poll(struct s unsigned int obo = 0; /* offset in bufo*/ unsigned int obl = 0; /* length of data in bufo */ unsigned long flags; diff --git a/queue-5.4/crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch b/queue-5.4/crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch deleted file mode 100644 index 9306ce1c40e..00000000000 --- a/queue-5.4/crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch +++ /dev/null @@ -1,101 +0,0 @@ -From b756f1c8fc9d84e3f546d7ffe056c5352f4aab05 Mon Sep 17 00:00:00 2001 -From: Corentin Labbe -Date: Mon, 14 Dec 2020 20:02:27 +0000 -Subject: crypto: sun4i-ss - IV register does not work on A10 and A13 - -From: Corentin Labbe - -commit b756f1c8fc9d84e3f546d7ffe056c5352f4aab05 upstream. - -Allwinner A10 and A13 SoC have a version of the SS which produce -invalid IV in IVx register. - -Instead of adding a variant for those, let's convert SS to produce IV -directly from data. -Fixes: 6298e948215f2 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") -Cc: -Signed-off-by: Corentin Labbe -Signed-off-by: Herbert Xu -Signed-off-by: Greg Kroah-Hartman ---- - drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 34 ++++++++++++++++++++++++------ - 1 file changed, 28 insertions(+), 6 deletions(-) - ---- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c -+++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c -@@ -20,6 +20,7 @@ static int noinline_for_stack sun4i_ss_o - unsigned int ivsize = crypto_skcipher_ivsize(tfm); - struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq); - u32 mode = ctx->mode; -+ void *backup_iv = NULL; - /* when activating SS, the default FIFO space is SS_RX_DEFAULT(32) */ - u32 rx_cnt = SS_RX_DEFAULT; - u32 tx_cnt = 0; -@@ -44,6 +45,13 @@ static int noinline_for_stack sun4i_ss_o - return -EINVAL; - } - -+ if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) { -+ backup_iv = kzalloc(ivsize, GFP_KERNEL); -+ if (!backup_iv) -+ return -ENOMEM; -+ scatterwalk_map_and_copy(backup_iv, areq->src, areq->cryptlen - ivsize, ivsize, 0); -+ } -+ - spin_lock_irqsave(&ss->slock, flags); - - for (i = 0; i < op->keylen; i += 4) -@@ -117,9 +125,12 @@ static int noinline_for_stack sun4i_ss_o - } while (oleft); - - if (areq->iv) { -- for (i = 0; i < 4 && i < ivsize / 4; i++) { -- v = readl(ss->base + SS_IV0 + i * 4); -- *(u32 *)(areq->iv + i * 4) = v; -+ if (mode & SS_DECRYPTION) { -+ memcpy(areq->iv, backup_iv, ivsize); -+ kfree_sensitive(backup_iv); -+ } else { -+ scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize, -+ ivsize, 0); - } - } - -@@ -176,6 +187,7 @@ static int sun4i_ss_cipher_poll(struct s - unsigned int ileft = areq->cryptlen; - unsigned int oleft = areq->cryptlen; - unsigned int todo; -+ void *backup_iv = NULL; - struct sg_mapping_iter mi, mo; - unsigned long pi = 0, po = 0; /* progress for in and out */ - bool miter_err; -@@ -219,6 +231,13 @@ static int sun4i_ss_cipher_poll(struct s - if (need_fallback) - return sun4i_ss_cipher_poll_fallback(areq); - -+ if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) { -+ backup_iv = kzalloc(ivsize, GFP_KERNEL); -+ if (!backup_iv) -+ return -ENOMEM; -+ scatterwalk_map_and_copy(backup_iv, areq->src, areq->cryptlen - ivsize, ivsize, 0); -+ } -+ - spin_lock_irqsave(&ss->slock, flags); - - for (i = 0; i < op->keylen; i += 4) -@@ -347,9 +366,12 @@ static int sun4i_ss_cipher_poll(struct s - sg_miter_stop(&mo); - } - if (areq->iv) { -- for (i = 0; i < 4 && i < ivsize / 4; i++) { -- v = readl(ss->base + SS_IV0 + i * 4); -- *(u32 *)(areq->iv + i * 4) = v; -+ if (mode & SS_DECRYPTION) { -+ memcpy(areq->iv, backup_iv, ivsize); -+ kfree_sensitive(backup_iv); -+ } else { -+ scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize, -+ ivsize, 0); - } - } - diff --git a/queue-5.4/powerpc-sstep-fix-incorrect-return-from-analyze_inst.patch b/queue-5.4/powerpc-sstep-fix-incorrect-return-from-analyze_inst.patch deleted file mode 100644 index b05cf4d5d0b..00000000000 --- a/queue-5.4/powerpc-sstep-fix-incorrect-return-from-analyze_inst.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 1dcc60e976b6f4c9ccf0f3939c43b3ec0057f8f2 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 25 Jan 2021 18:36:43 +0530 -Subject: powerpc/sstep: Fix incorrect return from analyze_instr() - -From: Ananth N Mavinakayanahalli - -[ Upstream commit 718aae916fa6619c57c348beaedd675835cf1aa1 ] - -We currently just percolate the return value from analyze_instr() -to the caller of emulate_step(), especially if it is a -1. - -For one particular case (opcode = 4) for instructions that aren't -currently emulated, we are returning 'should not be single-stepped' -while we should have returned 0 which says 'did not emulate, may -have to single-step'. - -Fixes: 930d6288a26787 ("powerpc: sstep: Add support for maddhd, maddhdu, maddld instructions") -Signed-off-by: Ananth N Mavinakayanahalli -Suggested-by: Michael Ellerman -Tested-by: Naveen N. Rao -Reviewed-by: Sandipan Das -Signed-off-by: Michael Ellerman -Link: https://lore.kernel.org/r/161157999039.64773.14950289716779364766.stgit@thinktux.local -Signed-off-by: Sasha Levin ---- - arch/powerpc/lib/sstep.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c -index c077acb983a19..bf3432b10d0af 100644 ---- a/arch/powerpc/lib/sstep.c -+++ b/arch/powerpc/lib/sstep.c -@@ -1304,6 +1304,11 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, - - #ifdef __powerpc64__ - case 4: -+ /* -+ * There are very many instructions with this primary opcode -+ * introduced in the ISA as early as v2.03. However, the ones -+ * we currently emulate were all introduced with ISA 3.0 -+ */ - if (!cpu_has_feature(CPU_FTR_ARCH_300)) - return -1; - -@@ -1331,7 +1336,7 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, - * There are other instructions from ISA 3.0 with the same - * primary opcode which do not have emulation support yet. - */ -- return -1; -+ goto unknown_opcode; - #endif - - case 7: /* mulli */ --- -2.27.0 - diff --git a/queue-5.4/series b/queue-5.4/series index 458fc278eb2..eeba6aace92 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -163,7 +163,6 @@ ib-umad-return-eio-in-case-of-when-device-disassocia.patch ib-umad-return-epollerr-in-case-of-when-device-disas.patch kvm-ppc-make-the-vmx-instruction-emulation-routines-.patch powerpc-47x-disable-256k-page-size.patch -powerpc-sstep-fix-incorrect-return-from-analyze_inst.patch mmc-sdhci-sprd-fix-some-resource-leaks-in-the-remove.patch mmc-usdhi6rol0-fix-a-resource-leak-in-the-error-hand.patch mmc-renesas_sdhi_internal_dmac-fix-dma-buffer-alignm.patch @@ -269,7 +268,6 @@ btrfs-fix-extent-buffer-leak-on-failure-to-copy-root.patch crypto-arm64-sha-add-missing-module-aliases.patch crypto-aesni-prevent-misaligned-buffers-on-the-stack.patch crypto-sun4i-ss-checking-sg-length-is-not-sufficient.patch -crypto-sun4i-ss-iv-register-does-not-work-on-a10-and-a13.patch crypto-sun4i-ss-handle-bigendian-for-cipher.patch crypto-sun4i-ss-initialize-need_fallback.patch seccomp-add-missing-return-in-non-void-function.patch