From nobody Tue Feb 10 11:56:28 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+95327+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+95327+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1666099850; cv=none; d=zohomail.com; s=zohoarc; b=D+F1Edh7APoUakk0hbhsiEc6Tm1iIpU7YuibV4pC5oEEkgCEm8ULWh+Smn1GA69a3JRz6aqH8Ynx/exIzbuWbzx2c9Qwz6JacT3ijuRH56wBbjwkUt/rYF7Pe2IcbzzwKf9kWNVTI67xIOiF70yh59dI1hFG5WFeftgJED9vs1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666099850; 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=wzWMF9j2tR+3XYqru3bBEpIUqW9gci/kMo+JOHQw+dE=; b=NOh3wFMauS5ZYA6zjp69MLjyn/c0UkzjaZYW1+FNUgZn5IXudx9U+Ebo48dp/ztRjzCOzf1+VkRoHRBQLPlE7n4/ukjwE2J75zTht/3n+mDMT/VANeDb3yZR3DVU5N95tuihAYA6hxGq/DAjsCPsyCLrvEY9jkB2p+fE1g4cH/Y= 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+95327+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 1666099850137420.4898162604446; Tue, 18 Oct 2022 06:30:50 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3lElYY1788612xUPwwpraJ38; Tue, 18 Oct 2022 06:30:49 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.6889.1666099848958240471 for ; Tue, 18 Oct 2022 06:30:49 -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 CDCAD1758; Tue, 18 Oct 2022 06:30:54 -0700 (PDT) X-Received: from pierre123.arm.com (pierre123.nice.arm.com [10.34.100.128]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3C09F3F792; Tue, 18 Oct 2022 06:30: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 v8 11/19] SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid Date: Tue, 18 Oct 2022 15:20:44 +0200 Message-Id: <20221018132052.1359530-12-Pierre.Gondois@arm.com> In-Reply-To: <20221018132052.1359530-1-Pierre.Gondois@arm.com> References: <20221018132052.1359530-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: wAQdMLi0VGBCEBRMQ79eSavpx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1666099849; bh=aauCgY1F7jF75r9U2czPQVOgkhJ5O8Lp1ZLaPc87kag=; h=Cc:Date:From:Reply-To:Subject:To; b=BWITYd365+zsMahSEMWSGq8XodtDg/N04ROjmkzstkfJ2TxxtqLOECByZiQCxy80qlo sQantg19svLNHljCyTEctj8CMeifEwZ2rzbhMNKPEIaCYGMQjLgmQZ/HTuOj95clnp4T1 GZsNdA4e9rd+91EpxZpOiS/LLad1GUbz+U0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1666099851543100045 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 --- Notes: v4: - Fix: Correctly reference gEfiRngAlgorithmSp80090Ctr256Guid Guid by copying its address (add missing '&'). [Jiewen] 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 (#95327): https://edk2.groups.io/g/devel/message/95327 Mute This Topic: https://groups.io/mt/94407753/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-