From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7D7F9C4345F for ; Fri, 26 Apr 2024 19:31:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C5545882D9; Fri, 26 Apr 2024 21:31:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=gmx.de header.i=xypron.glpk@gmx.de header.b="dM4BNvsF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 918C28845B; Fri, 26 Apr 2024 21:31:39 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 98D5B882A9 for ; Fri, 26 Apr 2024 21:31:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1714159890; x=1714764690; i=xypron.glpk@gmx.de; bh=EWIjSiQUFticm1ZmO9sFXuQRti6ZVhmuiVukTmAjJjg=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=dM4BNvsFg7yoXikWRiAflUETHAuoUUWavYMZ9C9Xt5iO8wsJW2l21p6nMpnCKQ3K Od7v39rl3dbQ9xFkJ9duHb8S6mGdQmsi7KG8n8KqIRWE5r3Fq/LebtsCOQCxj85tx 1wfGA7lH3kOELXucM7S2aKdhNx16ho3dDhlB1Pw7erNXMnTQSwy734SV1MRjm74Vb l50zxZ/scwqwDobi7Bs8u1+MxcFzJ3fJibZO+4136ZqmlC9rSwO5HfNVJDV052bec kGRV5rSx4LVnw5PmwzWuRjgwZMnFrxqM4cTuQoEVTR4G8zqsrSxIhjBIojR58I68g WquwrwiCydZHBFXXdw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.123.161] ([62.143.245.32]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M1Hdq-1rynfM2Xu6-002pWO; Fri, 26 Apr 2024 21:31:30 +0200 Message-ID: <9f77b7bf-7e47-4de0-b89f-57e67d992b8a@gmx.de> Date: Fri, 26 Apr 2024 21:31:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] crypto/fsl: Introduce SPL_FSL_CAAM_RNG To: Tim Harvey Cc: Marek Vasut , u-boot@lists.denx.de, Angelo Dureghello , Emanuele Ghidoli , Fabio Estevam , Gaurav Jain , Michal Simek , Simon Glass , Stefan Roese , Sughosh Ganu , Svyatoslav Ryhel , Tom Rini References: <20240425230314.497203-1-marex@denx.de> <20240425230314.497203-2-marex@denx.de> <94a75eb9-950c-41f0-b9fc-c7d95ecec6c6@denx.de> <8d75e195-d644-4436-8007-8476da589032@gmx.de> Content-Language: en-US From: Heinrich Schuchardt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:q/ag/nVdKgfafAFyA894rYyp87eKgpmd+PdCLx5IXGfrPMlzy/a amrPNEL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BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 4/26/24 19:34, Tim Harvey wrote: > On Fri, Apr 26, 2024 at 7:45=E2=80=AFAM Heinrich Schuchardt wrote: >> >> On 26.04.24 06:03, Marek Vasut wrote: >>> On 4/26/24 2:16 AM, Tim Harvey wrote: >>> >>>>> diff --git a/drivers/crypto/fsl/Makefile b/drivers/crypto/fsl/Makefi= le >>>>> index 7a2543e16cc..4fbce519a0b 100644 >>>>> --- a/drivers/crypto/fsl/Makefile >>>>> +++ b/drivers/crypto/fsl/Makefile >>>>> @@ -6,6 +6,6 @@ obj-y +=3D sec.o >>>>> obj-$(CONFIG_FSL_CAAM) +=3D jr.o fsl_hash.o jobdesc.o error.o >>>>> obj-$(CONFIG_CMD_BLOB)$(CONFIG_IMX_CAAM_DEK_ENCAP) +=3D fsl_blob.= o >>>>> obj-$(CONFIG_RSA_FREESCALE_EXP) +=3D fsl_rsa.o >>>>> -obj-$(CONFIG_FSL_CAAM_RNG) +=3D rng.o >>>>> +obj-$(CONFIG_$(SPL_TPL_)FSL_CAAM_RNG) +=3D rng.o >>>>> obj-$(CONFIG_FSL_DCP_RNG) +=3D dcp_rng.o >>>>> obj-$(CONFIG_FSL_MFGPROT) +=3D fsl_mfgprot.o >>>>> -- >>>>> 2.43.0 >>>>> >>>> >>>> Marek, >>> >>> Hi, >>> >>>> Thanks - this series does solve the issue I am seeing in the SPL when >>>> enabling DM_RNG. Is this going to cause an issue for people who expec= t >>>> it to be currently enabled and now have to manually enable it? >>> >>> That's a good question. If I do '$ git grep FSL_CAAM_RNG' , there seem >>> to be no users, so I don't think we need to worry here, right ? >>> >>> With SPL_DM_RNG i.e. 1/3 I am a bit more concerned. But, looking at th= e >>> users that enable DM_RNG, I am not seeing any obvious ones that would >>> require SPL_DM_RNG too. What do you think ? >> >> Grepping for UCLASS_RNG should find usages. >> >> The only possible SPL usage seems to be in net/net_rand.h. Here a >> fallback to the mac address as seed exists. >> >> Best regards >> >> Heinrich >> > > Hi Heinrich, > > looks like its also used in lib/uuid.c by CONFIG_RANDOM_UUID and the > few configs have CONFIG_RANDOM_UUID=3Dy do not have DM_RNG=3Dy so not an > issue. > > srand_mac is used in: > net/bootp.c which is CONFIG_CMD_BOOTP so not SPL > net/dhcpv6.c which is CONIFG_CMD_DHCP6 so not in SPL > net/net.c which is used by CONFIG_SPL_DM_ETH and the fallback you > refer to but 'git grep DM_RNG=3Dy configs/ | cut -d: -f1 | xargs grep > SPL_DM_ETH' shows no results so I think this is ok right? > > but I also see lib/efi_loader/efi_rng.c where UCLASS_RNG used by > efi_rng_protocol - I don't know anything about efi... is this going to > be used by SPL? UEFI is only relevant in main U-Boot. The EFI_RNG_PROTOCOL is used for KASLR by Linux but you can boot without it. Best regards Heinrich