Skip to contentSkip to conversation

IMA: fix measuring early boot asymmetric keys

PATCH In review Lakshmi Ramasubramanian 2 participants 2 messages Jan 9, 2020

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

PATCH 1/1 IMA: fix measuring early boot asymmetric keys

As a result of the asymmetric public keys subtype being defined as a tristate, with the existing IMA Makefile, ima_asymmetric_keys.c could be built as a kernel module. To prevent this from happening, an intermediate Kconfig boolean option named IMA_MEASURE_ASYMMETRIC_KEYS has been defined.

This patch uses this new config CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS to declare the early boot key measurement functions.

ima_init_key_queue() function.

Fixes e164a1695a57 ("IMA: Define workqueue for early boot key measurements")
Fixes 1df595b4e120 ("IMA: Defined timer to free queued keys")
---
 security/integrity/ima/ima.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
security/integrity/ima/ima.h +2 -2
index c483215a9ee5..6bb3152b3e24 100644
@@ -205,7 +205,7 @@ extern const char *const func_tokens[];
 
 struct modsig;
 
-#ifdef CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
+#ifdef CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS
 /*
  * To track keys that need to be measured.
  */
@@ -220,7 +220,7 @@ void ima_init_key_queue(void);
 #else
 static inline void ima_process_queued_keys(void) {}
 static inline void ima_init_key_queue(void) {}
-#endif /* CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE */
+#endif /* CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS */
 
 /* LIM API function definitions */
 int ima_get_action(struct inode *inode, const struct cred *cred, u32 secid,
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 2 lines · Lakshmi Ramasubramanian

This patch uses this new config CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS to declare the early boot key measurement functions.

Thanks!  I've squashed this patch with "4217fbe396c4 IMA: Define workqueue for early boot key measurements".

Mimi