History

IMA: fix measuring asymmetric keys Kconfig

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

Lakshmi Ramasubramanian committed 6 years ago

Commit ea789791 parent f47825c3 files · +9 −3Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/ima.h+2−2
@@ -101,7 +101,7 @@ static inline void ima_add_kexec_buffer(struct kimage *image) · 100 unmodified lines
101{}101{}
102#endif102#endif
103 103
104#if defined(CONFIG_IMA) && defined(CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE)104#ifdef CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS
105extern void ima_post_key_create_or_update(struct key *keyring,105extern void ima_post_key_create_or_update(struct key *keyring,
106 struct key *key,106 struct key *key,
107 const void *payload, size_t plen,107 const void *payload, size_t plen,
@@ -113,7 +113,7 @@ static inline void ima_post_key_create_or_update(struct key *keyring, · 5 unmodified lines
113 size_t plen,113 size_t plen,
114 unsigned long flags,114 unsigned long flags,
115 bool create) {}115 bool create) {}
116#endif /* CONFIG_IMA && CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE */116#endif /* CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS */
117 117
118#ifdef CONFIG_IMA_APPRAISE118#ifdef CONFIG_IMA_APPRAISE
119extern bool is_ima_appraise_enabled(void);119extern bool is_ima_appraise_enabled(void);