aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-11-11 13:57:25 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-11-11 18:14:13 +0100
commit28a85b8c2b1ec153795c4c03d39ee9ef40cc1878 (patch)
treefbd9f97d8c99f10f17b904ac72ff57abade70115
parent3a8cfabe0cd11612f776f6e8adec2f17e71e0987 (diff)
downloadupstream-28a85b8c2b1ec153795c4c03d39ee9ef40cc1878.tar.gz
upstream-28a85b8c2b1ec153795c4c03d39ee9ef40cc1878.tar.bz2
upstream-28a85b8c2b1ec153795c4c03d39ee9ef40cc1878.zip
layerscape: update kernel patch to fix build
The target heavily modifies caamalg.c, so changes introduced in kernel commit 7b930def8ef6 ("crypto: caam - limit output IV to CBC to work around CTR mode DMA issue") have broken build. This adjusts the upstream changes to match the rest of our local patch. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
-rw-r--r--target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch b/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch
index 971427d078..1ceef2f0aa 100644
--- a/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch
@@ -9166,6 +9166,15 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
ablkcipher_unmap(jrdev, edesc, req);
+@@ -2052,7 +911,7 @@ static void ablkcipher_encrypt_done(stru
+ * The crypto API expects us to set the IV (req->info) to the last
+ * ciphertext block when running in CBC mode.
+ */
+- if ((ctx->class1_alg_type & OP_ALG_AAI_MASK) == OP_ALG_AAI_CBC)
++ if ((ctx->cdata.algtype & OP_ALG_AAI_MASK) == OP_ALG_AAI_CBC)
+ scatterwalk_map_and_copy(req->info, req->dst, req->nbytes -
+ ivsize, ivsize, 0);
+
@@ -2074,8 +933,7 @@ static void ablkcipher_decrypt_done(stru
dev_err(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err);
#endif
@@ -9190,6 +9199,15 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
ablkcipher_unmap(jrdev, edesc, req);
+@@ -2094,7 +952,7 @@ static void ablkcipher_decrypt_done(stru
+ * The crypto API expects us to set the IV (req->info) to the last
+ * ciphertext block when running in CBC mode.
+ */
+- if ((ctx->class1_alg_type & OP_ALG_AAI_MASK) == OP_ALG_AAI_CBC)
++ if ((ctx->cdata.algtype & OP_ALG_AAI_MASK) == OP_ALG_AAI_CBC)
+ scatterwalk_map_and_copy(req->info, req->src, req->nbytes -
+ ivsize, ivsize, 0);
+
@@ -2127,7 +985,7 @@ static void init_aead_job(struct aead_re
init_job_desc_shared(desc, ptr, len, HDR_SHARE_DEFER | HDR_REVERSE);