From mboxrd@z Thu Jan 1 00:00:00 1970 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 A8BAB52F82; Mon, 11 Mar 2024 20:07:28 +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=1710187648; cv=none; b=A5w1up8yzpky1u/PEFT8k6dnT6lHOVUmvkFEMgn+mOL5Pl03S4XRIoE+gVMxtD5Jcf2Cl1bOt/ScmOHJdARO/XLXceZFo/trIwv7IKVFVntnni+JKfLMzGtdGSWzbFgQwDi+q9vehOiyGdaxeOH7owDlIXyd6txnBSUs9UQDy9A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710187648; c=relaxed/simple; bh=WBtBCCMn2JMwUS5VVGHL+yTt7qkPpG1ZJQA8yWr+M5w=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=bG6w2vd26Z3a9bPZd5Yu5/LbJz2G/MAXsAP21Sk5WRQrcYLPnk+seuRBTlaseyTIhE12Pi7Hn83Llf/p2S47pB6NkbeTrHANpPuFkxKyQP2rJfjrV5neu4W8eT8Vp+cHS9n7Tl1JUWl1JgIqFI+IofAwvqx+hSQdOIQWbbn2Zro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qpKTJnaU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qpKTJnaU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DBBCC433F1; Mon, 11 Mar 2024 20:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710187648; bh=WBtBCCMn2JMwUS5VVGHL+yTt7qkPpG1ZJQA8yWr+M5w=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=qpKTJnaURjnr9qyMxxS06UflehxFUN6v0OqYQKl6DqRi1nweRVVV/ivK1D5TMqyUe Go3Ar0AuaK6I7kVk1CdNT9w1bSz26h92HPVVGtPkpGcCqw3VXKlZSK1lxVU3tFP1hu CBoQTBN7JDL2FRIWrHHc8Gu09GGXq5pYvbFPRFJBNc3GXeL54y441hKHV+TmCLqTo+ ViEDNTStK3tlBuz3EG/eoeOvj52RkgMZD13LEiA/dOCeFD8J3qagtJUO2vFm6a2XWp ZugulwiUUCbthW5vQ8oE9hwGR+oRtQY9o46qnBscOszPbc5RGMAMEMqkv54kJKxdHs 17b+JtrrT6lWg== Precedence: bulk X-Mailing-List: linux-security-module@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: Mon, 11 Mar 2024 22:07:19 +0200 Message-Id: Cc: "Mimi Zohar" , "James Bottomley" , "Herbert Xu" , "David S. Miller" , "Shawn Guo" , "Jonathan Corbet" , "Sascha Hauer" , "kernel@pengutronix.de" , "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-kernel@vger.kernel.org" , "linux-integrity@vger.kernel.org" , "keyrings@vger.kernel.org" , "linux-crypto@vger.kernel.org" , , , "linux-security-module@vger.kernel.org" , "Richard Weinberger" , "David Oberhollenzer" Subject: Re: [PATCH v6 3/6] KEYS: trusted: Introduce NXP DCP-backed trusted keys From: "Jarkko Sakkinen" To: "David Gstir" X-Mailer: aerc 0.17.0 References: <20240307153842.80033-1-david@sigma-star.at> <20240307153842.80033-4-david@sigma-star.at> <655221B7-634C-4493-A781-CF014DFFC8BF@sigma-star.at> In-Reply-To: <655221B7-634C-4493-A781-CF014DFFC8BF@sigma-star.at> On Fri Mar 8, 2024 at 9:17 AM EET, David Gstir wrote: > Hi Jarkko, > > > On 07.03.2024, at 20:30, Jarkko Sakkinen wrote: > > [...] > > >> + > >> +static int trusted_dcp_init(void) > >> +{ > >> + int ret; > >> + > >> + if (use_otp_key) > >> + pr_info("Using DCP OTP key\n"); > >> + > >> + ret =3D test_for_zero_key(); > >> + if (ret) { > >> + pr_err("Test for zero'ed keys failed: %i\n", ret); > >=20 > > I'm not sure whether this should err or warn. > >=20 > > What sort of situations can cause the test the fail (e.g. > > adversary/interposer, bad configuration etc.). > > This occurs when the hardware is not in "secure mode". I.e. it=E2=80=99s = a bad configuration issue. > Once the board is properly configured, this will never trigger again. > Do you think a warning is better for this then? Bad configuration is not unexpected configuration so it cannot possibly be an error situation as far as Linux is considered. So warning is=20 appropriate here I'd figure. BR, Jarkko