From: Greg Kroah-Hartman Date: Thu, 27 Oct 2022 08:27:58 +0000 (+0200) Subject: dropped crypto patches that are not needed X-Git-Tag: v5.10.151~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=54d769e28b2a5c9388fb3869cb7df620df5ee512;p=thirdparty%2Fkernel%2Fstable-queue.git dropped crypto patches that are not needed --- diff --git a/queue-5.10/crypto-qat-reduce-size-of-mapped-region.patch b/queue-5.10/crypto-qat-reduce-size-of-mapped-region.patch deleted file mode 100644 index 2ddd8ee39c3..00000000000 --- a/queue-5.10/crypto-qat-reduce-size-of-mapped-region.patch +++ /dev/null @@ -1,80 +0,0 @@ -From ac67c1dc42ffdc167ecc29029b496394be4b6c39 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 4 Jan 2021 17:21:59 +0000 -Subject: crypto: qat - reduce size of mapped region - -From: Adam Guerin - -[ Upstream commit e48767c17718067ba21fb2ef461779ec2506f845 ] - -Restrict size of field to what is required by the operation. - -This issue was detected by smatch: - - drivers/crypto/qat/qat_common/qat_asym_algs.c:328 qat_dh_compute_value() error: dma_map_single_attrs() '&qat_req->in.dh.in.b' too small (8 vs 64) - -Signed-off-by: Adam Guerin -Reviewed-by: Giovanni Cabiddu -Signed-off-by: Giovanni Cabiddu -Signed-off-by: Herbert Xu -Stable-dep-of: 9c5f21b198d2 ("Revert "crypto: qat - reduce size of mapped region"") -Signed-off-by: Sasha Levin ---- - drivers/crypto/qat/qat_common/qat_asym_algs.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c b/drivers/crypto/qat/qat_common/qat_asym_algs.c -index 846569ec9066..2b1aca487fc3 100644 ---- a/drivers/crypto/qat/qat_common/qat_asym_algs.c -+++ b/drivers/crypto/qat/qat_common/qat_asym_algs.c -@@ -326,13 +326,13 @@ static int qat_dh_compute_value(struct kpp_request *req) - qat_req->out.dh.out_tab[1] = 0; - /* Mapping in.in.b or in.in_g2.xa is the same */ - qat_req->phy_in = dma_map_single(dev, &qat_req->in.dh.in.b, -- sizeof(struct qat_dh_input_params), -+ sizeof(qat_req->in.dh.in.b), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_in))) - goto unmap_dst; - - qat_req->phy_out = dma_map_single(dev, &qat_req->out.dh.r, -- sizeof(struct qat_dh_output_params), -+ sizeof(qat_req->out.dh.r), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_out))) - goto unmap_in_params; -@@ -721,13 +721,13 @@ static int qat_rsa_enc(struct akcipher_request *req) - qat_req->in.rsa.in_tab[3] = 0; - qat_req->out.rsa.out_tab[1] = 0; - qat_req->phy_in = dma_map_single(dev, &qat_req->in.rsa.enc.m, -- sizeof(struct qat_rsa_input_params), -+ sizeof(qat_req->in.rsa.enc.m), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_in))) - goto unmap_dst; - - qat_req->phy_out = dma_map_single(dev, &qat_req->out.rsa.enc.c, -- sizeof(struct qat_rsa_output_params), -+ sizeof(qat_req->out.rsa.enc.c), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_out))) - goto unmap_in_params; -@@ -869,13 +869,13 @@ static int qat_rsa_dec(struct akcipher_request *req) - qat_req->in.rsa.in_tab[3] = 0; - qat_req->out.rsa.out_tab[1] = 0; - qat_req->phy_in = dma_map_single(dev, &qat_req->in.rsa.dec.c, -- sizeof(struct qat_rsa_input_params), -+ sizeof(qat_req->in.rsa.dec.c), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_in))) - goto unmap_dst; - - qat_req->phy_out = dma_map_single(dev, &qat_req->out.rsa.dec.m, -- sizeof(struct qat_rsa_output_params), -+ sizeof(qat_req->out.rsa.dec.m), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_out))) - goto unmap_in_params; --- -2.35.1 - diff --git a/queue-5.10/revert-crypto-qat-reduce-size-of-mapped-region.patch b/queue-5.10/revert-crypto-qat-reduce-size-of-mapped-region.patch deleted file mode 100644 index 5163584403f..00000000000 --- a/queue-5.10/revert-crypto-qat-reduce-size-of-mapped-region.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 44dd123969ab1fda162e65b27c98f6cc86979678 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 9 Sep 2022 11:49:13 +0100 -Subject: Revert "crypto: qat - reduce size of mapped region" - -From: Giovanni Cabiddu - -[ Upstream commit 9c5f21b198d259bfe1191b1fedf08e2eab15b33b ] - -This reverts commit e48767c17718067ba21fb2ef461779ec2506f845. - -In an attempt to resolve a set of warnings reported by the static -analyzer Smatch, the reverted commit improperly reduced the sizes of the -DMA mappings used for the input and output parameters for both RSA and -DH creating a mismatch (map size=8 bytes, unmap size=64 bytes). - -This issue is reported when CONFIG_DMA_API_DEBUG is selected, when the -crypto self test is run. The function dma_unmap_single() reports a -warning similar to the one below, saying that the `device driver frees -DMA memory with different size`. - - DMA-API: 4xxx 0000:06:00.0: device driver frees DMA memory with different size [device address=0x0000000123206c80] [map size=8 bytes] [unmap size=64 bytes] - WARNING: CPU: 0 PID: 0 at kernel/dma/debug.c:973 check_unmap+0x3d0/0x8c0\ - ... - Call Trace: - - debug_dma_unmap_page+0x5c/0x60 - qat_dh_cb+0xd7/0x110 [intel_qat] - qat_alg_asym_callback+0x1a/0x30 [intel_qat] - adf_response_handler+0xbd/0x1a0 [intel_qat] - tasklet_action_common.constprop.0+0xcd/0xe0 - __do_softirq+0xf8/0x30c - __irq_exit_rcu+0xbf/0x140 - common_interrupt+0xb9/0xd0 - - - -The original commit was correct. - -Cc: -Reported-by: Herbert Xu -Signed-off-by: Giovanni Cabiddu -Signed-off-by: Herbert Xu -Signed-off-by: Sasha Levin ---- - drivers/crypto/qat/qat_common/qat_asym_algs.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c b/drivers/crypto/qat/qat_common/qat_asym_algs.c -index 2b1aca487fc3..846569ec9066 100644 ---- a/drivers/crypto/qat/qat_common/qat_asym_algs.c -+++ b/drivers/crypto/qat/qat_common/qat_asym_algs.c -@@ -326,13 +326,13 @@ static int qat_dh_compute_value(struct kpp_request *req) - qat_req->out.dh.out_tab[1] = 0; - /* Mapping in.in.b or in.in_g2.xa is the same */ - qat_req->phy_in = dma_map_single(dev, &qat_req->in.dh.in.b, -- sizeof(qat_req->in.dh.in.b), -+ sizeof(struct qat_dh_input_params), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_in))) - goto unmap_dst; - - qat_req->phy_out = dma_map_single(dev, &qat_req->out.dh.r, -- sizeof(qat_req->out.dh.r), -+ sizeof(struct qat_dh_output_params), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_out))) - goto unmap_in_params; -@@ -721,13 +721,13 @@ static int qat_rsa_enc(struct akcipher_request *req) - qat_req->in.rsa.in_tab[3] = 0; - qat_req->out.rsa.out_tab[1] = 0; - qat_req->phy_in = dma_map_single(dev, &qat_req->in.rsa.enc.m, -- sizeof(qat_req->in.rsa.enc.m), -+ sizeof(struct qat_rsa_input_params), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_in))) - goto unmap_dst; - - qat_req->phy_out = dma_map_single(dev, &qat_req->out.rsa.enc.c, -- sizeof(qat_req->out.rsa.enc.c), -+ sizeof(struct qat_rsa_output_params), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_out))) - goto unmap_in_params; -@@ -869,13 +869,13 @@ static int qat_rsa_dec(struct akcipher_request *req) - qat_req->in.rsa.in_tab[3] = 0; - qat_req->out.rsa.out_tab[1] = 0; - qat_req->phy_in = dma_map_single(dev, &qat_req->in.rsa.dec.c, -- sizeof(qat_req->in.rsa.dec.c), -+ sizeof(struct qat_rsa_input_params), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_in))) - goto unmap_dst; - - qat_req->phy_out = dma_map_single(dev, &qat_req->out.rsa.dec.m, -- sizeof(qat_req->out.rsa.dec.m), -+ sizeof(struct qat_rsa_output_params), - DMA_TO_DEVICE); - if (unlikely(dma_mapping_error(dev, qat_req->phy_out))) - goto unmap_in_params; --- -2.35.1 - diff --git a/queue-5.10/series b/queue-5.10/series index c7e90347f14..60441e9487b 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -54,8 +54,6 @@ net-phy-dp83822-disable-mdi-crossover-status-change-.patch iommu-vt-d-allow-nvs-regions-in-arch_rmrr_sanity_che.patch iommu-vt-d-clean-up-si_domain-in-the-init_dmars-erro.patch drm-virtio-use-appropriate-atomic-state-in-virtio_gp.patch -crypto-qat-reduce-size-of-mapped-region.patch -revert-crypto-qat-reduce-size-of-mapped-region.patch sunrpc-add-xdr_set_scratch_page-and-xdr_reset_scratc.patch sunrpc-prepare-for-xdr_stream-style-decoding-on-the-.patch nfsd-add-common-helpers-to-decode-void-args-and-enco.patch