From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.4871.1658400692546128979 for ; Thu, 21 Jul 2022 03:51:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ZGBoEkn+; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658400692; x=1689936692; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ty8GTfa5vbtivrrOg3Vw+9jC5AuSx4idi1xXMJzZ+xs=; b=ZGBoEkn+4Wd8+NB/I8ohA+cX+cqSDZ9pxg+Q8jdggmKdzfR4Ob9+OddV ffjeigaW5ObCBeOxw7xzAaxaf/B84vD/nYQkBlILCydC6jEhLJ1JPks0V H0UwjKHDNJ6q4fJjD4h61pdousUYe8hHA8ggBLTDIhkl4ouvaaefYtCYm 6HcoPwzgMJ9Xl4L3KFYlIqPFCX1jbKVgQjbhfOwcVmdvYzj0LYmbeqzVN 0NpFm23WhM9KLGwRs1C2sryCtthp7ecPPYgkJ11QJvMwM15EY3Sxxqe2q 518xp3KREwxleXy/pRkyVgZneDMhjTY0dkMZI5JYiIeosZE30TBCwkNm5 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10414"; a="267410800" X-IronPort-AV: E=Sophos;i="5.92,289,1650956400"; d="scan'208";a="267410800" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2022 03:51:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,289,1650956400"; d="scan'208";a="740633659" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga001.fm.intel.com with ESMTP; 21 Jul 2022 03:51:10 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 21 Jul 2022 03:51:10 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 21 Jul 2022 03:51:09 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Thu, 21 Jul 2022 03:51:09 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 21 Jul 2022 03:51:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jefXMpLoTgsHapKcN+gBnEV6N42xFzzGjGG/8YV+znyl99bstmU+N7N1OR8hiRIJ/Rlfp1Wee+KLnI9r9nOJ5qAjYU30zAlF+XVcf+cx4KjUN31kqdrVuQgESd1UxYX7VmFo8d2Sc7qJ1JN9i9vWGuEZ9pg9EnREmXG0A3b1asFrOsOBNI22HslaX5xnmZcnYquYzu5SKr6YgqX5Rqw2BVLK2MVKV5qnvTjH3UQCD0oBqoplZ9xZMl4vyHteF4qUJAMSBjtPHl9FuL1UCI/eCPlFX/ffltn2U/HARHGhvTttLtCTMbeUZEJTTLpRdMLqDsLerZy9MIweB/zyKh4m3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VAzRLheLxlBwumCgm0FbzNYdWnWynnJxJDSQLyNTfMc=; b=KwduqKye9Ak2MLrKKqE/0vb4Ma2iKxBYLnqSZhHUNh2VtXssOTgv5AJuTEaA+DdRCykYZMmbPkr3d4qzX8Cxh2Wr9AeeUD91xKfFiZJJv/2mGffda2HqrPcmGrgnghWP0klHS+30Bfcpje62oVb3seJr2hEOWsHqVeyKOuWZoHKdpMKvNJb/tj1nE2FEQmTwrZ3i0TuGVjBPXWgN+Y/y/hSMZM65aTt5tkbBdgfWGYqHBDpdyEu3QOP08CNIrJMpSda85+L1xiN5HMe9d5/O9vcCeKaFb9A8/zPCpTU3Y9gvZ/+mXJfczrkCRcybKN6TtSqh8/2Y9QW/Zl2JHQe9MQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by DM4PR11MB5535.namprd11.prod.outlook.com (2603:10b6:5:398::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Thu, 21 Jul 2022 10:51:07 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::fd61:b244:d8fb:ab1d]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::fd61:b244:d8fb:ab1d%5]) with mapi id 15.20.5458.018; Thu, 21 Jul 2022 10:51:07 +0000 From: "Yao, Jiewen" To: "Pierre.Gondois@arm.com" , "devel@edk2.groups.io" CC: Sami Mujawar , Leif Lindholm , Ard Biesheuvel , Rebecca Cran , "Kinney, Michael D" , "Gao, Liming" , "Wang, Jian J" Subject: Re: [PATCH v3 14/22] SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid Thread-Topic: [PATCH v3 14/22] SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid Thread-Index: AQHYi8mXfv+fqxjzNEm2fQhkHkQtNa2Ix7zQ Date: Thu, 21 Jul 2022 10:51:07 +0000 Message-ID: References: <20220629150241.2597898-1-Pierre.Gondois@arm.com> <20220629150241.2597898-18-Pierre.Gondois@arm.com> In-Reply-To: <20220629150241.2597898-18-Pierre.Gondois@arm.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4fce5d7a-1245-42e0-6740-08da6b06ea47 x-ms-traffictypediagnostic: DM4PR11MB5535:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hnacsCd9V1cXhMHYWmm+rWz78P2ocP4+o5dWxTJD4LR3xfS56tzlzgRUb14jz7iXw/NHeNx5Ukn1SG1Lsdr219j0kFDYxE3rMkMz1jAYYEPL0HIM+6TDM85MOhPqo7AeUNJk22UPTZY6nppGBX5Rktyi8l+D9NLxrlpnb7C8TiaWndJmsS9yoXOBd60a484CJjLE7V3Zjy5ShVRo/Hixpi9/Okt9Fj3Opy8SuC71ojRV7BYlYZc2t/t1sxt+6YbI1eg1nm9Ua8b1w1zUPQ3Mki6fzmZNJWB+KU++eGyAUzciUki/9GSf+GSu5IT4NH9xvLsDsQ1fFpDT5ex6skHKJ7BWxoSlNjxeb4MF+9cO3j2OYcP/soMfYOMgN9reEtqUVckf8juaPeiVuS5ZmCtdlLWXZ2QzeE5dfQYGdTMn6Jq+ve/IKrziDKKXwTT07KhACYcnrs7OmyK+uvT1Oco69cTVyLK7YPv9NJHP7+b0NRTgjAU1PlIINKrWnblDTxXQXB2qI4FOzmrBl4X4J4pRPRvqQiiPsstcBShSbA1Z/bX2vd1dXRyVlWfulJ4qUtesO4d/od4ZtHlNM1Q+/sOs2sd7aFTt7TZKG+59jn/SyhldydNwPgXew8Ums44oe5GLeKRC0uQOiIBAt9HglSFxJRSvWKEOlV1EuLTZdZNhdqUMI34oprQdNymjiidEny5pXrROPyNcGPxHw3tbIQRS/U/sW1sPnZuG26FObO3l/6W56vWaGDTrgh/n2CSAIoX0Dqw3+UImKjno+5HhtBjNcPygSWNo7rojQs4mklTbVhiSGEHYB044EZXMbkJyEwkI x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(136003)(346002)(366004)(39860400002)(376002)(110136005)(2906002)(54906003)(66446008)(9686003)(83380400001)(64756008)(66476007)(26005)(316002)(66556008)(19627235002)(66946007)(55016003)(8676002)(186003)(15650500001)(76116006)(86362001)(52536014)(33656002)(8936002)(122000001)(41300700001)(38100700002)(7696005)(38070700005)(53546011)(6506007)(4326008)(107886003)(5660300002)(478600001)(82960400001)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?POLrtYjb5i2LMEOeBty75CbJOlogjGlKl/Mw78+6cDAERmXsHoh3IRKzOWsZ?= =?us-ascii?Q?A5CHhITZmTtsBzKS5JyOwXAX9PEWdc+oOvf5ZIrXxk+d5cVPMXyiAq3Brs1g?= =?us-ascii?Q?gfIViZxTnVSDB9yXWlUcWvbz9P8EVxK9gxzL6EIbp9/n5JEHG+fWIQ4R36Vr?= =?us-ascii?Q?6m4bKaghhtzZNhvpmnOKjXzRDDSRwG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?Q?Mly2Rro23tB/0qdovzjPomdIIce+DHqHMXY3i6mkZN+/eFDhQudQ9yCKW82O?= =?us-ascii?Q?VoBDw4rRrRUhW+SijtXNBsSWhWxmZAHChzw6DbR3lSd1wX6BGw7t3n4084s7?= =?us-ascii?Q?JwmKxExyNWMkmD3CBWS5au1OmBdJtvzKiN1LRl6oXfAiElGJSiDRfCPShZyJ?= =?us-ascii?Q?wmAseJ8m6a3vihBaIrwIBJDjurnhOHP4axtEYB193MKVDbX0m2mm5ANJNLWN?= =?us-ascii?Q?HZArqQmupQN7mfLTYZ/Hloc7+7A0XRGsw8cZOlbxBQawQlZpTwwm0O8Ku9CC?= =?us-ascii?Q?ZdpT/1/dc58GDkzALIB+pNzgGLyaH6u0FVYhBb/gCjzsKK4nlLlEYQOH+HmR?= =?us-ascii?Q?U3UpExVwlylTvCoNw9EPUIjlRPBMIfRCWdE7tisABVAITJyTMQkMX0hqQPWk?= =?us-ascii?Q?IgfMVaWvbwdGYzfayVekWoc96opciugtxBf1kDP3ypL/m7k/Lo24huFYeQNF?= =?us-ascii?Q?5Rjr3bq+fDKdtfoFd08W/k6ME7ofcQQD6t9ZRImQ?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fce5d7a-1245-42e0-6740-08da6b06ea47 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2022 10:51:07.0401 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OAkqDwacB0+M5n/riSmL1qCDof+Q4EOBn6KTKOuJN6ze6Wc7I/7rWssAl+W5rbSWobJU4LiWVRFtY+Rop0ligA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5535 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable + CopyMem (&RNGAlgorithmList[0], gEfiRngAlgorithmSp80090Ctr256Guid, sizeof= (EFI_RNG_ALGORITHM)); Should it be &gEfiRngAlgorithmSp80090Ctr256Guid ? The dereference is missin= g. Thank you Yao Jiewen > -----Original Message----- > From: Pierre.Gondois@arm.com > Sent: Wednesday, June 29, 2022 11:02 PM > To: devel@edk2.groups.io > Cc: Sami Mujawar ; Leif Lindholm > ; Ard Biesheuvel ; > Rebecca Cran ; Kinney, Michael D > ; Gao, Liming ; Yao= , > Jiewen ; Wang, Jian J > Subject: [PATCH v3 14/22] SecurityPkg/RngDxe: Replace Pcd with > Sp80090Ctr256Guid >=20 > From: Pierre Gondois >=20 > 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. >=20 > 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. >=20 > 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(-) >=20 > diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c > b/SecurityPkg/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_ALGORITHM)); > -- > 2.25.1