From nobody Tue Feb 10 01:00:07 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+95696+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+95696+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1666971232; cv=none; d=zohomail.com; s=zohoarc; b=QFjF7Ul9TWfQIDRVdgLAomHGWjgRWTzMRA1Z9HcfF1y76g7jEUsOtPylgKaF5jbi0T0sXUyZmem23Y0BbPfGdfugbzBXqyau3J++A4+BjDDvdSAEgNbQNmT9KANLpSXpgLT/eIylfKLeYJoDzJeOPfegquOSxcvPZ6a/fkJ9JFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666971232; 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=qGjSWq7voFBCuPsWqXjmYZls2Gm7hca490vmI4DUwwQ=; b=j3+ccBWdOPzAJ3lYkEjbl4Ic9ML1FWQyXXkVpEscImRyypCDXcMltFsYw5YCmGNyfZJ3T55PlC4twZUSCUmp45bICJGPkG3AsBPIiIBU6EPn9qcbxXKDht9NgqxIxDx0PXOlDu8sffTzGIcAF6IGD6Y625JB9+NTb/EkI/drDYY= 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+95696+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 1666971232064664.0600238472238; Fri, 28 Oct 2022 08:33:52 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id rKijYY1788612x8UKIKN31wB; Fri, 28 Oct 2022 08:33:51 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.906.1666971230804067026 for ; Fri, 28 Oct 2022 08:33:50 -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 AF3A61FB; Fri, 28 Oct 2022 08:33:56 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.3.128]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1A9923F534; Fri, 28 Oct 2022 08:33:47 -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 v9 11/19] SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid Date: Fri, 28 Oct 2022 17:32:51 +0200 Message-Id: <20221028153259.397445-12-Pierre.Gondois@arm.com> In-Reply-To: <20221028153259.397445-1-Pierre.Gondois@arm.com> References: <20221028153259.397445-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: U3cdVecKb6wkuTUrDcYutbTpx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1666971231; bh=s9Nszxy08bFxa+pC3gjElHA6JgtNJlZhEq+x6ptmWjg=; h=Cc:Date:From:Reply-To:Subject:To; b=W6vdh7mbs61Z/65Dwcmx6E81ceE9O7xC7aSVfBL8wwrNdRQZKBDAGld1mni64zwqHV0 zaNjN/nCw9POxVt+i2F/ujolpQwBw1bZD2iAj/4e44tjIPoqe6R8MWlO4dKNq+D6It9bh qYD+qaEM5DU0MsODvXfkiE4m+wGMvb41+Ho= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1666971235291100001 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 (#95696): https://edk2.groups.io/g/devel/message/95696 Mute This Topic: https://groups.io/mt/94629258/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-