Skip to contentSkip to conversation

evm: Clean up some variables

PATCH In review Stefan Berger 2 participants 4 messages May 13, 2022 – May 16, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 evm: Clean up some variables

Make hmac_tfm static since it's not used anywhere else besides the file it is in.

Remove declaration of hash_tfm since it doesn't exist.

---
 security/integrity/evm/evm.h        | 3 ---
 security/integrity/evm/evm_crypto.c | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)
security/integrity/evm/evm.h +0 -3
index 0d44f41d16f8..f8b8c5004fc7 100644
@@ -38,9 +38,6 @@ extern int evm_initialized;
 
 extern int evm_hmac_attrs;
 
-extern struct crypto_shash *hmac_tfm;
-extern struct crypto_shash *hash_tfm;
-
 /* List of EVM protected security xattrs */
 extern struct list_head evm_config_xattrnames;
 
security/integrity/evm/evm_crypto.c +1 -1
index 0450d79afdc8..a733aff02006 100644
@@ -26,7 +26,7 @@
 static unsigned char evmkey[MAX_KEY_SIZE];
 static const int evmkey_len = MAX_KEY_SIZE;
 
-struct crypto_shash *hmac_tfm;
+static struct crypto_shash *hmac_tfm;
 static struct crypto_shash *evm_tfm[HASH_ALGO__LAST];
 
 static DEFINE_MUTEX(mutex);
Signature · 1 line
2.35.1
maintainer
#1 lore raw
Quoted 6 lines · Stefan Berger

Make hmac_tfm static since it's not used anywhere else besides the file it is in.

Remove declaration of hash_tfm since it doesn't exist.

Thanks, Stefan. Both this patch and "evm: Return INTEGRITY_PASS for
enum integrity_status value '0'" are now queued in next-integrity.

Mimi

#2 lore raw
Quoted 4 lines · Mimi Zohar
Quoted 3 lines · Stefan Berger

Make hmac_tfm static since it's not used anywhere else besides the file it is in.

Quoted 9 lines
Quoted 3 lines

Remove declaration of hash_tfm since it doesn't exist.

Thanks, Stefan. Both this patch and "evm: Return INTEGRITY_PASS for
enum integrity_status value '0'" are now queued in next-integrity.

Mimi

There's also this one here:

https://lore.kernel.org/all/[email protected]/

maintainer
#3 lore raw
Quoted 13 lines · Stefan Berger
Quoted 11 lines · Mimi Zohar
Quoted 6 lines · Stefan Berger

Make hmac_tfm static since it's not used anywhere else besides the file it is in.

Remove declaration of hash_tfm since it doesn't exist.

Thanks, Stefan. Both this patch and "evm: Return INTEGRITY_PASS for
enum integrity_status value '0'" are now queued in next-integrity.

Quoted 6 lines
Quoted 2 lines

Mimi

There's also this one here:

https://lore.kernel.org/all/[email protected]/

Thanks for the reminder. It's now queued in next-integrity.

Mimi