[PATCH 4.19 007/191] IMA: allow/fix UML builds

Greg Kroah-Hartman gregkh at linuxfoundation.org
Tue May 16 02:18:24 PDT 2023


On Tue, May 16, 2023 at 10:47:13AM +0200, Geert Uytterhoeven wrote:
> Hi Greg,
> 
> On Mon, May 15, 2023 at 6:39 PM Greg Kroah-Hartman
> <gregkh at linuxfoundation.org> wrote:
> > From: Randy Dunlap <rdunlap at infradead.org>
> >
> > commit 644f17412f5acf01a19af9d04a921937a2bc86c6 upstream.
> >
> > UML supports HAS_IOMEM since 0bbadafdc49d (um: allow disabling
> > NO_IOMEM).
> 
> 0bbadafdc49d is in v5.14.
> Was it backported to older versions?

Nope.

> > 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")

This is what I triggered off of.

> > Cc: Stable <stable at vger.kernel.org> # v5.14+
> 
> "v5.14+"

Sorry, good catch, I'll go drop this from all of the older queues.

thanks for the review!

greg k-h



More information about the linux-um mailing list