Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp97101lqc; Thu, 7 Mar 2024 11:19:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWXoKv4Dt8lky7wfwyhWEuAUm4mb+8RM6NLgeFHHicDSp47JagmLh8VmU8b3eOuLR8FRTac/OQ2KFVij6ESBJRHtTPLp0lZTxIH0cxvUQ== X-Google-Smtp-Source: AGHT+IFBT1ExhpXd3KRXNXUjXeBUI+h+0cdavwHw9cChllQCu+/CC0HQvZR74OrU4RXPiuegi15j X-Received: by 2002:a05:620a:572:b0:788:2d1b:9166 with SMTP id p18-20020a05620a057200b007882d1b9166mr8771637qkp.31.1709839143694; Thu, 07 Mar 2024 11:19:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709839143; cv=pass; d=google.com; s=arc-20160816; b=Ps4IERTW4TK4+xqJHQWX51VJiAyyw6oZfBIIWEhrJFXP+DVynlmyrlnAu9OFV/zNoB mL06RX3JLEsNkirKb01Ux2UQgVciQqwTCJx2/Xdny6+hjoaPki7NOvTJNLm+O+zWLmv6 ilnqMzFJA4g+qKJntplzR/Wrd1C1sSecI3a1aE77aRT0jn6NAg2rNWcgk5LeFDBJ6KpR IgD0UWus1m2JR5sUCm5NGbtMnzX1ioZ/nHJxzSVDRRPZebLP9DKb4TigIDr1Yq+IQhGl DTMhKJKjvcn7PwR1UYKBRdsQ80esEwjBtaepnnIcAJQYH5rUEhtUPr3ksm6KY13X5Gz8 xd5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=YrYiqXq6EroZW8WUdyfITcT5NN+Fjwl8/tJwN/jOM8I=; fh=b0mw5zGnjxP9hNjWZ2FADxN4vvvjQOyIrVlGOu5LzqI=; b=ouC6MoYCBoirBksR1BMbx4gl/PiqjnTdXxF2vPo6q3lH5nvhtM/Na1/R7Ae86f2wE4 bJDVrCAzVxgrnyGdZeOWRILgiCwnO/ZebkqmRtqnwTtoS8uu82dBMPl3y/MmnYjbN4bi 9nFzITwuTvu+vpJbd0ISCtVMYfjSF5bfYwFZ6kVEOr3C+WNQpThS7mNXVu/YD4nBbJl1 yBg3suoAOpFghF3Obs7C13g43yplTGOHui1fITYJDHVq5oVVBOcPFGh2RFbbKW11JXgS kSGUlRbxsoHd9nEXwBETCcytYeAYdzc7RvFAhV5z1JRKcdoAWNgd9No77zjldToVxzM6 NjPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GsYbuPqd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-2569-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2569-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id xx26-20020a05620a5d9a00b007882517ab3csi10270613qkn.717.2024.03.07.11.19.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:19:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2569-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GsYbuPqd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-2569-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2569-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3D8181C2108F for ; Thu, 7 Mar 2024 19:19:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71479135A7E; Thu, 7 Mar 2024 19:18:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GsYbuPqd" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CF7D1CABF; Thu, 7 Mar 2024 19:18:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709839136; cv=none; b=GMz1+Tab24gqEkBivSHRhk0+K+eAeP/Iz3caYnHhQqrNuTgvS0E4d7LU2Y4i+jfUIjiMpkt8iRlbDBDGKMNCGeN6LyUWOm+PNI10Hu3vOc2cY19bnyFj1oBCc1Pr0mlUWDeONil6tVpoH5xbvVH4EgHezkPVGPeoPN2izYeHZq8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709839136; c=relaxed/simple; bh=UmjhrkViRfYvnwNPTg4KjivwfkIXHV+bTjbmQkJG3QE=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=ooAE/KEQmdbxYqQ3LG/eiLXBrjgdkXfTlC6KbyLunLfStEruliveu6CufH5++uW2/Ol1k7mvZ681TRHVzzPhI4mmtk0FVEEY/kBvHjyhW+nUhynysmyj+0ERWWrFi+ve4AX1CadDSUlyMr6+lo/jrmUSFOTJ/f96Y6BAqYatrRg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GsYbuPqd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69D6DC433F1; Thu, 7 Mar 2024 19:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709839135; bh=UmjhrkViRfYvnwNPTg4KjivwfkIXHV+bTjbmQkJG3QE=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=GsYbuPqd3fCdj4s8kchOPQYbaLbxtrXW6h3gy9vPfaNLhUe2catGJWd2GxYb3NuoO IGi0toRCifY8UmbJzwvhKj1NcK/EcwDhBAqm2suJuEI3scWffUHglU0K74dKwiEbZO oBgOhuCt0fVooZ6o8hW2l1ueFvbCYPCsYuCP4jQbx7fnZsT0C/+90T89+VVVcENpYA F5MdQj8IXGKC5KcPLi3pQqdjkbxELHamaG0+hmwv6A2mUbGYQ/4ZKNtSkprM8OYt+9 lPHyIKvoXFpQQRy4cXKm/Gk6t3VGMkEA8C56YjIFD48mC/Hp0Kp5bbC1kqYcl/oGjp StYDquug39NcA== Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 07 Mar 2024 21:18:47 +0200 Message-Id: Cc: "Shawn Guo" , "Jonathan Corbet" , "Sascha Hauer" , "Pengutronix Kernel Team" , "Fabio Estevam" , "NXP Linux Team" , "Ahmad Fatoum" , "sigma star Kernel Team" , "David Howells" , "Li Yang" , "Paul Moore" , "James Morris" , "Serge E. Hallyn" , "Paul E. McKenney" , "Randy Dunlap" , "Catalin Marinas" , "Rafael J. Wysocki" , "Tejun Heo" , "Steven Rostedt (Google)" , , , , , , , , Subject: Re: [PATCH v6 2/6] KEYS: trusted: improve scalability of trust source config From: "Jarkko Sakkinen" To: "David Gstir" , "Mimi Zohar" , "James Bottomley" , "Herbert Xu" , "David S. Miller" X-Mailer: aerc 0.17.0 References: <20240307153842.80033-1-david@sigma-star.at> <20240307153842.80033-3-david@sigma-star.at> In-Reply-To: <20240307153842.80033-3-david@sigma-star.at> On Thu Mar 7, 2024 at 5:38 PM EET, David Gstir wrote: > Enabling trusted keys requires at least one trust source implementation > (currently TPM, TEE or CAAM) to be enabled. Currently, this is > done by checking each trust source's config option individually. > This does not scale when more trust sources like the one for DCP > are added. nit: just to complete sentence and tie up the story "added because ..." > > Add config HAVE_TRUSTED_KEYS which is set to true by each trust source > once its enabled and adapt the check for having at least one active trust > source to use this option. Whenever a new trust source is added, it now > needs to select HAVE_TRUSTED_KEYS. > > Signed-off-by: David Gstir > --- > security/keys/trusted-keys/Kconfig | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/security/keys/trusted-keys/Kconfig b/security/keys/trusted-k= eys/Kconfig > index dbfdd8536468..553dc117f385 100644 > --- a/security/keys/trusted-keys/Kconfig > +++ b/security/keys/trusted-keys/Kconfig > @@ -1,3 +1,6 @@ > +config HAVE_TRUSTED_KEYS > + bool > + > config TRUSTED_KEYS_TPM > bool "TPM-based trusted keys" > depends on TCG_TPM >=3D TRUSTED_KEYS > @@ -9,6 +12,7 @@ config TRUSTED_KEYS_TPM > select ASN1_ENCODER > select OID_REGISTRY > select ASN1 > + select HAVE_TRUSTED_KEYS > help > Enable use of the Trusted Platform Module (TPM) as trusted key > backend. Trusted keys are random number symmetric keys, > @@ -20,6 +24,7 @@ config TRUSTED_KEYS_TEE > bool "TEE-based trusted keys" > depends on TEE >=3D TRUSTED_KEYS > default y > + select HAVE_TRUSTED_KEYS > help > Enable use of the Trusted Execution Environment (TEE) as trusted > key backend. > @@ -29,10 +34,11 @@ config TRUSTED_KEYS_CAAM > depends on CRYPTO_DEV_FSL_CAAM_JR >=3D TRUSTED_KEYS > select CRYPTO_DEV_FSL_CAAM_BLOB_GEN > default y > + select HAVE_TRUSTED_KEYS > help > Enable use of NXP's Cryptographic Accelerator and Assurance Module > (CAAM) as trusted key backend. > =20 > -if !TRUSTED_KEYS_TPM && !TRUSTED_KEYS_TEE && !TRUSTED_KEYS_CAAM > -comment "No trust source selected!" > +if !HAVE_TRUSTED_KEYS > + comment "No trust source selected!" > endif otherwise, it is in reasonable shape and form. BR, Jarkko