]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jun 2020 11:21:37 +0000 (13:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jun 2020 11:21:37 +0000 (13:21 +0200)
added patches:
crypto-talitos-fix-ecb-and-cbc-algs-ivsize.patch
scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch

queue-4.9/crypto-talitos-fix-ecb-and-cbc-algs-ivsize.patch [new file with mode: 0644]
queue-4.9/scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/crypto-talitos-fix-ecb-and-cbc-algs-ivsize.patch b/queue-4.9/crypto-talitos-fix-ecb-and-cbc-algs-ivsize.patch
new file mode 100644 (file)
index 0000000..2d5ecc3
--- /dev/null
@@ -0,0 +1,57 @@
+From cantona@cantona.net  Thu Jun 11 12:53:25 2020
+From: Su Kang Yin <cantona@cantona.net>
+Date: Thu, 11 Jun 2020 18:07:45 +0800
+Subject: crypto: talitos - fix ECB and CBC algs ivsize
+To: gregkh@linuxfoundation.org, linux-crypto@vger.kernel.org, christophe.leroy@c-s.fr
+Cc: Su Kang Yin <cantona@cantona.net>, Herbert Xu <herbert@gondor.apana.org.au>, "David S. Miller" <davem@davemloft.net>, linux-kernel@vger.kernel.org
+Message-ID: <20200611100745.6513-1-cantona@cantona.net>
+
+From: Su Kang Yin <cantona@cantona.net>
+
+Patch for 4.9 upstream:
+
+commit e1de42fdfc6a ("crypto: talitos - fix ECB algs ivsize")
+wrongly modified CBC algs ivsize instead of ECB aggs ivsize.
+
+This restore the CBC algs original ivsize of removes ECB's ones.
+
+Signed-off-by: Su Kang Yin <cantona@cantona.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/crypto/talitos.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/crypto/talitos.c
++++ b/drivers/crypto/talitos.c
+@@ -2636,7 +2636,6 @@ static struct talitos_alg_template drive
+                       .cra_ablkcipher = {
+                               .min_keysize = AES_MIN_KEY_SIZE,
+                               .max_keysize = AES_MAX_KEY_SIZE,
+-                              .ivsize = AES_BLOCK_SIZE,
+                       }
+               },
+               .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
+@@ -2670,6 +2669,7 @@ static struct talitos_alg_template drive
+                       .cra_ablkcipher = {
+                               .min_keysize = AES_MIN_KEY_SIZE,
+                               .max_keysize = AES_MAX_KEY_SIZE,
++                              .ivsize = AES_BLOCK_SIZE,
+                               .setkey = ablkcipher_aes_setkey,
+                       }
+               },
+@@ -2687,7 +2687,6 @@ static struct talitos_alg_template drive
+                       .cra_ablkcipher = {
+                               .min_keysize = DES_KEY_SIZE,
+                               .max_keysize = DES_KEY_SIZE,
+-                              .ivsize = DES_BLOCK_SIZE,
+                       }
+               },
+               .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
+@@ -2720,7 +2719,6 @@ static struct talitos_alg_template drive
+                       .cra_ablkcipher = {
+                               .min_keysize = DES3_EDE_KEY_SIZE,
+                               .max_keysize = DES3_EDE_KEY_SIZE,
+-                              .ivsize = DES3_EDE_BLOCK_SIZE,
+                       }
+               },
+               .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
diff --git a/queue-4.9/scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch b/queue-4.9/scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch
new file mode 100644 (file)
index 0000000..dd8e132
--- /dev/null
@@ -0,0 +1,51 @@
+From e7661a8e5ce10b5321882d0bbaf3f81070903319 Mon Sep 17 00:00:00 2001
+From: Johannes Thumshirn <jthumshirn@suse.de>
+Date: Wed, 12 Apr 2017 09:21:19 +0200
+Subject: scsi: return correct blkprep status code in case scsi_init_io() fails.
+
+From: Johannes Thumshirn <jthumshirn@suse.de>
+
+commit e7661a8e5ce10b5321882d0bbaf3f81070903319 upstream.
+
+When instrumenting the SCSI layer to run into the
+!blk_rq_nr_phys_segments(rq) case the following warning emitted from the
+block layer:
+
+blk_peek_request: bad return=-22
+
+This happens because since commit fd3fc0b4d730 ("scsi: don't BUG_ON()
+empty DMA transfers") we return the wrong error value from
+scsi_prep_fn() back to the block layer.
+
+[mkp: silenced checkpatch]
+
+Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
+Fixes: fd3fc0b4d730 scsi: don't BUG_ON() empty DMA transfers
+Cc: <stable@vger.kernel.org>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Hannes Reinecke <hare@suse.com>
+Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+[iwamatsu: - backport for 4.4.y and 4.9.y
+    - Use rq->nr_phys_segments instead of blk_rq_nr_phys_segments]
+Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/scsi_lib.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/scsi/scsi_lib.c
++++ b/drivers/scsi/scsi_lib.c
+@@ -1029,10 +1029,10 @@ int scsi_init_io(struct scsi_cmnd *cmd)
+       struct scsi_device *sdev = cmd->device;
+       struct request *rq = cmd->request;
+       bool is_mq = (rq->mq_ctx != NULL);
+-      int error;
++      int error = BLKPREP_KILL;
+       if (WARN_ON_ONCE(!rq->nr_phys_segments))
+-              return -EINVAL;
++              goto err_exit;
+       error = scsi_init_sgtable(rq, &cmd->sdb);
+       if (error)
index 7aa47feaebb7f028c6b21bd70c77e9ed3df4fd52..e5184cedc0f32f4e2b22c6165f62207fc29dc8e4 100644 (file)
@@ -1,2 +1,4 @@
 ipv6-fix-ipv6_addrform-operation-logic.patch
 vxlan-avoid-infinite-loop-when-suppressing-ns-messages-with-invalid-options.patch
+crypto-talitos-fix-ecb-and-cbc-algs-ivsize.patch
+scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch