From nobody Wed Feb 11 06:50:26 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+94587+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+94587+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1664553971; cv=none; d=zohomail.com; s=zohoarc; b=bqL7eUNRtOVKErI2LBeP39D/opf/Z3jNsCTn9BJe5O6AYQUM1Pqdt86vX6IQkCQ4j5mTRS5OP0YHUEa4OTCQesA1MF86O9ExnxWbgm3gl60+FuGx4ma5J1ob9hko0WOcTdm+e2BClVSdTOMepPc1+cHxIfJKZYQ9qY/LV+VGPKM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664553971; 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=0WAJlIeskbJexLo4X8m4KkIB3yFMV+KfFo6d2fRxs+M=; b=h7AFjR8/4ta20HAWwxqVWjwlrEI/Mm3a87Wrwd+xUbJJnj7GU9HcuReHORtJmDWcJc3wCorqKQiT5RZsLXaN5gBw1rMElpByAeVCdq3o2IZWK2DKppsVR0rpNuH+nxExajpdvzU693RxbNvHcqc+xtAhZfBMmAEjJxZqvDgiJLc= 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+94587+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 1664553971265676.6786092692464; Fri, 30 Sep 2022 09:06:11 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id RTxOYY1788612xjVEKzTr3Jo; Fri, 30 Sep 2022 09:06:10 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.777.1664553970012533783 for ; Fri, 30 Sep 2022 09:06:10 -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 6573E1424; Fri, 30 Sep 2022 09:06:16 -0700 (PDT) X-Received: from pierre123.nice.arm.com (pierre123.nice.arm.com [10.34.100.116]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5033C3F792; Fri, 30 Sep 2022 09:06:08 -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 v6 11/19] SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid Date: Fri, 30 Sep 2022 18:05:24 +0200 Message-Id: <20220930160532.2921381-12-Pierre.Gondois@arm.com> In-Reply-To: <20220930160532.2921381-1-Pierre.Gondois@arm.com> References: <20220930160532.2921381-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: PkiaDHeGN05XZttYJ7Bvg4Zyx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1664553970; bh=2B+8kKpvAp0jQkn85j5HGA9O8n0jEzLC0UcjSbQq84E=; h=Cc:Date:From:Reply-To:Subject:To; b=UkkwQM/GsziB+o52xvQ/iz96qLai9cbjFmJJxbEJOqCJMI5D22DCqGxlBKEfZssyzBL oxBdQOrTXb0n7+/ioFBdDmjouaq6poMhHtl6DgvLabOFI8TIo32Ij8NnrON/Gc9ISusIo GyYP/WnuoEeZBlmM4hNy6+8aUWxbfqmcdtA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1664553972812100030 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..df7db12b771c 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, sizeo= f (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 (#94587): https://edk2.groups.io/g/devel/message/94587 Mute This Topic: https://groups.io/mt/94020036/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-