All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sumit Garg <sumit.garg@linaro.org>
Cc: "James Bottomley" <jejb@linux.ibm.com>,
	"Jarkko Sakkinen" <jarkko@kernel.org>,
	"Mimi Zohar" <zohar@linux.ibm.com>,
	"David Howells" <dhowells@redhat.com>,
	kernel <kernel@pengutronix.de>,
	"James Morris" <jmorris@namei.org>,
	"Eric Biggers" <ebiggers@kernel.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	"Horia Geantă" <horia.geanta@nxp.com>,
	"Aymen Sghaier" <aymen.sghaier@nxp.com>,
	"Udit Agarwal" <udit.agarwal@nxp.com>,
	"Jan Luebbe" <j.luebbe@pengutronix.de>,
	"David Gstir" <david@sigma-star.at>,
	"Richard Weinberger" <richard@nod.at>,
	"Franck LENORMAND" <franck.lenormand@nxp.com>,
	"open list:ASYMMETRIC KEYS" <keyrings@vger.kernel.org>,
	"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
	<linux-crypto@vger.kernel.org>,
	linux-integrity <linux-integrity@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"open list:SECURITY SUBSYSTEM"
	<linux-security-module@vger.kernel.org>,
	"Andreas Rammhold" <andreas@rammhold.de>
Subject: Re: [PATCH v2 1/6] KEYS: trusted: allow use of TEE as backend without TCG_TPM support
Date: Mon, 19 Jul 2021 11:09:29 +0200	[thread overview]
Message-ID: <6003f9a3-1588-c317-4eeb-889d8e6c40e3@pengutronix.de> (raw)
In-Reply-To: <CAFA6WYMJp5u_+3bNc0ykFzveakOS4nqJfPvSoaFGQApFctL47A@mail.gmail.com>

Hello Sumit,

On 19.07.21 10:04, Sumit Garg wrote:
> Hi Ahmad,
> 
> On Tue, 22 Jun 2021 at 18:08, Ahmad Fatoum <a.fatoum@pengutronix.de> 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 |

  reply	other threads:[~2021-07-19  9:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 12:37 [PATCH v2 0/6] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys Ahmad Fatoum
2021-06-22 12:37 ` [PATCH v2 1/6] KEYS: trusted: allow use of TEE as backend without TCG_TPM support Ahmad Fatoum
2021-07-19  8:04   ` Sumit Garg
2021-07-19  9:09     ` Ahmad Fatoum [this message]
2021-06-22 12:37 ` [PATCH v2 3/6] KEYS: trusted: allow users to use kernel RNG for key material Ahmad Fatoum
2021-06-22 12:37 ` [PATCH v2 4/6] KEYS: trusted: allow trust sources " Ahmad Fatoum
2021-06-22 12:37 ` [PATCH v2 5/6] crypto: caam - add in-kernel interface for blob generator Ahmad Fatoum
2021-07-02  8:03   ` Ahmad Fatoum
2021-06-22 12:37 ` [PATCH v2 6/6] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys Ahmad Fatoum
2021-07-01 20:42   ` Richard Weinberger
2021-07-02  8:00     ` Ahmad Fatoum
2021-07-02 10:53       ` Richard Weinberger
2021-07-02 12:33         ` Ahmad Fatoum
2021-07-20 19:19           ` Richard Weinberger
2021-07-20 20:24             ` Mimi Zohar
2021-07-20 20:37               ` Richard Weinberger
2021-07-21 17:02             ` Ahmad Fatoum
2021-07-14  6:36 ` [PATCH v2 0/6] " Ahmad Fatoum

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=6003f9a3-1588-c317-4eeb-889d8e6c40e3@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=andreas@rammhold.de \
    --cc=aymen.sghaier@nxp.com \
    --cc=david@sigma-star.at \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=franck.lenormand@nxp.com \
    --cc=horia.geanta@nxp.com \
    --cc=j.luebbe@pengutronix.de \
    --cc=jarkko@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=jmorris@namei.org \
    --cc=kernel@pengutronix.de \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=serge@hallyn.com \
    --cc=sumit.garg@linaro.org \
    --cc=udit.agarwal@nxp.com \
    --cc=zohar@linux.ibm.com \
    --subject='Re: [PATCH v2 1/6] KEYS: trusted: allow use of TEE as backend without TCG_TPM support' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.