Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3530458pxv; Mon, 19 Jul 2021 02:28:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+wyLagLlqiacYeSEJ1knNj1SiVcJ27zN5K53Bu7BvKCrBUN7j9RHjy9Q5sKqokaUPQJE0 X-Received: by 2002:a92:660f:: with SMTP id a15mr17328475ilc.182.1626686933510; Mon, 19 Jul 2021 02:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626686933; cv=none; d=google.com; s=arc-20160816; b=DXkDmB+M8luhdfXG6vcmvv3MRDb4n158BGVB8/FqG53TozVrF/HO92ZyX9l2NglE8F AF8oLejEnjbb4CUXp3t4CSNPggN/JMrF3jb0N0l688YnWul+jz3ao/zMOUMPBVTw6xd9 1D6VQetCdcowZuuBo6tHGhklSLUaKwJ9iKK72NMi5RgoPwbhOUA2USqXNAx9FbjjXGQw E3kWz63WzaYhcTy7Eg2yGBd9ke5bGE3KLvLktoSGIoOlen2GgIIh0nrJ8ZaAB/0JSAJK JD7Woji49EVyh3ZpaGQKskOfXmpvVLZN87M7kQ47J7sGv7CXn9uBvJzTs2bfJP65x3Os mPFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=hWbOjjdXv2r6BUF3yKw2McJVnxiq6Ex57lTZJiQk0yg=; b=X1HkdKGvSidWewJxIgfd2ELmoxUJ5sGydQcC+o5iKRQmtyBEuvagBSJdrTozbYQKpO wpIN5mLnVdd3w85/48M7hQFTOLhzO0mtLkCv806nCowW/8sw16KOj5JKqBH7+h+/N59a yAE17khnkY4/Or6gkDU1BmVZPixKe/wkgPApiUrBo5nb/mCO8rcDrm8f5JMlGNqIiFcF Xtj5Q0gWbQqHWWDvJExzl3lfYLIRpRMCckSXQRVjtgiuBvKM3sEF/HDAHyLf7zMAt1g2 1VBRExMfp9vMNr8yBfFCFqwkqTGOora+ZRs536VQx0/GRXdYArN6MPpu4Xb8iYX/O5ng S56A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si19716668iol.42.2021.07.19.02.28.41; Mon, 19 Jul 2021 02:28:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235253AbhGSIrW (ORCPT + 99 others); Mon, 19 Jul 2021 04:47:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235336AbhGSIrO (ORCPT ); Mon, 19 Jul 2021 04:47:14 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EE50C0613DB for ; Mon, 19 Jul 2021 01:29:02 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m5PHJ-0006Ck-GR; Mon, 19 Jul 2021 11:09:33 +0200 Subject: Re: [PATCH v2 1/6] KEYS: trusted: allow use of TEE as backend without TCG_TPM support To: Sumit Garg Cc: James Bottomley , Jarkko Sakkinen , Mimi Zohar , David Howells , kernel , James Morris , Eric Biggers , "Serge E. Hallyn" , =?UTF-8?Q?Horia_Geant=c4=83?= , Aymen Sghaier , Udit Agarwal , Jan Luebbe , David Gstir , Richard Weinberger , Franck LENORMAND , "open list:ASYMMETRIC KEYS" , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , linux-integrity , Linux Kernel Mailing List , "open list:SECURITY SUBSYSTEM" , Andreas Rammhold References: From: Ahmad Fatoum Message-ID: <6003f9a3-1588-c317-4eeb-889d8e6c40e3@pengutronix.de> Date: Mon, 19 Jul 2021 11:09:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-crypto@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hello Sumit, On 19.07.21 10:04, Sumit Garg wrote: > Hi Ahmad, > > On Tue, 22 Jun 2021 at 18:08, Ahmad Fatoum wrote: >> >> With recent rework, trusted keys are no longer limited to TPM as trust >> source. The Kconfig symbol is unchanged however leading to a few issues: >> >> - TCG_TPM is required, even if only TEE is to be used >> - Enabling TCG_TPM, but excluding it from available trusted sources >> is not possible >> - TEE=m && TRUSTED_KEYS=y will lead to TEE support being silently >> dropped, which is not the best user experience >> >> Remedy these issues by introducing two new Kconfig symbols: >> TRUSTED_KEYS_TPM and TRUSTED_KEYS_TEE with the appropriate >> dependencies. >> > > This should include a fixes tag to the rework commit. Yes. I wasn't aware of the regression that Andreas (CC'd) recently reported. Knowing, it now indeed warrants a backport. Will add in v2. >> diff --git a/security/keys/Kconfig b/security/keys/Kconfig >> index 64b81abd087e..6fdb953b319f 100644 >> --- a/security/keys/Kconfig >> +++ b/security/keys/Kconfig >> @@ -70,23 +70,23 @@ config BIG_KEYS >> >> config TRUSTED_KEYS >> tristate "TRUSTED KEYS" >> - depends on KEYS && TCG_TPM >> + depends on KEYS > >> select CRYPTO >> select CRYPTO_HMAC >> select CRYPTO_SHA1 >> select CRYPTO_HASH_INFO > > Should move these as well to TRUSTED_KEYS_TPM as the core code doesn't > mandate their need. Ok, will test and change appropriately. > >> - select ASN1_ENCODER >> - select OID_REGISTRY >> - select ASN1 >> $(obj)/trusted_tpm2.o: $(obj)/tpm2key.asn1.h >> -trusted-y += trusted_tpm2.o >> -trusted-y += tpm2key.asn1.o >> +trusted-$(CONFIG_TRUSTED_KEYS_TPM) += trusted_tpm2.o >> +trusted-$(CONFIG_TRUSTED_KEYS_TPM) += tpm2key.asn1.o >> + >> +trusted-$(CONFIG_TRUSTED_KEYS_TEE) += trusted_tee.o >> >> trusted-$(CONFIG_TEE) += trusted_tee.o > > This should be dropped. Right.. Thanks for the review. I'll isolate this patch for v2. Cheers, Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |