Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6592334rdb; Fri, 15 Dec 2023 03:07:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxuYeeiATsjKGTeBbJp0q2D/sYX5kmGZfxU9D1NZV9blBkmw0rWHfkXIhRMTl9eDeA2TKV X-Received: by 2002:a05:6358:90c:b0:170:79dc:99f4 with SMTP id r12-20020a056358090c00b0017079dc99f4mr11451096rwi.5.1702638462594; Fri, 15 Dec 2023 03:07:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702638462; cv=none; d=google.com; s=arc-20160816; b=mMuLdj62RwRn4E5se5hQWK7Coj1YnDC925W9o0cRzVIUMgyx5CZ1ukBVIGX7pN1HcR ea4Lb8eim/HiJGFmEQiaRpCBIt78K4z572epq5Qz5zSYRAQZgBayyWCYaw61RxsmgjEM YY2TCg+DIBMXrQ/7ApfPjathUeGnwIPF/EGx+jcQgtaGgVFXC5X30n3hMfzy9uGB+ZRm a/E5182/QxsNJGnyW7mV2e01jOIsvXe7qfjq8szAQlsEoAiGUOoZ6Dd/uiQdhSpQFVTi QLnVS5ozOHVM1X2fez6vWony66hnhi+6h2R+iOJpragyX4t/Ug0KxZLfZRLihPRCrL8S 2V8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=glgMvtXI6KkmHIaNgJkuNjVnZkyLK3+FNQI0ug3e7hI=; fh=D0fL8Rlm7r9i2z777IOQAJq8yKVVG09dvNFwvrN06jc=; b=Q68nBMY0CQtzkIWDwhR3VQB5ve8WFUIPDBgeaQXJWSLdmNdvk0mfoU7KCWt7t/9ejH 1Z7OwG8QvlhO5bA31F5t0MwZ2dZNb/o/cJVmZIaowYYx0SQl8t6wnzCLtsAFXyb3qvU1 IqNe9BZ8+ip2enOjmyrF01+GHNOGNINAkdfvailsPKTqOWSd1MPcQcihHheIsphLJhLc 6yH5NxYs1ygfqLJR/2L+UickLcVKGH5FnzxpTS0FzzTOVQSmEiqsiV8kFXN4+uug10rE 64Z5me1wOCD7EuIPn36IVId2IvfMO2TfUDZkYugjkKmd3tXNnTBkh0Nnvg3S89cZ81gF JC4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sigma-star.at header.s=google header.b=pi6WclaX; spf=pass (google.com: domain of linux-crypto+bounces-866-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-866-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sigma-star.at Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x13-20020a65454d000000b005c179c00758si13096365pgr.891.2023.12.15.03.07.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 03:07:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-866-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@sigma-star.at header.s=google header.b=pi6WclaX; spf=pass (google.com: domain of linux-crypto+bounces-866-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-866-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sigma-star.at 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3839D285A8C for ; Fri, 15 Dec 2023 11:07:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4A04241FB; Fri, 15 Dec 2023 11:07:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sigma-star.at header.i=@sigma-star.at header.b="pi6WclaX" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D491124B5E for ; Fri, 15 Dec 2023 11:07:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sigma-star.at Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sigma-star.at Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3364c9ff8e1so524365f8f.0 for ; Fri, 15 Dec 2023 03:07:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigma-star.at; s=google; t=1702638432; x=1703243232; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=glgMvtXI6KkmHIaNgJkuNjVnZkyLK3+FNQI0ug3e7hI=; b=pi6WclaXebaRIiVqzsP8HuqnES18cTXikmJfA+8KRMFSXCOVsKPbMsWzq44YEqrRZJ pqMPawBszjLxmNwx/MXGsbk60srt6opJqe6H5r0v1dzoWRJni+MCAnfKz6X5QjclaqGY GEUIvUxu3OiHR3O8spWkEcJCYv3sHWS5FGqyzsk5A2Ausn7oK+OucW6es+83oI1T3fis LclhWIxrDdYxzrOz4VTfqZx+srUeRCA4rpUnPBoILOjhTlY4rNG2dA9l/fDRF7xUBcdA L+v2NXtkAXtpXRCpcR+PX6ZPfkqv/+8JCiqEhFYUfQmSnalbNK027/t5tkgfR51ZGAlC 2E0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702638432; x=1703243232; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=glgMvtXI6KkmHIaNgJkuNjVnZkyLK3+FNQI0ug3e7hI=; b=bYcL3uFNb8itwImD5+hcQrqSfiDT0K3FVN1Ie/oOFOJAcbvbX5DCWljGy0/cyZq8gs +L+8XR5ZNM6gAhdeNNlFpQTqR+wTVjj9WIjU6DoaJ5Pyw72YCo9tG4cAR4+c19+wwz1F QKCXLMPZ/A0DwRXCLAYejIlN1auYbFpVF118JmaiVS6mgi1cxvlrH6DbOUkSQE8DRWBY kFQ28ugNkAnsxN7FjuJLQQjBkBhYk4DMFTqBJo4DgqsmLdgSpMZSL7gV+xybvJ7ahQNr XTK//R0DbsIc0CjdrCsUxRmi/7vPxgCDzIIQBx9R2aUOFZ9BN65/7cTdm8ylomg+7vDp 0umQ== X-Gm-Message-State: AOJu0YxPVBlZ2q/MfBSTtplykcKwVJVau/TWOEGPm3RvbZlaRkSUcTlK c0m5oo6RHgPfLgmFQf3zHXNAMA== X-Received: by 2002:a05:600c:4311:b0:40c:2788:2903 with SMTP id p17-20020a05600c431100b0040c27882903mr5823244wme.125.1702638432281; Fri, 15 Dec 2023 03:07:12 -0800 (PST) Received: from localhost (clnet-p106-198.ikbnet.co.at. [83.175.106.198]) by smtp.gmail.com with UTF8SMTPSA id p8-20020a05600c358800b0040b40468c98sm30050771wmq.10.2023.12.15.03.07.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Dec 2023 03:07:12 -0800 (PST) From: David Gstir To: Mimi Zohar , James Bottomley , Jarkko Sakkinen , Herbert Xu , "David S. Miller" Cc: David Gstir , 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)" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-security-module@vger.kernel.org Subject: [PATCH v5 2/6] KEYS: trusted: improve scalability of trust source config Date: Fri, 15 Dec 2023 12:06:29 +0100 Message-ID: <20231215110639.45522-3-david@sigma-star.at> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231215110639.45522-1-david@sigma-star.at> References: <20231215110639.45522-1-david@sigma-star.at> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Checking if at least one valid trust source is selected does not scale and becomes hard to read. This improves this in preparation for the DCP trust source. 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-keys/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 >= 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 >= 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 >= 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. -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 -- 2.35.3