aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/patches-4.14/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2019-05-31 19:30:00 +0200
committerChristian Lamparter <chunkeey@gmail.com>2019-06-02 11:08:38 +0200
commitdfa86b01e505a1dacad82ccd60f1133e395a6d17 (patch)
tree4acaac7dcd894680a1fcfdfef3f5b99fa340acf8 /target/linux/apm821xx/patches-4.14/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch
parent1544df0d89bed93372b79340ad988cb1f4137110 (diff)
downloadupstream-dfa86b01e505a1dacad82ccd60f1133e395a6d17.tar.gz
upstream-dfa86b01e505a1dacad82ccd60f1133e395a6d17.tar.bz2
upstream-dfa86b01e505a1dacad82ccd60f1133e395a6d17.zip
apm821xx: backport accepted linux-crypto patches to 4.14
This patch brings the crypto4xx driver up to the latest upstream changes. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/apm821xx/patches-4.14/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch')
-rw-r--r--target/linux/apm821xx/patches-4.14/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/apm821xx/patches-4.14/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch b/target/linux/apm821xx/patches-4.14/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch
new file mode 100644
index 0000000000..0c2871f376
--- /dev/null
+++ b/target/linux/apm821xx/patches-4.14/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch
@@ -0,0 +1,34 @@
+From 1ad0f1603a6b2afb62a1c065409aaa4e43ca7627 Mon Sep 17 00:00:00 2001
+From: Eric Biggers <ebiggers@google.com>
+Date: Wed, 14 Nov 2018 12:19:39 -0800
+Subject: [PATCH 03/15] crypto: drop mask=CRYPTO_ALG_ASYNC from 'cipher' tfm
+ allocations
+
+'cipher' algorithms (single block ciphers) are always synchronous, so
+passing CRYPTO_ALG_ASYNC in the mask to crypto_alloc_cipher() has no
+effect. Many users therefore already don't pass it, but some still do.
+This inconsistency can cause confusion, especially since the way the
+'mask' argument works is somewhat counterintuitive.
+
+Thus, just remove the unneeded CRYPTO_ALG_ASYNC flags.
+
+This patch shouldn't change any actual behavior.
+
+Signed-off-by: Eric Biggers <ebiggers@google.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+---
+ drivers/crypto/amcc/crypto4xx_alg.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/crypto/amcc/crypto4xx_alg.c
++++ b/drivers/crypto/amcc/crypto4xx_alg.c
+@@ -520,8 +520,7 @@ static int crypto4xx_compute_gcm_hash_ke
+ uint8_t src[16] = { 0 };
+ int rc = 0;
+
+- aes_tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC |
+- CRYPTO_ALG_NEED_FALLBACK);
++ aes_tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_NEED_FALLBACK);
+ if (IS_ERR(aes_tfm)) {
+ rc = PTR_ERR(aes_tfm);
+ pr_warn("could not load aes cipher driver: %d\n", rc);