From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8BDDF7803DF for ; Tue, 29 Aug 2023 11:35:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=sSpy//0wt069jM3WQAw8IXFTuKUNpYgikWT7K3ZAWd4=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1693308945; v=1; b=AiFbpvfqMkmNmLkn4GX/RvpaHH2sKahv3EK7sv2qFh2wEVmuaTN68+GDftu3KCFCn43S0K7H f3KJMRrLvgwwbHCMAyo4zoMZ69QcBEy7DoA/reo3Jy1UZHKR8kE/UygZXcT1e9P+6/iBDuj/gMl nGmgvXQA5ogq1Jjb7uYddT/4= X-Received: by 127.0.0.2 with SMTP id alE7YY7687511xaoKDW6K0W7; Tue, 29 Aug 2023 04:35:45 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.15183.1693308944018335524 for ; Tue, 29 Aug 2023 04:35:44 -0700 X-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 4DCFD2F4; Tue, 29 Aug 2023 04:36:22 -0700 (PDT) X-Received: from [192.168.1.12] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C9E203F738; Tue, 29 Aug 2023 04:35:40 -0700 (PDT) Message-ID: <59b4987e-8db1-f490-e85e-b26b6916e4ab@arm.com> Date: Tue, 29 Aug 2023 13:35:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [edk2-devel] [PATCH v6 0/9] SecurityPkg/MdePkg: Update RngLib GUID identification To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Jiewen Yao , Jian J Wang , Ard Biesheuvel , Sami Mujawar , Kun Qin References: <177A5AC29D994547.12117@groups.io> From: "PierreGondois" In-Reply-To: <177A5AC29D994547.12117@groups.io> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 2f6ErHtQOuKTGA0QfOlMze3Sx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=AiFbpvfq; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hello, Just a ping in case this was forgotten. The patches were already reviewed by Sami and Liming (thanks for this), the approval of a SecurityPkg Maintainer would be ideal, Regards, Pierre On 8/11/23 16:33, PierreGondois via groups.io wrote: > From: Pierre Gondois >=20 > v6: > - Added Tested/Reviewed-by > - [8/9] SecurityPkg/RngDxe: Use GetRngGuid() when probing RngLib > - Remove unused gEfiRngAlgorithmArmRndr definition in >=20 > v5: > - Let an implementation of BaseRngLibTimer in MdePkg to give some > time to platform owners to use the MdeModulePkg implementation. [4] > - New patch: > - [2/8] MdePkg: Add deprecated warning to BaseRngLibTimer >=20 > v4: > - New patches: > - [1/8] MdePkg: Move BaseRngLibTimerLib to MdeModulePkg > - [5/8] MdeModulePkg/Rng: Add GUID to describe unsafe Rng algorithms > - This patch-set now requires to be accepted along an edk-platforms patch > moving the BaseRngLibTimerLib to MdeModulePkg >=20 > v3: > - As the unsafe algorithm GUID will not be added to the UEFI > specification, rename: > - gEfiRngAlgorithmUnSafe to gEdkiiRngAlgorithmUnSafe > - EFI_RNG_ALGORITHM_UNSAFE to EDKII_RNG_ALGORITHM_UNSAFE >=20 > v2: > [1/8] MdePkg/ArmTrngLib: Remove ASSERTs in Null implementation > - Dropped > [2/8] MdePkg/MdePkg.dec: Move PcdCpuRngSupportedAlgorithm to MdePkg > - Change gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm > token number > - Rename to SecurityPkg/SecurityPkg.dec: Move > PcdCpuRngSupportedAlgorithm to MdePkg > [5/8] MdePkg/Rng: Add GetRngGuid() to RngLib > - Remove gEfiRngAlgorithmUnSafe from inf file > - Split Guids definitions in arch specific sections > [6/8] SecurityPkg/RngDxe: Use GetRngGuid() when probing RngLib > - Remove RngFindDefaultAlgo() and change logic accordingly. > [7/8] SecurityPkg/RngDxe: Select safe default Rng algorithm > - Dropped due to changes in [6/8] >=20 > This patch also requires the following patch on top of the serie: > - https://edk2.groups.io/g/devel/message/106546 >=20 > This patchset follows the 'code first' approach and relates to [1]. > This patchset follows the thread at [3] that aims to solve [2]. > [1] and [2] are bound and this patchset aims to solve both. >=20 > In this patchset: > a- > The RngDxe can rely on the RngLib. However the RngLib has no > interface allowing to describe which Rng algorithm is implemented. > The RngDxe must advertise the algorithm that are available through > the RngGetInfo() callback. > Add a GetRngGuid() for interface to the RngLib. >=20 > b- > The Arm Architecture states the RNDR that the DRBG algorithm should > be compliant with NIST SP800-90A, while not mandating a particular > algorithm, so as to be inclusive of different geographies. > The RngLib can rely on this Arm RNDR instruction. In order to > accurately describe the implementation using the RNDR instruction, > add a EFI_RNG_ALGORITHM_ARM_RNDR GUID [1]. >=20 > c- > For the same reason as a/b, add a GUID describing unsafe RNG > algorithms, allowing to accurately describe the BaseRngLibTimerLib. >=20 > d- > Use a/b/c mechanisms/GUIDs to select a safe Rng algorithm in the > Arm implementation of the RngDxe. >=20 > [1] BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4441 > [2] BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4151 > [3] https://edk2.groups.io/g/devel/message/100806 > [4] BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4504 >=20 > Pierre Gondois (9): > MdeModulePkg: Duplicate BaseRngLibTimerLib to MdeModulePkg > MdePkg: Add deprecated warning to BaseRngLibTimer > SecurityPkg/SecurityPkg.dec: Move PcdCpuRngSupportedAlgorithm to > MdePkg > MdePkg/DxeRngLib: Request raw algorithm instead of default > MdePkg/Rng: Add GUID to describe Arm Rndr Rng algorithms > MdeModulePkg/Rng: Add GUID to describe unsafe Rng algorithms > MdePkg/Rng: Add GetRngGuid() to RngLib > SecurityPkg/RngDxe: Use GetRngGuid() when probing RngLib > SecurityPkg/RngDxe: Simplify Rng algorithm selection for Arm >=20 > ArmVirtPkg/ArmVirt.dsc.inc | 2 +- > EmulatorPkg/EmulatorPkg.dsc | 2 +- > MdeModulePkg/Include/Guid/RngAlgorithm.h | 23 ++++++++ > .../BaseRngLibTimerLib/BaseRngLibTimerLib.inf | 6 +- > .../BaseRngLibTimerLib/BaseRngLibTimerLib.uni | 15 +++++ > .../Library/BaseRngLibTimerLib/RngLibTimer.c | 28 ++++++++++ > MdeModulePkg/MdeModulePkg.dec | 3 + > MdeModulePkg/MdeModulePkg.dsc | 1 + > MdePkg/Include/Library/RngLib.h | 17 ++++++ > MdePkg/Include/Protocol/Rng.h | 10 ++++ > MdePkg/Library/BaseRngLib/AArch64/Rndr.c | 42 ++++++++++++++ > MdePkg/Library/BaseRngLib/BaseRngLib.inf | 10 ++++ > MdePkg/Library/BaseRngLib/Rand/RdRand.c | 26 +++++++++ > .../Library/BaseRngLibNull/BaseRngLibNull.c | 22 ++++++++ > .../BaseRngLibTimerLib/BaseRngLibTimerLib.inf | 1 + > .../Library/BaseRngLibTimerLib/RngLibTimer.c | 45 +++++++++++++++ > MdePkg/Library/DxeRngLib/DxeRngLib.c | 36 +++++++++++- > MdePkg/MdePkg.dec | 6 ++ > NetworkPkg/NetworkPkg.dsc | 4 +- > OvmfPkg/AmdSev/AmdSevX64.dsc | 2 +- > OvmfPkg/Bhyve/BhyveX64.dsc | 2 +- > OvmfPkg/CloudHv/CloudHvX64.dsc | 2 +- > OvmfPkg/IntelTdx/IntelTdxX64.dsc | 2 +- > OvmfPkg/Microvm/MicrovmX64.dsc | 2 +- > OvmfPkg/OvmfPkgIa32.dsc | 2 +- > OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- > OvmfPkg/OvmfPkgX64.dsc | 2 +- > OvmfPkg/OvmfXen.dsc | 2 +- > OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc | 2 +- > .../RngDxe/AArch64/AArch64Algo.c | 55 +++++++++++++------ > .../RandomNumberGenerator/RngDxe/ArmRngDxe.c | 23 +++----- > .../RandomNumberGenerator/RngDxe/RngDxe.inf | 4 +- > SecurityPkg/SecurityPkg.dec | 2 - > SecurityPkg/SecurityPkg.dsc | 4 +- > SignedCapsulePkg/SignedCapsulePkg.dsc | 4 +- > 35 files changed, 355 insertions(+), 56 deletions(-) > create mode 100644 MdeModulePkg/Include/Guid/RngAlgorithm.h > copy {MdePkg =3D> MdeModulePkg}/Library/BaseRngLibTimerLib/BaseRngLibTi= merLib.inf (85%) > create mode 100644 MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTi= merLib.uni > copy {MdePkg =3D> MdeModulePkg}/Library/BaseRngLibTimerLib/RngLibTimer.= c (83%) >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108090): https://edk2.groups.io/g/devel/message/108090 Mute This Topic: https://groups.io/mt/100684678/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-