aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/patches-5.4/042-crypto-qce-fix-xts-aes-qce-key-sizes.patch
diff options
context:
space:
mode:
authorRobert Marko <robert.marko@sartura.hr>2020-10-30 14:18:27 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-11-13 16:08:58 +0100
commit4f277b4da5238f0514ad48d7b98f9428f2b4b8a1 (patch)
tree6996a76c3ab005b50f24e159edaee0970fb1fec5 /target/linux/ipq40xx/patches-5.4/042-crypto-qce-fix-xts-aes-qce-key-sizes.patch
parenta8fb12a7d62c94fd1bbda332752e0f8c794f3702 (diff)
downloadupstream-4f277b4da5238f0514ad48d7b98f9428f2b4b8a1.tar.gz
upstream-4f277b4da5238f0514ad48d7b98f9428f2b4b8a1.tar.bz2
upstream-4f277b4da5238f0514ad48d7b98f9428f2b4b8a1.zip
ipq40xx: 5.4: update and reorder patches
A lot of patches are outdated versions of upstreamed patches and drivers. So lets pull in the upstreamed patches and reorder remaining ones. This drops the unnecessary 721-dts-ipq4019-add-ethernet-essedma-node.patch which adds nodes for not yet in OpenWrt IPQESS driver. Signed-off-by: Robert Marko <robert.marko@sartura.hr> [do not touch 902-dts-ipq4019-ap-dk04.1.patch here] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ipq40xx/patches-5.4/042-crypto-qce-fix-xts-aes-qce-key-sizes.patch')
-rw-r--r--target/linux/ipq40xx/patches-5.4/042-crypto-qce-fix-xts-aes-qce-key-sizes.patch60
1 files changed, 0 insertions, 60 deletions
diff --git a/target/linux/ipq40xx/patches-5.4/042-crypto-qce-fix-xts-aes-qce-key-sizes.patch b/target/linux/ipq40xx/patches-5.4/042-crypto-qce-fix-xts-aes-qce-key-sizes.patch
deleted file mode 100644
index 4dcf1ac726..0000000000
--- a/target/linux/ipq40xx/patches-5.4/042-crypto-qce-fix-xts-aes-qce-key-sizes.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 7de4c2bd196f111e39cc60f6197654aff23ba2b4 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cotequeiroz@gmail.com>
-Date: Fri, 20 Dec 2019 16:02:14 -0300
-Subject: [PATCH 03/11] crypto: qce - fix xts-aes-qce key sizes
-
-XTS-mode uses two keys, so the keysizes should be doubled in
-skcipher_def, and halved when checking if it is AES-128/192/256.
-
-Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
-Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
----
- drivers/crypto/qce/skcipher.c | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
---- a/drivers/crypto/qce/skcipher.c
-+++ b/drivers/crypto/qce/skcipher.c
-@@ -154,12 +154,13 @@ static int qce_skcipher_setkey(struct cr
- {
- struct crypto_tfm *tfm = crypto_skcipher_tfm(ablk);
- struct qce_cipher_ctx *ctx = crypto_tfm_ctx(tfm);
-+ unsigned long flags = to_cipher_tmpl(ablk)->alg_flags;
- int ret;
-
- if (!key || !keylen)
- return -EINVAL;
-
-- switch (keylen) {
-+ switch (IS_XTS(flags) ? keylen >> 1 : keylen) {
- case AES_KEYSIZE_128:
- case AES_KEYSIZE_256:
- break;
-@@ -213,13 +214,15 @@ static int qce_skcipher_crypt(struct skc
- struct qce_cipher_ctx *ctx = crypto_skcipher_ctx(tfm);
- struct qce_cipher_reqctx *rctx = skcipher_request_ctx(req);
- struct qce_alg_template *tmpl = to_cipher_tmpl(tfm);
-+ int keylen;
- int ret;
-
- rctx->flags = tmpl->alg_flags;
- rctx->flags |= encrypt ? QCE_ENCRYPT : QCE_DECRYPT;
-+ keylen = IS_XTS(rctx->flags) ? ctx->enc_keylen >> 1 : ctx->enc_keylen;
-
-- if (IS_AES(rctx->flags) && ctx->enc_keylen != AES_KEYSIZE_128 &&
-- ctx->enc_keylen != AES_KEYSIZE_256) {
-+ if (IS_AES(rctx->flags) && keylen != AES_KEYSIZE_128 &&
-+ keylen != AES_KEYSIZE_256) {
- SYNC_SKCIPHER_REQUEST_ON_STACK(subreq, ctx->fallback);
-
- skcipher_request_set_sync_tfm(subreq, ctx->fallback);
-@@ -311,8 +314,8 @@ static const struct qce_skcipher_def skc
- .drv_name = "xts-aes-qce",
- .blocksize = AES_BLOCK_SIZE,
- .ivsize = AES_BLOCK_SIZE,
-- .min_keysize = AES_MIN_KEY_SIZE,
-- .max_keysize = AES_MAX_KEY_SIZE,
-+ .min_keysize = AES_MIN_KEY_SIZE * 2,
-+ .max_keysize = AES_MAX_KEY_SIZE * 2,
- },
- {
- .flags = QCE_ALG_DES | QCE_MODE_ECB,