From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: jian.j.wang@intel.com) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Thu, 16 May 2019 22:16:12 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 May 2019 22:16:11 -0700 X-ExtLoop1: 1 Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 16 May 2019 22:16:11 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 16 May 2019 22:16:08 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 16 May 2019 22:16:07 -0700 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.7]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.216]) with mapi id 14.03.0415.000; Fri, 17 May 2019 13:16:06 +0800 From: "Wang, Jian J" To: "Gao, Liming" , "devel@edk2.groups.io" CC: "Kinney, Michael D" , "Ye, Ting" Subject: Re: [PATCH] CryptoPkg/BaseCryptLib: remove unused code for IPF Thread-Topic: [PATCH] CryptoPkg/BaseCryptLib: remove unused code for IPF Thread-Index: AQHVCmGYmTl99I+Vwk+naOSCLkzYVKZuhizAgABEPqA= Date: Fri, 17 May 2019 05:16:05 +0000 Message-ID: References: <20190514143000.486176-1-jian.j.wang@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E44C21E@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E44C21E@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2U3MzQyNDktMmE1Yi00NWY5LThiNDAtN2JhNjAzYmNjMmJhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieElRY1REcndySk1IUml4cm1WcUZkaHFOTExzZFY4SVRYQmV5TExaSzJ3Sk81NXgxRWF4bnl3a29aY1ZDYTh1ZCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: jian.j.wang@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks. Pushed at c2eab535c6790b8db5e9039e3d8886980b390389. Regards, Jian > -----Original Message----- > From: Gao, Liming > Sent: Friday, May 17, 2019 9:12 AM > To: Wang, Jian J ; devel@edk2.groups.io > Cc: Kinney, Michael D ; Ye, Ting > > Subject: RE: [PATCH] CryptoPkg/BaseCryptLib: remove unused code for IPF >=20 > I see no module consumes this source file. >=20 > The change is good. Reviewed-by: Liming Gao >=20 > >-----Original Message----- > >From: Wang, Jian J > >Sent: Tuesday, May 14, 2019 10:30 PM > >To: devel@edk2.groups.io > >Cc: Gao, Liming ; Kinney, Michael D > >; Ye, Ting > >Subject: [PATCH] CryptoPkg/BaseCryptLib: remove unused code for IPF > > > >BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1805 > > > >CryptRandItc.c is only for IPF arch, which has not been supported any > >more in edk2. And no module actually reference this file. This patch > >just removes it from tree. > > > >Cc: Liming Gao > >Cc: Michael D Kinney > >Cc: Ting Ye > >Signed-off-by: Jian J Wang > >--- > > .../Library/BaseCryptLib/Rand/CryptRandItc.c | 112 ------------------ > > 1 file changed, 112 deletions(-) > > delete mode 100644 CryptoPkg/Library/BaseCryptLib/Rand/CryptRandItc.c > > > >diff --git a/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandItc.c > >b/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandItc.c > >deleted file mode 100644 > >index 8699cfeb71..0000000000 > >--- a/CryptoPkg/Library/BaseCryptLib/Rand/CryptRandItc.c > >+++ /dev/null > >@@ -1,112 +0,0 @@ > >-/** @file > >- Pseudorandom Number Generator Wrapper Implementation over OpenSSL. > >- > >-Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
> >-SPDX-License-Identifier: BSD-2-Clause-Patent > >- > >-**/ > >- > >-#include "InternalCryptLib.h" > >-#include > >-#include > >-#include > >- > >-/** > >- Sets up the seed value for the pseudorandom number generator. > >- > >- This function sets up the seed value for the pseudorandom number > >generator. > >- If Seed is not NULL, then the seed passed in is used. > >- If Seed is NULL, then default seed is used. > >- > >- @param[in] Seed Pointer to seed value. > >- If NULL, default seed is used. > >- @param[in] SeedSize Size of seed value. > >- If Seed is NULL, this parameter is ignored. > >- > >- @retval TRUE Pseudorandom number generator has enough entropy for > >random generation. > >- @retval FALSE Pseudorandom number generator does not have enough > >entropy for random generation. > >- > >-**/ > >-BOOLEAN > >-EFIAPI > >-RandomSeed ( > >- IN CONST UINT8 *Seed OPTIONAL, > >- IN UINTN SeedSize > >- ) > >-{ > >- CHAR8 DefaultSeed[128]; > >- > >- if (SeedSize > INT_MAX) { > >- return FALSE; > >- } > >- > >- // > >- // The software PRNG implementation built in OpenSSL depends on > >message digest algorithm. > >- // Make sure SHA-1 digest algorithm is available here. > >- // > >- if (EVP_add_digest (EVP_sha1 ()) =3D=3D 0) { > >- return FALSE; > >- } > >- > >- // > >- // Seed the pseudorandom number generator with user-supplied value. > >- // NOTE: A cryptographic PRNG must be seeded with unpredictable data. > >- // > >- if (Seed !=3D NULL) { > >- RAND_seed (Seed, (UINT32) SeedSize); > >- } else { > >- // > >- // Retrieve current time. > >- // > >- AsciiSPrint ( > >- DefaultSeed, > >- sizeof (DefaultSeed), > >- "UEFI Crypto Library default seed (%ld)", > >- AsmReadItc () > >- ); > >- > >- RAND_seed (DefaultSeed, sizeof (DefaultSeed)); > >- } > >- > >- if (RAND_status () =3D=3D 1) { > >- return TRUE; > >- } > >- > >- return FALSE; > >-} > >- > >-/** > >- Generates a pseudorandom byte stream of the specified size. > >- > >- If Output is NULL, then return FALSE. > >- > >- @param[out] Output Pointer to buffer to receive random value. > >- @param[in] Size Size of random bytes to generate. > >- > >- @retval TRUE Pseudorandom byte stream generated successfully. > >- @retval FALSE Pseudorandom number generator fails to generate due to > >lack of entropy. > >- > >-**/ > >-BOOLEAN > >-EFIAPI > >-RandomBytes ( > >- OUT UINT8 *Output, > >- IN UINTN Size > >- ) > >-{ > >- // > >- // Check input parameters. > >- // > >- if (Output =3D=3D NULL || Size > INT_MAX) { > >- return FALSE; > >- } > >- > >- // > >- // Generate random data. > >- // > >- if (RAND_bytes (Output, (UINT32) Size) !=3D 1) { > >- return FALSE; > >- } > >- > >- return TRUE; > >-} > >-- > >2.17.1.windows.2