From nobody Tue Feb 10 03:56:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90862+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90862+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1656515076; cv=none; d=zohomail.com; s=zohoarc; b=H6zCLYEPkf+dn57YgwbbpXOl6Y0RRQCrwvTzPgKP00RErwpaYLcGHuAmA0V7KWXiH8+3h0qk01+g6Eo0iK0pvAYjyjP/kEsCVGy2HLEKjk6sjzMXPscqI5pSi0YWoBQvAohI6cqFRhs2IRKPpfvUyeXz/Bthm8u3ssRMTsoY9hc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1656515076; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=UFCg4Szdndiq0n8E4dO5pmOTN2fR3+hOItMkK2ayRPo=; b=jb9UD7Z6BRZk4iRhbAKBhXBJKhdOXwqkGbAlEu9oHic18bUAgKenhT65WI7lY9yPY5OxnkiokjGRQLHSImqfB6Nf13YgHOl/pODd+Z1rA5YPA5jx5UZMZaXK8dF5Z3hjWLj7XFVFaTQF1aNb6QLswEHbm2kN+94LKu2j2BxcM+E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90862+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1656515076041936.1561298317193; Wed, 29 Jun 2022 08:04:36 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 5dtHYY1788612xBSH548hybA; Wed, 29 Jun 2022 08:04:35 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.12735.1656515074531536027 for ; Wed, 29 Jun 2022 08:04:34 -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 66E54153B; Wed, 29 Jun 2022 08:04:34 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.42.208]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1F09F3F792; Wed, 29 Jun 2022 08:04:31 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Leif Lindholm , Ard Biesheuvel , Rebecca Cran , Michael D Kinney , Liming Gao , Jiewen Yao , Jian J Wang Subject: [edk2-devel] [PATCH v3 14/22] SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid Date: Wed, 29 Jun 2022 17:02:26 +0200 Message-Id: <20220629150241.2597898-18-Pierre.Gondois@arm.com> In-Reply-To: <20220629150241.2597898-1-Pierre.Gondois@arm.com> References: <20220629150241.2597898-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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 X-Gm-Message-State: S6EWGnGZ1oxmVdaJt3TdTm5Sx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1656515075; bh=g+5nUq6ZlbIJi62UgUCRISORH/J07SuGtoL8pg+DaL0=; h=Cc:Date:From:Reply-To:Subject:To; b=gDvN1vOmydF8yYudbmRTljZf5s+uvuW5qjvvspMHsWGTPPsyuZyNTYNxDZvis/48ulO e+buZRIArX8x8tUcpT7A2zM57BtSrTUtKnRcIIZv/rvc/xkmxyiG9VmI83UcFSHmLaup4 S+rAtrKU3Bn15ZWUY1vWWBWQr3kTE/XpAVc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1656515077528100005 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois gEfiRngAlgorithmSp80090Ctr256Guid was used as the default algorithm in RngGetRNG(). The commit below set the default algorithm to PcdCpuRngSupportedAlgorithm, which is a zero GUID by default. As the Pcd value is not defined for any platform in the edk2-platfoms repository, assume it was an error and go back to the first version, using gEfiRngAlgorithmSp80090Ctr256Guid. Fixes 4e5ecdbac8bd ("SecurityPkg: Add support for RngDxe on AARCH64") Signed-off-by: Pierre Gondois --- SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c b/Secur= ityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c index 8d44f0636c3d..8cfe6b471192 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c @@ -126,8 +126,7 @@ ArchGetSupportedRngAlgorithms ( OUT EFI_RNG_ALGORITHM *RNGAlgorithmList ) { - UINTN RequiredSize; - EFI_RNG_ALGORITHM *CpuRngSupportedAlgorithm; + UINTN RequiredSize; =20 RequiredSize =3D 2 * sizeof (EFI_RNG_ALGORITHM); =20 @@ -136,9 +135,7 @@ ArchGetSupportedRngAlgorithms ( return EFI_BUFFER_TOO_SMALL; } =20 - CpuRngSupportedAlgorithm =3D PcdGetPtr (PcdCpuRngSupportedAlgorithm); - - CopyMem (&RNGAlgorithmList[0], CpuRngSupportedAlgorithm, sizeof (EFI_RNG= _ALGORITHM)); + CopyMem (&RNGAlgorithmList[0], gEfiRngAlgorithmSp80090Ctr256Guid, sizeof= (EFI_RNG_ALGORITHM)); =20 // x86 platforms also support EFI_RNG_ALGORITHM_RAW via RDSEED CopyMem (&RNGAlgorithmList[1], &gEfiRngAlgorithmRaw, sizeof (EFI_RNG_ALG= ORITHM)); --=20 2.25.1 -=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 (#90862): https://edk2.groups.io/g/devel/message/90862 Mute This Topic: https://groups.io/mt/92066746/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-