archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <>
Cc: Randy Dunlap <>,
	Mimi Zohar <>,
	Dmitry Kasatkin <>,,
	Fabio Estevam <>,
	Rajiv Andrade <>,
	Richard Weinberger <>,
	Anton Ivanov <>,
	Johannes Berg <>,
Subject: [PATCH] IMA: allow/fix UML builds
Date: Thu, 23 Feb 2023 19:27:03 -0800	[thread overview]
Message-ID: <> (raw)

UML supports HAS_IOMEM since 0bbadafdc49d (um: allow disabling

Current IMA build on UML fails on allmodconfig (with TCG_TPM=m):

ld: security/integrity/ima/ima_queue.o: in function `ima_add_template_entry':
ima_queue.c:(.text+0x2d9): undefined reference to `tpm_pcr_extend'
ld: security/integrity/ima/ima_init.o: in function `ima_init':
ima_init.c:(.init.text+0x43f): undefined reference to `tpm_default_chip'
ld: security/integrity/ima/ima_crypto.o: in function `ima_calc_boot_aggregate_tfm':
ima_crypto.c:(.text+0x1044): undefined reference to `tpm_pcr_read'
ld: ima_crypto.c:(.text+0x10d8): undefined reference to `tpm_pcr_read'

Modify the IMA Kconfig entry so that it selects TCG_TPM if HAS_IOMEM
is set, regardless of the UML Kconfig setting.
This updates TCG_TPM from =m to =y and fixes the linker errors.

Fixes: f4a0391dfa91 ("ima: fix Kconfig dependencies")
Signed-off-by: Randy Dunlap <>
Cc: Mimi Zohar <>
Cc: Dmitry Kasatkin <>
Cc: Fabio Estevam <>
Cc: Rajiv Andrade <>
Cc: Richard Weinberger <>
Cc: Anton Ivanov <>
Cc: Johannes Berg <>
 security/integrity/ima/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -- a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
--- a/security/integrity/ima/Kconfig
+++ b/security/integrity/ima/Kconfig
@@ -8,7 +8,7 @@ config IMA
 	select CRYPTO_HMAC
 	select CRYPTO_SHA1
-	select TCG_TPM if HAS_IOMEM && !UML
+	select TCG_TPM if HAS_IOMEM
 	select TCG_TIS if TCG_TPM && X86
 	select TCG_CRB if TCG_TPM && ACPI

linux-um mailing list

             reply	other threads:[~2023-02-24  3:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24  3:27 Randy Dunlap [this message]
2023-03-13  0:15 ` [PATCH] IMA: allow/fix UML builds Randy Dunlap
2023-03-14 18:28 ` Mimi Zohar
2023-03-14 21:23   ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).