linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IMA: fix measuring early boot asymmetric keys
@ 2020-01-09 17:50 Lakshmi Ramasubramanian
  2020-01-09 19:38 ` Mimi Zohar
  0 siblings, 1 reply; 2+ messages in thread
From: Lakshmi Ramasubramanian @ 2020-01-09 17:50 UTC (permalink / raw)
  To: zohar, James.Bottomley, linux-integrity
  Cc: dhowells, arnd, matthewgarrett, sashal, linux-kernel, keyrings

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.

Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Reported-by: kbuild test robot <lkp@intel.com> # redefinition of
ima_init_key_queue() function.
Suggested-by: James.Bottomley <James.Bottomley@HansenPartnership.com>
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(-)

diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
index c483215a9ee5..6bb3152b3e24 100644
--- a/security/integrity/ima/ima.h
+++ b/security/integrity/ima/ima.h
@@ -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,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] IMA: fix measuring early boot asymmetric keys
  2020-01-09 17:50 [PATCH] IMA: fix measuring early boot asymmetric keys Lakshmi Ramasubramanian
@ 2020-01-09 19:38 ` Mimi Zohar
  0 siblings, 0 replies; 2+ messages in thread
From: Mimi Zohar @ 2020-01-09 19:38 UTC (permalink / raw)
  To: Lakshmi Ramasubramanian, James.Bottomley, linux-integrity
  Cc: dhowells, arnd, matthewgarrett, sashal, linux-kernel, keyrings

On Thu, 2020-01-09 at 09:50 -0800, Lakshmi Ramasubramanian wrote:

> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-09 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 17:50 [PATCH] IMA: fix measuring early boot asymmetric keys Lakshmi Ramasubramanian
2020-01-09 19:38 ` Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).