Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-16 14:46:35 +0200
committerTakashi Iwai <tiwai@suse.de>2019-07-16 14:46:49 +0200
commit1c7364cfa51ec88ac2702dbce5e1970a87fa4395 (patch)
treea1745c0b79a73c119b1a74dfb2a0e2f298e8d3e4
parentcc1c336567f19ccd317f2febf20f44cec08096e1 (diff)
crypto: talitos - reduce max key size for SEC1 (bsc#1051510).
-rw-r--r--patches.fixes/crypto-talitos-reduce-max-key-size-for-SEC1.patch42
-rw-r--r--series.conf1
2 files changed, 43 insertions, 0 deletions
diff --git a/patches.fixes/crypto-talitos-reduce-max-key-size-for-SEC1.patch b/patches.fixes/crypto-talitos-reduce-max-key-size-for-SEC1.patch
new file mode 100644
index 0000000000..fa701ea6ae
--- /dev/null
+++ b/patches.fixes/crypto-talitos-reduce-max-key-size-for-SEC1.patch
@@ -0,0 +1,42 @@
+From b8fbdc2bc4e71b62646031d5df5f08aafe15d5ad Mon Sep 17 00:00:00 2001
+From: Christophe Leroy <christophe.leroy@c-s.fr>
+Date: Tue, 21 May 2019 13:34:09 +0000
+Subject: [PATCH] crypto: talitos - reduce max key size for SEC1
+Git-commit: b8fbdc2bc4e71b62646031d5df5f08aafe15d5ad
+Patch-mainline: v5.3-rc1
+References: bsc#1051510
+
+SEC1 doesn't support SHA384/512, so it doesn't require
+longer keys.
+
+This patch reduces the max key size when the driver
+is built for SEC1 only.
+
+Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
+Fixes: 03d2c5114c95 ("crypto: talitos - Extend max key length for SHA384/512-HMAC and AEAD")
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/crypto/talitos.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
+index 6f8bc6467706..6312f8d501b1 100644
+--- a/drivers/crypto/talitos.c
++++ b/drivers/crypto/talitos.c
+@@ -837,7 +837,11 @@ static void talitos_unregister_rng(struct device *dev)
+ * HMAC_SNOOP_NO_AFEA (HSNA) instead of type IPSEC_ESP
+ */
+ #define TALITOS_CRA_PRIORITY_AEAD_HSNA (TALITOS_CRA_PRIORITY - 1)
++#ifdef CONFIG_CRYPTO_DEV_TALITOS_SEC2
+ #define TALITOS_MAX_KEY_SIZE (AES_MAX_KEY_SIZE + SHA512_BLOCK_SIZE)
++#else
++#define TALITOS_MAX_KEY_SIZE (AES_MAX_KEY_SIZE + SHA256_BLOCK_SIZE)
++#endif
+ #define TALITOS_MAX_IV_LENGTH 16 /* max of AES_BLOCK_SIZE, DES3_EDE_BLOCK_SIZE */
+
+ struct talitos_ctx {
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 4097d95c6c..5996de7091 100644
--- a/series.conf
+++ b/series.conf
@@ -22816,6 +22816,7 @@
patches.fixes/crypto-ccp-fix-AES-CFB-error-exposed-by-new-test-vec.patch
patches.fixes/crypto-ccp-Fix-3DES-complaint-from-ccp-crypto-module.patch
patches.fixes/crypto-talitos-rename-alternative-AEAD-algos.patch
+ patches.fixes/crypto-talitos-reduce-max-key-size-for-SEC1.patch
patches.fixes/lib-scatterlist-Fix-mapping-iterator-when-sg-offset-.patch
patches.drivers/pwm-stm32-Use-3-cells-of_xlate.patch
patches.drivers/gpio-omap-fix-lack-of-irqstatus_raw0-for-OMAP4.patch