From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C81D0C83F11 for ; Mon, 28 Aug 2023 10:36:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gE91Wpq112DgTUBqEPDj7wRhUlsJ4Pmo9GShITOL3/M=; b=Y18tEuDq6iVavl C66+SyR74iu9Ozl+wIwSecLtZ4nKLBPIOGCDT9YenFLVraMZLVX/MshOiSqAAO1JK8Al489zObUvA MXQDkCJm6iUAZGyGBkDv17Yt0mjMiLsQPk6WMiga4ksjqdnZ/wmLgEV7qNV8xpQCE4g0P7Pv4mVdM 5XZesHwB4OwAFp2bzrIau9gV25ZMNFXzpgFeWviEqfFceP7tdMpHyMwksx5QjGr2emGXCURVQb5fg dv5IvSaH47VcywVKQz24sJFLBRlxkjT1UMj07C+E40Jup0byN3ToPet6Nk8+INz9PiybbhfqAK+hx s2nyGd8IMBIpnH8UKr0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qaZbU-009RhP-2a; Mon, 28 Aug 2023 10:36:16 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qaZbS-009Rgn-0J for linux-um@lists.infradead.org; Mon, 28 Aug 2023 10:36:15 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8477C63ECD; Mon, 28 Aug 2023 10:36:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 922D4C433C8; Mon, 28 Aug 2023 10:36:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1693218972; bh=nhIU92xHKR1+NDGJ+YdsKJc1EKhBF9bbSg1vtZY1FoQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=auRVAIeJ2kjrjmZgJlVHrpPT4G4BEbJVfZWBx1oIDPWHOpVHqDi+a8R/KpfAnUSbf 9xLrEZxmr0Hi62+PXaB6bOmqTXB8fm15l2LxPfJUr/mCSPVxuyFVA09Sx/t6bvJmyP DGdEK/dHCvR6gdwwQEtQJiHf+x+KsaRuOePK6L70= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Randy Dunlap , Fabio Estevam , Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org, Mimi Zohar , Sasha Levin Subject: [PATCH 5.4 027/158] IMA: allow/fix UML builds Date: Mon, 28 Aug 2023 12:12:04 +0200 Message-ID: <20230828101158.256821564@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828101157.322319621@linuxfoundation.org> References: <20230828101157.322319621@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230828_033614_177496_E1D40F40 X-CRM114-Status: GOOD ( 13.42 ) X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+linux-um=archiver.kernel.org@lists.infradead.org 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Randy Dunlap [ Upstream commit 644f17412f5acf01a19af9d04a921937a2bc86c6 ] UML supports HAS_IOMEM since 0bbadafdc49d (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: f4a0391dfa91 ("ima: fix Kconfig dependencies") Cc: Stable # v5.14+ Signed-off-by: Randy Dunlap Cc: Fabio Estevam Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: linux-um@lists.infradead.org Signed-off-by: Mimi Zohar Signed-off-by: Sasha Levin --- security/integrity/ima/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig index 44b3315f32352..d90ead61f0def 100644 --- a/security/integrity/ima/Kconfig +++ b/security/integrity/ima/Kconfig @@ -8,7 +8,7 @@ config IMA select CRYPTO_HMAC select CRYPTO_SHA1 select CRYPTO_HASH_INFO - 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 select TCG_IBMVTPM if TCG_TPM && PPC_PSERIES -- 2.40.1 _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um