Skip to content

Commit 644f174

Browse files
rddunlapmimizohar
authored andcommitted
IMA: allow/fix UML builds
UML supports HAS_IOMEM since 0bbadaf (um: allow disabling NO_IOMEM). 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: f4a0391 ("ima: fix Kconfig dependencies") Cc: Stable <stable@vger.kernel.org> # v5.14+ Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Fabio Estevam <festevam@gmail.com> Cc: Richard Weinberger <richard@nod.at> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: linux-um@lists.infradead.org Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
1 parent eeac8ed commit 644f174

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

security/integrity/ima/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ config IMA
88
select CRYPTO_HMAC
99
select CRYPTO_SHA1
1010
select CRYPTO_HASH_INFO
11-
select TCG_TPM if HAS_IOMEM && !UML
11+
select TCG_TPM if HAS_IOMEM
1212
select TCG_TIS if TCG_TPM && X86
1313
select TCG_CRB if TCG_TPM && ACPI
1414
select TCG_IBMVTPM if TCG_TPM && PPC_PSERIES

0 commit comments

Comments
 (0)