From 44cfa01c22ce8df1544658bcf3db3e382d6660e2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 26 Jul 2023 06:46:59 +0200 Subject: [PATCH] drop some unneeded crypto patches from 5.4 --- ...kcipher-remove-crypto_has_ablkcipher.patch | 88 ------------------- ...unify-the-crypto_has_skcipher-functi.patch | 84 ------------------ queue-5.4/series | 2 - 3 files changed, 174 deletions(-) delete mode 100644 queue-5.4/crypto-skcipher-remove-crypto_has_ablkcipher.patch delete mode 100644 queue-5.4/crypto-skcipher-unify-the-crypto_has_skcipher-functi.patch diff --git a/queue-5.4/crypto-skcipher-remove-crypto_has_ablkcipher.patch b/queue-5.4/crypto-skcipher-remove-crypto_has_ablkcipher.patch deleted file mode 100644 index c6238a04842..00000000000 --- a/queue-5.4/crypto-skcipher-remove-crypto_has_ablkcipher.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 977d524b86005c307a4d0ed46d890c93102e12b7 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 25 Oct 2019 12:41:10 -0700 -Subject: crypto: skcipher - remove crypto_has_ablkcipher() - -From: Eric Biggers - -[ Upstream commit cec0cb8a28f9060367099beeafd0dbdb76fdfae2 ] - -crypto_has_ablkcipher() has no users, and it does the same thing as -crypto_has_skcipher() anyway. So remove it. This also removes the last -user of crypto_skcipher_type() and crypto_skcipher_mask(), so remove -those too. - -Signed-off-by: Eric Biggers -Signed-off-by: Herbert Xu -Stable-dep-of: efbc7764c444 ("crypto: marvell/cesa - Fix type mismatch warning") -Signed-off-by: Sasha Levin ---- - Documentation/crypto/api-skcipher.rst | 2 +- - include/linux/crypto.h | 31 --------------------------- - 2 files changed, 1 insertion(+), 32 deletions(-) - -diff --git a/Documentation/crypto/api-skcipher.rst b/Documentation/crypto/api-skcipher.rst -index 20ba08dddf2ec..55e0851f6fed9 100644 ---- a/Documentation/crypto/api-skcipher.rst -+++ b/Documentation/crypto/api-skcipher.rst -@@ -41,7 +41,7 @@ Asynchronous Block Cipher API - Deprecated - :doc: Asynchronous Block Cipher API - - .. kernel-doc:: include/linux/crypto.h -- :functions: crypto_free_ablkcipher crypto_has_ablkcipher crypto_ablkcipher_ivsize crypto_ablkcipher_blocksize crypto_ablkcipher_setkey crypto_ablkcipher_reqtfm crypto_ablkcipher_encrypt crypto_ablkcipher_decrypt -+ :functions: crypto_free_ablkcipher crypto_ablkcipher_ivsize crypto_ablkcipher_blocksize crypto_ablkcipher_setkey crypto_ablkcipher_reqtfm crypto_ablkcipher_encrypt crypto_ablkcipher_decrypt - - Asynchronous Cipher Request Handle - Deprecated - ----------------------------------------------- -diff --git a/include/linux/crypto.h b/include/linux/crypto.h -index 0c720a2982ae4..019ddf7596534 100644 ---- a/include/linux/crypto.h -+++ b/include/linux/crypto.h -@@ -903,20 +903,6 @@ static inline struct crypto_ablkcipher *__crypto_ablkcipher_cast( - return (struct crypto_ablkcipher *)tfm; - } - --static inline u32 crypto_skcipher_type(u32 type) --{ -- type &= ~CRYPTO_ALG_TYPE_MASK; -- type |= CRYPTO_ALG_TYPE_BLKCIPHER; -- return type; --} -- --static inline u32 crypto_skcipher_mask(u32 mask) --{ -- mask &= ~CRYPTO_ALG_TYPE_MASK; -- mask |= CRYPTO_ALG_TYPE_BLKCIPHER_MASK; -- return mask; --} -- - /** - * DOC: Asynchronous Block Cipher API - * -@@ -962,23 +948,6 @@ static inline void crypto_free_ablkcipher(struct crypto_ablkcipher *tfm) - crypto_free_tfm(crypto_ablkcipher_tfm(tfm)); - } - --/** -- * crypto_has_ablkcipher() - Search for the availability of an ablkcipher. -- * @alg_name: is the cra_name / name or cra_driver_name / driver name of the -- * ablkcipher -- * @type: specifies the type of the cipher -- * @mask: specifies the mask for the cipher -- * -- * Return: true when the ablkcipher is known to the kernel crypto API; false -- * otherwise -- */ --static inline int crypto_has_ablkcipher(const char *alg_name, u32 type, -- u32 mask) --{ -- return crypto_has_alg(alg_name, crypto_skcipher_type(type), -- crypto_skcipher_mask(mask)); --} -- - static inline struct ablkcipher_tfm *crypto_ablkcipher_crt( - struct crypto_ablkcipher *tfm) - { --- -2.39.2 - diff --git a/queue-5.4/crypto-skcipher-unify-the-crypto_has_skcipher-functi.patch b/queue-5.4/crypto-skcipher-unify-the-crypto_has_skcipher-functi.patch deleted file mode 100644 index d0090e0c195..00000000000 --- a/queue-5.4/crypto-skcipher-unify-the-crypto_has_skcipher-functi.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 250ed9f7489ea73ea7422f38c4e4f648af200125 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 25 Oct 2019 12:41:09 -0700 -Subject: crypto: skcipher - unify the crypto_has_skcipher*() functions - -From: Eric Biggers - -[ Upstream commit d3ca75a8b3d77f2788e6c119ea7c3e3a1ab1e1ca ] - -crypto_has_skcipher() and crypto_has_skcipher2() do the same thing: they -check for the availability of an algorithm of type skcipher, blkcipher, -or ablkcipher, which also meets any non-type constraints the caller -specified. And they have exactly the same prototype. - -Therefore, eliminate the redundancy by removing crypto_has_skcipher() -and renaming crypto_has_skcipher2() to crypto_has_skcipher(). - -Signed-off-by: Eric Biggers -Signed-off-by: Herbert Xu -Stable-dep-of: efbc7764c444 ("crypto: marvell/cesa - Fix type mismatch warning") -Signed-off-by: Sasha Levin ---- - crypto/skcipher.c | 4 ++-- - include/crypto/skcipher.h | 19 +------------------ - 2 files changed, 3 insertions(+), 20 deletions(-) - -diff --git a/crypto/skcipher.c b/crypto/skcipher.c -index 22753c1c72022..233678d078169 100644 ---- a/crypto/skcipher.c -+++ b/crypto/skcipher.c -@@ -1017,12 +1017,12 @@ struct crypto_sync_skcipher *crypto_alloc_sync_skcipher( - } - EXPORT_SYMBOL_GPL(crypto_alloc_sync_skcipher); - --int crypto_has_skcipher2(const char *alg_name, u32 type, u32 mask) -+int crypto_has_skcipher(const char *alg_name, u32 type, u32 mask) - { - return crypto_type_has_alg(alg_name, &crypto_skcipher_type2, - type, mask); - } --EXPORT_SYMBOL_GPL(crypto_has_skcipher2); -+EXPORT_SYMBOL_GPL(crypto_has_skcipher); - - static int skcipher_prepare_alg(struct skcipher_alg *alg) - { -diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h -index 0bce6005d325d..6514e32e7c2fd 100644 ---- a/include/crypto/skcipher.h -+++ b/include/crypto/skcipher.h -@@ -220,30 +220,13 @@ static inline void crypto_free_sync_skcipher(struct crypto_sync_skcipher *tfm) - * crypto_has_skcipher() - Search for the availability of an skcipher. - * @alg_name: is the cra_name / name or cra_driver_name / driver name of the - * skcipher -- * @type: specifies the type of the cipher -- * @mask: specifies the mask for the cipher -- * -- * Return: true when the skcipher is known to the kernel crypto API; false -- * otherwise -- */ --static inline int crypto_has_skcipher(const char *alg_name, u32 type, -- u32 mask) --{ -- return crypto_has_alg(alg_name, crypto_skcipher_type(type), -- crypto_skcipher_mask(mask)); --} -- --/** -- * crypto_has_skcipher2() - Search for the availability of an skcipher. -- * @alg_name: is the cra_name / name or cra_driver_name / driver name of the -- * skcipher - * @type: specifies the type of the skcipher - * @mask: specifies the mask for the skcipher - * - * Return: true when the skcipher is known to the kernel crypto API; false - * otherwise - */ --int crypto_has_skcipher2(const char *alg_name, u32 type, u32 mask); -+int crypto_has_skcipher(const char *alg_name, u32 type, u32 mask); - - static inline const char *crypto_skcipher_driver_name( - struct crypto_skcipher *tfm) --- -2.39.2 - diff --git a/queue-5.4/series b/queue-5.4/series index f2fbf95ae38..dd7c4f2a847 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -110,8 +110,6 @@ hwrng-virtio-fix-race-on-data_avail-and-actual-data.patch crypto-nx-fix-build-warnings-when-debug_fs-is-not-en.patch modpost-fix-section-mismatch-message-for-r_arm_abs32.patch modpost-fix-section-mismatch-message-for-r_arm_-pc24.patch -crypto-skcipher-unify-the-crypto_has_skcipher-functi.patch -crypto-skcipher-remove-crypto_has_ablkcipher.patch crypto-marvell-cesa-fix-type-mismatch-warning.patch modpost-fix-off-by-one-in-is_executable_section.patch arc-define-asm_nl-and-__align-_str-outside-ifdef-__a.patch -- 2.47.3