aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@ncentric.com>2019-07-29 17:54:16 +0200
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2019-07-31 16:51:46 +0200
commitc7634180fc8104e2f770f2efbe77b5235514fd75 (patch)
tree28a18c68ae756496f132658b94d9445393738e4d /target/linux/apm821xx
parent1d45ed1477571d0dd3d7d39dd9b45d2a05c57a0a (diff)
downloadupstream-c7634180fc8104e2f770f2efbe77b5235514fd75.tar.gz
upstream-c7634180fc8104e2f770f2efbe77b5235514fd75.tar.bz2
upstream-c7634180fc8104e2f770f2efbe77b5235514fd75.zip
kernel: bump 4.19 to 4.19.62
Refreshed all patches. Remove upstreamed: - 023-0013-crypto-crypto4xx-fix-AES-CTR-blocksize-value.patch - 023-0014-crypto-crypto4xx-fix-blocksize-for-cfb-and-ofb.patch - 023-0015-crypto-crypto4xx-block-ciphers-should-only-accept-co.patch - 950-0252-staging-bcm2835_camera-Ensure-all-buffers-are-return.patch - 950-0253-staging-bcm2835-camera-Remove-check-of-the-number-of.patch - 950-0254-staging-bcm2835-camera-Handle-empty-EOS-buffers-whil.patch - 950-0489-staging-mmal-vchiq-Replace-spinlock-protecting-conte.patch - 0021-ARM-dts-gemini-Fix-up-DNS-313-compatible-string.patch - 049-v4.20-mips-remove-superfluous-check-for-linux.patch - 100-MIPS-fix-build-on-non-linux-hosts.patch - 303-MIPS-Fix-bounds-check-virt_addr_valid.patch - 0002-usb-dwc2-use-a-longer-AHB-idle-timeout-in-dwc2_core_.patch Altered patches: - 950-0267-staging-vc04_services-Split-vchiq-mmal-into-a-module.patch - 700-net-add-qualcomm-mdio-and-phy.patch Fixes: - CVE-2019-3846 New symbol: - AX88796B_PHY Compile-tested on: cns3xxx, imx6 Runtime-tested on: cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'target/linux/apm821xx')
-rw-r--r--target/linux/apm821xx/patches-4.19/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch2
-rw-r--r--target/linux/apm821xx/patches-4.19/023-0013-crypto-crypto4xx-fix-AES-CTR-blocksize-value.patch60
-rw-r--r--target/linux/apm821xx/patches-4.19/023-0014-crypto-crypto4xx-fix-blocksize-for-cfb-and-ofb.patch44
-rw-r--r--target/linux/apm821xx/patches-4.19/023-0015-crypto-crypto4xx-block-ciphers-should-only-accept-co.patch172
4 files changed, 1 insertions, 277 deletions
diff --git a/target/linux/apm821xx/patches-4.19/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch b/target/linux/apm821xx/patches-4.19/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch
index bb1f406476..36aeb33d59 100644
--- a/target/linux/apm821xx/patches-4.19/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch
+++ b/target/linux/apm821xx/patches-4.19/023-0003-crypto-drop-mask-CRYPTO_ALG_ASYNC-from-cipher-tfm-al.patch
@@ -22,7 +22,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
--- a/drivers/crypto/amcc/crypto4xx_alg.c
+++ b/drivers/crypto/amcc/crypto4xx_alg.c
-@@ -526,8 +526,7 @@ static int crypto4xx_compute_gcm_hash_ke
+@@ -540,8 +540,7 @@ static int crypto4xx_compute_gcm_hash_ke
uint8_t src[16] = { 0 };
int rc = 0;
diff --git a/target/linux/apm821xx/patches-4.19/023-0013-crypto-crypto4xx-fix-AES-CTR-blocksize-value.patch b/target/linux/apm821xx/patches-4.19/023-0013-crypto-crypto4xx-fix-AES-CTR-blocksize-value.patch
deleted file mode 100644
index a6fa84d962..0000000000
--- a/target/linux/apm821xx/patches-4.19/023-0013-crypto-crypto4xx-fix-AES-CTR-blocksize-value.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From bfa2ba7d9e6b20aca82b99e6842fe18842ae3a0f Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey@gmail.com>
-Date: Fri, 17 May 2019 23:15:57 +0200
-Subject: [PATCH 13/15] crypto: crypto4xx - fix AES CTR blocksize value
-
-This patch fixes a issue with crypto4xx's ctr(aes) that was
-discovered by libcapi's kcapi-enc-test.sh test.
-
-The some of the ctr(aes) encryptions test were failing on the
-non-power-of-two test:
-
-kcapi-enc - Error: encryption failed with error 0
-kcapi-enc - Error: decryption failed with error 0
-[FAILED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (128 bits):
-original file (1d100e..cc96184c) and generated file (e3b0c442..1b7852b855)
-[FAILED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (128 bits)
-(openssl generated CT): original file (e3b0..5) and generated file (3..8e)
-[PASSED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (128 bits)
-(openssl generated PT)
-[FAILED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (password):
-original file (1d1..84c) and generated file (e3b..852b855)
-
-But the 16, 32, 512, 65536 tests always worked.
-
-Thankfully, this isn't a hidden hardware problem like previously,
-instead this turned out to be a copy and paste issue.
-
-With this patch, all the tests are passing with and
-kcapi-enc-test.sh gives crypto4xx's a clean bill of health:
- "Number of failures: 0" :).
-
-Cc: stable@vger.kernel.org
-Fixes: 98e87e3d933b ("crypto: crypto4xx - add aes-ctr support")
-Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads")
-Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
-Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_core.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1257,7 +1257,7 @@ static struct crypto4xx_alg_common crypt
- .cra_flags = CRYPTO_ALG_NEED_FALLBACK |
- CRYPTO_ALG_ASYNC |
- CRYPTO_ALG_KERN_DRIVER_ONLY,
-- .cra_blocksize = AES_BLOCK_SIZE,
-+ .cra_blocksize = 1,
- .cra_ctxsize = sizeof(struct crypto4xx_ctx),
- .cra_module = THIS_MODULE,
- },
-@@ -1277,7 +1277,7 @@ static struct crypto4xx_alg_common crypt
- .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
- .cra_flags = CRYPTO_ALG_ASYNC |
- CRYPTO_ALG_KERN_DRIVER_ONLY,
-- .cra_blocksize = AES_BLOCK_SIZE,
-+ .cra_blocksize = 1,
- .cra_ctxsize = sizeof(struct crypto4xx_ctx),
- .cra_module = THIS_MODULE,
- },
diff --git a/target/linux/apm821xx/patches-4.19/023-0014-crypto-crypto4xx-fix-blocksize-for-cfb-and-ofb.patch b/target/linux/apm821xx/patches-4.19/023-0014-crypto-crypto4xx-fix-blocksize-for-cfb-and-ofb.patch
deleted file mode 100644
index 16f5af2c46..0000000000
--- a/target/linux/apm821xx/patches-4.19/023-0014-crypto-crypto4xx-fix-blocksize-for-cfb-and-ofb.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 70c4997f34b6c6888b3ac157adec49e01d0df2d5 Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey@gmail.com>
-Date: Sat, 18 May 2019 23:28:11 +0200
-Subject: [PATCH 14/15] crypto: crypto4xx - fix blocksize for cfb and ofb
-
-While the hardware consider them to be blockciphers, the
-reference implementation defines them as streamciphers.
-
-Do the right thing and set the blocksize to 1. This
-was found by CONFIG_CRYPTO_MANAGER_EXTRA_TESTS.
-
-This fixes the following issues:
-skcipher: blocksize for ofb-aes-ppc4xx (16) doesn't match generic impl (1)
-skcipher: blocksize for cfb-aes-ppc4xx (16) doesn't match generic impl (1)
-
-Cc: Eric Biggers <ebiggers@kernel.org>
-Cc: stable@vger.kernel.org
-Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads")
-Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
-Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_core.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1236,7 +1236,7 @@ static struct crypto4xx_alg_common crypt
- .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
- .cra_flags = CRYPTO_ALG_ASYNC |
- CRYPTO_ALG_KERN_DRIVER_ONLY,
-- .cra_blocksize = AES_BLOCK_SIZE,
-+ .cra_blocksize = 1,
- .cra_ctxsize = sizeof(struct crypto4xx_ctx),
- .cra_module = THIS_MODULE,
- },
-@@ -1316,7 +1316,7 @@ static struct crypto4xx_alg_common crypt
- .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
- .cra_flags = CRYPTO_ALG_ASYNC |
- CRYPTO_ALG_KERN_DRIVER_ONLY,
-- .cra_blocksize = AES_BLOCK_SIZE,
-+ .cra_blocksize = 1,
- .cra_ctxsize = sizeof(struct crypto4xx_ctx),
- .cra_module = THIS_MODULE,
- },
diff --git a/target/linux/apm821xx/patches-4.19/023-0015-crypto-crypto4xx-block-ciphers-should-only-accept-co.patch b/target/linux/apm821xx/patches-4.19/023-0015-crypto-crypto4xx-block-ciphers-should-only-accept-co.patch
deleted file mode 100644
index 2706042f67..0000000000
--- a/target/linux/apm821xx/patches-4.19/023-0015-crypto-crypto4xx-block-ciphers-should-only-accept-co.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From 0f7a81374060828280fcfdfbaa162cb559017f9f Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey@gmail.com>
-Date: Sat, 18 May 2019 23:28:12 +0200
-Subject: [PATCH 15/15] crypto: crypto4xx - block ciphers should only accept
- complete blocks
-
-The hardware automatically zero pads incomplete block ciphers
-blocks without raising any errors. This is a screw-up. This
-was noticed by CONFIG_CRYPTO_MANAGER_EXTRA_TESTS tests that
-sent a incomplete blocks and expect them to fail.
-
-This fixes:
-cbc-aes-ppc4xx encryption unexpectedly succeeded on test vector
-"random: len=2409 klen=32"; expected_error=-22, cfg="random:
-may_sleep use_digest src_divs=[96.90%@+2295, 2.34%@+4066,
-0.32%@alignmask+12, 0.34%@+4087, 0.9%@alignmask+1787, 0.1%@+3767]
-iv_offset=6"
-
-ecb-aes-ppc4xx encryption unexpectedly succeeded on test vector
-"random: len=1011 klen=32"; expected_error=-22, cfg="random:
-may_sleep use_digest src_divs=[100.0%@alignmask+20]
-dst_divs=[3.12%@+3001, 96.88%@+4070]"
-
-Cc: Eric Biggers <ebiggers@kernel.org>
-Cc: stable@vger.kernel.org [4.19, 5.0 and 5.1]
-Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
-Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_alg.c | 36 +++++++++++++++++++---------
- drivers/crypto/amcc/crypto4xx_core.c | 16 ++++++-------
- drivers/crypto/amcc/crypto4xx_core.h | 10 ++++----
- 3 files changed, 39 insertions(+), 23 deletions(-)
-
---- a/drivers/crypto/amcc/crypto4xx_alg.c
-+++ b/drivers/crypto/amcc/crypto4xx_alg.c
-@@ -76,12 +76,16 @@ static void set_dynamic_sa_command_1(str
- }
-
- static inline int crypto4xx_crypt(struct skcipher_request *req,
-- const unsigned int ivlen, bool decrypt)
-+ const unsigned int ivlen, bool decrypt,
-+ bool check_blocksize)
- {
- struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req);
- struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher);
- __le32 iv[AES_IV_SIZE];
-
-+ if (check_blocksize && !IS_ALIGNED(req->cryptlen, AES_BLOCK_SIZE))
-+ return -EINVAL;
-+
- if (ivlen)
- crypto4xx_memcpy_to_le32(iv, req->iv, ivlen);
-
-@@ -90,24 +94,34 @@ static inline int crypto4xx_crypt(struct
- ctx->sa_len, 0, NULL);
- }
-
--int crypto4xx_encrypt_noiv(struct skcipher_request *req)
-+int crypto4xx_encrypt_noiv_block(struct skcipher_request *req)
-+{
-+ return crypto4xx_crypt(req, 0, false, true);
-+}
-+
-+int crypto4xx_encrypt_iv_stream(struct skcipher_request *req)
-+{
-+ return crypto4xx_crypt(req, AES_IV_SIZE, false, false);
-+}
-+
-+int crypto4xx_decrypt_noiv_block(struct skcipher_request *req)
- {
-- return crypto4xx_crypt(req, 0, false);
-+ return crypto4xx_crypt(req, 0, true, true);
- }
-
--int crypto4xx_encrypt_iv(struct skcipher_request *req)
-+int crypto4xx_decrypt_iv_stream(struct skcipher_request *req)
- {
-- return crypto4xx_crypt(req, AES_IV_SIZE, false);
-+ return crypto4xx_crypt(req, AES_IV_SIZE, true, false);
- }
-
--int crypto4xx_decrypt_noiv(struct skcipher_request *req)
-+int crypto4xx_encrypt_iv_block(struct skcipher_request *req)
- {
-- return crypto4xx_crypt(req, 0, true);
-+ return crypto4xx_crypt(req, AES_IV_SIZE, false, true);
- }
-
--int crypto4xx_decrypt_iv(struct skcipher_request *req)
-+int crypto4xx_decrypt_iv_block(struct skcipher_request *req)
- {
-- return crypto4xx_crypt(req, AES_IV_SIZE, true);
-+ return crypto4xx_crypt(req, AES_IV_SIZE, true, true);
- }
-
- /**
-@@ -278,8 +292,8 @@ crypto4xx_ctr_crypt(struct skcipher_requ
- return ret;
- }
-
-- return encrypt ? crypto4xx_encrypt_iv(req)
-- : crypto4xx_decrypt_iv(req);
-+ return encrypt ? crypto4xx_encrypt_iv_stream(req)
-+ : crypto4xx_decrypt_iv_stream(req);
- }
-
- static int crypto4xx_sk_setup_fallback(struct crypto4xx_ctx *ctx,
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1224,8 +1224,8 @@ static struct crypto4xx_alg_common crypt
- .max_keysize = AES_MAX_KEY_SIZE,
- .ivsize = AES_IV_SIZE,
- .setkey = crypto4xx_setkey_aes_cbc,
-- .encrypt = crypto4xx_encrypt_iv,
-- .decrypt = crypto4xx_decrypt_iv,
-+ .encrypt = crypto4xx_encrypt_iv_block,
-+ .decrypt = crypto4xx_decrypt_iv_block,
- .init = crypto4xx_sk_init,
- .exit = crypto4xx_sk_exit,
- } },
-@@ -1244,8 +1244,8 @@ static struct crypto4xx_alg_common crypt
- .max_keysize = AES_MAX_KEY_SIZE,
- .ivsize = AES_IV_SIZE,
- .setkey = crypto4xx_setkey_aes_cfb,
-- .encrypt = crypto4xx_encrypt_iv,
-- .decrypt = crypto4xx_decrypt_iv,
-+ .encrypt = crypto4xx_encrypt_iv_stream,
-+ .decrypt = crypto4xx_decrypt_iv_stream,
- .init = crypto4xx_sk_init,
- .exit = crypto4xx_sk_exit,
- } },
-@@ -1304,8 +1304,8 @@ static struct crypto4xx_alg_common crypt
- .min_keysize = AES_MIN_KEY_SIZE,
- .max_keysize = AES_MAX_KEY_SIZE,
- .setkey = crypto4xx_setkey_aes_ecb,
-- .encrypt = crypto4xx_encrypt_noiv,
-- .decrypt = crypto4xx_decrypt_noiv,
-+ .encrypt = crypto4xx_encrypt_noiv_block,
-+ .decrypt = crypto4xx_decrypt_noiv_block,
- .init = crypto4xx_sk_init,
- .exit = crypto4xx_sk_exit,
- } },
-@@ -1324,8 +1324,8 @@ static struct crypto4xx_alg_common crypt
- .max_keysize = AES_MAX_KEY_SIZE,
- .ivsize = AES_IV_SIZE,
- .setkey = crypto4xx_setkey_aes_ofb,
-- .encrypt = crypto4xx_encrypt_iv,
-- .decrypt = crypto4xx_decrypt_iv,
-+ .encrypt = crypto4xx_encrypt_iv_stream,
-+ .decrypt = crypto4xx_decrypt_iv_stream,
- .init = crypto4xx_sk_init,
- .exit = crypto4xx_sk_exit,
- } },
---- a/drivers/crypto/amcc/crypto4xx_core.h
-+++ b/drivers/crypto/amcc/crypto4xx_core.h
-@@ -182,10 +182,12 @@ int crypto4xx_setkey_rfc3686(struct cryp
- const u8 *key, unsigned int keylen);
- int crypto4xx_encrypt_ctr(struct skcipher_request *req);
- int crypto4xx_decrypt_ctr(struct skcipher_request *req);
--int crypto4xx_encrypt_iv(struct skcipher_request *req);
--int crypto4xx_decrypt_iv(struct skcipher_request *req);
--int crypto4xx_encrypt_noiv(struct skcipher_request *req);
--int crypto4xx_decrypt_noiv(struct skcipher_request *req);
-+int crypto4xx_encrypt_iv_stream(struct skcipher_request *req);
-+int crypto4xx_decrypt_iv_stream(struct skcipher_request *req);
-+int crypto4xx_encrypt_iv_block(struct skcipher_request *req);
-+int crypto4xx_decrypt_iv_block(struct skcipher_request *req);
-+int crypto4xx_encrypt_noiv_block(struct skcipher_request *req);
-+int crypto4xx_decrypt_noiv_block(struct skcipher_request *req);
- int crypto4xx_rfc3686_encrypt(struct skcipher_request *req);
- int crypto4xx_rfc3686_decrypt(struct skcipher_request *req);
- int crypto4xx_sha1_alg_init(struct crypto_tfm *tfm);