Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
filesystems
lustre_2_12
0009-LU-13344-libcfs-adler32-don-t-set-CRYPTO_T...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0009-LU-13344-libcfs-adler32-don-t-set-CRYPTO_TFM_RES_BAD.patch of Package lustre_2_12
From 684e98e54793b503a56fae9b08048c78dd018d5a Mon Sep 17 00:00:00 2001 From: Mr NeilBrown <neilb@suse.de> Date: Tue, 10 Mar 2020 16:34:41 -0400 Subject: [PATCH 09/35] LU-13344 libcfs: adler32: don't set CRYPTO_TFM_RES_BAD_KEY_LEN This flag was not being checked by most callers and has been removed since Commit 674f368a952c ("crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN") so remove from lustre too. Change-Id: Ia616430a98d05c7bb3b22a0be543e83855272d2f Test-Parameters: trivial Signed-off-by: Mr NeilBrown <neilb@suse.de> Reviewed-on: https://review.whamcloud.com/37870 Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com> Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Sebastien Buisson <sbuisson@ddn.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> --- libcfs/libcfs/linux/linux-crypto-adler.c | 5 ++--- libcfs/libcfs/linux/linux-crypto-crc32.c | 4 +--- libcfs/libcfs/linux/linux-crypto-crc32c-pclmul.c | 4 +--- libcfs/libcfs/linux/linux-crypto-crc32pclmul.c | 4 +--- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/libcfs/libcfs/linux/linux-crypto-adler.c b/libcfs/libcfs/linux/linux-crypto-adler.c index 21718170166c..7a19a5803ee8 100644 --- a/libcfs/libcfs/linux/linux-crypto-adler.c +++ b/libcfs/libcfs/linux/linux-crypto-adler.c @@ -51,10 +51,9 @@ static int adler32_setkey(struct crypto_shash *hash, const u8 *key, { u32 *mctx = crypto_shash_ctx(hash); - if (keylen != sizeof(u32)) { - crypto_shash_set_flags(hash, CRYPTO_TFM_RES_BAD_KEY_LEN); + if (keylen != sizeof(u32)) return -EINVAL; - } + *mctx = *(u32 *)key; return 0; } diff --git a/libcfs/libcfs/linux/linux-crypto-crc32.c b/libcfs/libcfs/linux/linux-crypto-crc32.c index 9af855d45c75..ff822e5658af 100644 --- a/libcfs/libcfs/linux/linux-crypto-crc32.c +++ b/libcfs/libcfs/linux/linux-crypto-crc32.c @@ -63,10 +63,8 @@ static int crc32_setkey(struct crypto_shash *hash, const u8 *key, { u32 *mctx = crypto_shash_ctx(hash); - if (keylen != sizeof(u32)) { - crypto_shash_set_flags(hash, CRYPTO_TFM_RES_BAD_KEY_LEN); + if (keylen != sizeof(u32)) return -EINVAL; - } *mctx = le32_to_cpup((__le32 *)key); return 0; } diff --git a/libcfs/libcfs/linux/linux-crypto-crc32c-pclmul.c b/libcfs/libcfs/linux/linux-crypto-crc32c-pclmul.c index da3792318bc2..10b49c2c3145 100644 --- a/libcfs/libcfs/linux/linux-crypto-crc32c-pclmul.c +++ b/libcfs/libcfs/linux/linux-crypto-crc32c-pclmul.c @@ -61,10 +61,8 @@ static int crc32c_pclmul_setkey(struct crypto_shash *hash, const u8 *key, { u32 *mctx = crypto_shash_ctx(hash); - if (keylen != sizeof(u32)) { - crypto_shash_set_flags(hash, CRYPTO_TFM_RES_BAD_KEY_LEN); + if (keylen != sizeof(u32)) return -EINVAL; - } *mctx = le32_to_cpup((__le32 *)key); return 0; } diff --git a/libcfs/libcfs/linux/linux-crypto-crc32pclmul.c b/libcfs/libcfs/linux/linux-crypto-crc32pclmul.c index 47f0f98ae115..1f9fda766314 100644 --- a/libcfs/libcfs/linux/linux-crypto-crc32pclmul.c +++ b/libcfs/libcfs/linux/linux-crypto-crc32pclmul.c @@ -100,10 +100,8 @@ static int crc32_pclmul_setkey(struct crypto_shash *hash, const u8 *key, { u32 *mctx = crypto_shash_ctx(hash); - if (keylen != sizeof(u32)) { - crypto_shash_set_flags(hash, CRYPTO_TFM_RES_BAD_KEY_LEN); + if (keylen != sizeof(u32)) return -EINVAL; - } *mctx = le32_to_cpup((__le32 *)key); return 0; } -- 2.41.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor