From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.9486.1601626767340630679 for ; Fri, 02 Oct 2020 01:19:27 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 05B7630E; Fri, 2 Oct 2020 01:19:26 -0700 (PDT) Received: from [192.168.1.81] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8B2373F73B; Fri, 2 Oct 2020 01:19:24 -0700 (PDT) Subject: Re: [PATCH edk2-platforms v1 1/1] Platform/ARM: TimerLib based RngLib for CryptoPkg To: Sami Mujawar , devel@edk2.groups.io Cc: leif@nuviainc.com, thomas.abraham@arm.com, Matteo.Carlini@arm.com, Ben.Adderson@arm.com, nd@arm.com References: <20201001231528.100364-1-sami.mujawar@arm.com> From: "Ard Biesheuvel" Message-ID: <53b238d1-41be-e3c6-12a3-e054536d815a@arm.com> Date: Fri, 2 Oct 2020 10:19:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201001231528.100364-1-sami.mujawar@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/2/20 1:15 AM, Sami Mujawar wrote: > The commit at "b5701a4c7a0f CryptoPkg: OpensslLib: Use RngLib to > generate entropy in rand_pool" updated CryptoPkg\OpenSSL to no > longer depend on TimerLib and instead use RngLib. This is done so > that platforms can choose the desired entropy source. However, this > change breaks the builds for platforms under Platform/ARM. > > To fix this, update ArmVExpress.dsc.inc to use a TimerLib based > implementation of RngLib. > > Note: The TimerLib based implementation of RngLib replicates past > behavior when used with OpenSSL. However, this should not be used > in production as a real source of entropy. > > Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel > --- > > The changes can be seen at: > https://github.com/samimujawar/edk2-platforms/tree/1441_fix_platform_arm_build_break_v1 > > Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc > index bde3437b56d71be9259b18bc0501976695639c62..6f4621393a9713705e360a1c9ad019a6ad93a0a4 100644 > --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc > +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc > @@ -1,5 +1,5 @@ > # > -# Copyright (c) 2011-2019, ARM Limited. All rights reserved. > +# Copyright (c) 2011-2020, Arm Limited. All rights reserved. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -138,6 +138,7 @@ [LibraryClasses.common] > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > + RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf > VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf > > CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf >