Skip to contentSkip to conversation

crypto: asymmetric_keys - Remove unused key_being_used_for[]

PATCH In review [email protected] 3 participants 3 messages Jan 12, 2025 – Jan 20, 2025

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

PATCH 1/1 crypto: asymmetric_keys - Remove unused key_being_used_for[]

From: "Dr. David Alan Gilbert" <[email protected]>

key_being_used_for[] is an unused array of textual names for the elements of the enum key_being_used_for. It was added in 2015 by commit 99db44350672 ("PKCS#7: Appropriately restrict authenticated attributes and content type")

Remove it.

---
 crypto/asymmetric_keys/asymmetric_type.c | 10 ----------
 include/linux/verification.h             |  2 --
 2 files changed, 12 deletions(-)
crypto/asymmetric_keys/asymmetric_type.c +0 -10
index 43af5fa510c0..ba2d9d1ea235 100644
@@ -18,16 +18,6 @@
 #include "asymmetric_keys.h"
 
 
-const char *const key_being_used_for[NR__KEY_BEING_USED_FOR] = {
-	[VERIFYING_MODULE_SIGNATURE]		= "mod sig",
-	[VERIFYING_FIRMWARE_SIGNATURE]		= "firmware sig",
-	[VERIFYING_KEXEC_PE_SIGNATURE]		= "kexec PE sig",
-	[VERIFYING_KEY_SIGNATURE]		= "key sig",
-	[VERIFYING_KEY_SELF_SIGNATURE]		= "key self sig",
-	[VERIFYING_UNSPECIFIED_SIGNATURE]	= "unspec sig",
-};
-EXPORT_SYMBOL_GPL(key_being_used_for);
-
 static LIST_HEAD(asymmetric_key_parsers);
 static DECLARE_RWSEM(asymmetric_key_parsers_sem);
 
include/linux/verification.h +0 -2
index cb2d47f28091..4f3022d081c3 100644
@@ -38,8 +38,6 @@ enum key_being_used_for {
 	VERIFYING_UNSPECIFIED_SIGNATURE,
 	NR__KEY_BEING_USED_FOR
 };
-extern const char *const key_being_used_for[NR__KEY_BEING_USED_FOR];
-
 #ifdef CONFIG_SYSTEM_DATA_VERIFICATION
 
 struct key;
Signature · 1 line
2.47.1
maintainer
#1 lore raw
Quoted 7 lines · On Sun, Jan 12, 2025 at 04:30:59PM +0000, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

key_being_used_for[] is an unused array of textual names for the elements of the enum key_being_used_for. It was added in 2015 by commit 99db44350672 ("PKCS#7: Appropriately restrict authenticated attributes and content type")

Quoted 7 lines

Remove it.

---
 crypto/asymmetric_keys/asymmetric_type.c | 10 ----------
 include/linux/verification.h             |  2 --
 2 files changed, 12 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt