From nobody Mon Feb 9 04:29:49 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1529393216764883.0145028991807; Tue, 19 Jun 2018 00:26:56 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E7EE92112A291; Tue, 19 Jun 2018 00:26:53 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D53E821106A33 for ; Tue, 19 Jun 2018 00:26:51 -0700 (PDT) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2018 00:26:51 -0700 Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga006.jf.intel.com with ESMTP; 19 Jun 2018 00:26:51 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,242,1526367600"; d="scan'208";a="51022380" From: Dandan Bi To: edk2-devel@lists.01.org Date: Tue, 19 Jun 2018 15:24:04 +0800 Message-Id: <20180619072405.142872-9-dandan.bi@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 In-Reply-To: <20180619072405.142872-1-dandan.bi@intel.com> References: <20180619072405.142872-1-dandan.bi@intel.com> Subject: [edk2] [patch 8/9] SecurityPkg: Use new added Perf macros X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chao Zhang , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Replace old Perf macros with the new added ones. Cc: Liming Gao Cc: Chao Zhang Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi --- .../DxeRsa2048Sha256GuidedSectionExtractLib.c | 16 ++++++++----= ---- .../PeiRsa2048Sha256GuidedSectionExtractLib.c | 16 ++++++++----= ---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/Dx= eRsa2048Sha256GuidedSectionExtractLib.c b/SecurityPkg/Library/DxeRsa2048Sha= 256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c index 39768fbac22..d6f4207a506 100644 --- a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa204= 8Sha256GuidedSectionExtractLib.c +++ b/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa204= 8Sha256GuidedSectionExtractLib.c @@ -161,13 +161,13 @@ Rsa2048Sha256GuidedSectionHandler ( // Get the RSA 2048 SHA 256 information. // CertBlockRsa2048Sha256 =3D &((RSA_2048_SHA_256_SECTION2_HEADER *) Inpu= tSection)->CertBlockRsa2048Sha256; OutputBufferSize =3D SECTION2_SIZE (InputSection) - sizeof (RSA_= 2048_SHA_256_SECTION2_HEADER); if ((((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes & EFI_GUID= ED_SECTION_PROCESSING_REQUIRED) !=3D 0) { - PERF_START (NULL, "RsaCopy", "DXE", 0); + PERF_INMODULE_BEGIN ("DxeRsaCopy"); CopyMem (*OutputBuffer, (UINT8 *)InputSection + sizeof (RSA_2048_SHA= _256_SECTION2_HEADER), OutputBufferSize); - PERF_END (NULL, "RsaCopy", "DXE", 0); + PERF_INMODULE_END ("DxeRsaCopy"); } else { *OutputBuffer =3D (UINT8 *)InputSection + sizeof (RSA_2048_SHA_256_S= ECTION2_HEADER); } =20 // @@ -189,13 +189,13 @@ Rsa2048Sha256GuidedSectionHandler ( // Get the RSA 2048 SHA 256 information. // CertBlockRsa2048Sha256 =3D &((RSA_2048_SHA_256_SECTION_HEADER *)InputS= ection)->CertBlockRsa2048Sha256; OutputBufferSize =3D SECTION_SIZE (InputSection) - sizeof (RSA_2= 048_SHA_256_SECTION_HEADER); if ((((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes & EFI_GUID= ED_SECTION_PROCESSING_REQUIRED) !=3D 0) { - PERF_START (NULL, "RsaCopy", "DXE", 0); + PERF_INMODULE_BEGIN ("DxeRsaCopy"); CopyMem (*OutputBuffer, (UINT8 *)InputSection + sizeof (RSA_2048_SHA= _256_SECTION_HEADER), OutputBufferSize); - PERF_END (NULL, "RsaCopy", "DXE", 0); + PERF_INMODULE_END ("DxeRsaCopy"); } else { *OutputBuffer =3D (UINT8 *)InputSection + sizeof (RSA_2048_SHA_256_S= ECTION_HEADER); } =20 // @@ -325,13 +325,13 @@ Rsa2048Sha256GuidedSectionHandler ( if (!CryptoStatus) { DEBUG ((DEBUG_ERROR, "DxeRsa2048Sha256: Sha256Init() failed\n")); *AuthenticationStatus |=3D EFI_AUTH_STATUS_TEST_FAILED; goto Done; } - PERF_START (NULL, "RsaShaData", "DXE", 0); + PERF_INMODULE_BEGIN ("DxeRsaShaData"); CryptoStatus =3D Sha256Update (HashContext, *OutputBuffer, OutputBufferS= ize); - PERF_END (NULL, "RsaShaData", "DXE", 0); + PERF_INMODULE_END ("DxeRsaShaData"); if (!CryptoStatus) { DEBUG ((DEBUG_ERROR, "DxeRsa2048Sha256: Sha256Update() failed\n")); *AuthenticationStatus |=3D EFI_AUTH_STATUS_TEST_FAILED; goto Done; } @@ -343,19 +343,19 @@ Rsa2048Sha256GuidedSectionHandler ( } =20 // // Verify the RSA 2048 SHA 256 signature. // - PERF_START (NULL, "RsaVerify", "DXE", 0); + PERF_INMODULE_BEGIN ("DxeRsaVerify"); CryptoStatus =3D RsaPkcs1Verify ( Rsa,=20 Digest,=20 SHA256_DIGEST_SIZE,=20 CertBlockRsa2048Sha256->Signature,=20 sizeof (CertBlockRsa2048Sha256->Signature) ); - PERF_END (NULL, "RsaVerify", "DXE", 0); + PERF_INMODULE_END ("DxeRsaVerify"); if (!CryptoStatus) { // // If RSA 2048 SHA 256 signature verification fails, AUTH tested faile= d bit is set. // DEBUG ((DEBUG_ERROR, "DxeRsa2048Sha256: RsaPkcs1Verify() failed\n")); diff --git a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/Pe= iRsa2048Sha256GuidedSectionExtractLib.c b/SecurityPkg/Library/PeiRsa2048Sha= 256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c index ba1c700ad03..2272308ddca 100644 --- a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa204= 8Sha256GuidedSectionExtractLib.c +++ b/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa204= 8Sha256GuidedSectionExtractLib.c @@ -158,13 +158,13 @@ Rsa2048Sha256GuidedSectionHandler ( // Get the RSA 2048 SHA 256 information. // CertBlockRsa2048Sha256 =3D &((RSA_2048_SHA_256_SECTION2_HEADER *) Inpu= tSection)->CertBlockRsa2048Sha256; OutputBufferSize =3D SECTION2_SIZE (InputSection) - sizeof (RSA_= 2048_SHA_256_SECTION2_HEADER); if ((((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes & EFI_GUID= ED_SECTION_PROCESSING_REQUIRED) !=3D 0) { - PERF_START (NULL, "RsaCopy", "PEI", 0); + PERF_INMODULE_BEGIN ("PeiRsaCopy"); CopyMem (*OutputBuffer, (UINT8 *)InputSection + sizeof (RSA_2048_SHA= _256_SECTION2_HEADER), OutputBufferSize); - PERF_END (NULL, "RsaCopy", "PEI", 0); + PERF_INMODULE_END ("PeiRsaCopy"); } else { *OutputBuffer =3D (UINT8 *)InputSection + sizeof (RSA_2048_SHA_256_S= ECTION2_HEADER); } =20 // @@ -186,13 +186,13 @@ Rsa2048Sha256GuidedSectionHandler ( // Get the RSA 2048 SHA 256 information. // CertBlockRsa2048Sha256 =3D &((RSA_2048_SHA_256_SECTION_HEADER *)InputS= ection)->CertBlockRsa2048Sha256; OutputBufferSize =3D SECTION_SIZE (InputSection) - sizeof (RSA_2= 048_SHA_256_SECTION_HEADER); if ((((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes & EFI_GUID= ED_SECTION_PROCESSING_REQUIRED) !=3D 0) { - PERF_START (NULL, "RsaCopy", "PEI", 0); + PERF_INMODULE_BEGIN ("PeiRsaCopy"); CopyMem (*OutputBuffer, (UINT8 *)InputSection + sizeof (RSA_2048_SHA= _256_SECTION_HEADER), OutputBufferSize); - PERF_END (NULL, "RsaCopy", "PEI", 0); + PERF_INMODULE_END ("PeiRsaCopy"); } else { *OutputBuffer =3D (UINT8 *)InputSection + sizeof (RSA_2048_SHA_256_S= ECTION_HEADER); } =20 // @@ -309,13 +309,13 @@ Rsa2048Sha256GuidedSectionHandler ( if (!CryptoStatus) { DEBUG ((DEBUG_ERROR, "PeiRsa2048Sha256: Sha256Init() failed\n")); *AuthenticationStatus |=3D EFI_AUTH_STATUS_TEST_FAILED; goto Done; } - PERF_START (NULL, "RsaShaData", "PEI", 0); + PERF_INMODULE_BEGIN ("PeiRsaShaData"); CryptoStatus =3D Sha256Update (HashContext, *OutputBuffer, OutputBufferS= ize); - PERF_END (NULL, "RsaShaData", "PEI", 0); + PERF_INMODULE_END ("PeiRsaShaData"); if (!CryptoStatus) { DEBUG ((DEBUG_ERROR, "PeiRsa2048Sha256: Sha256Update() failed\n")); *AuthenticationStatus |=3D EFI_AUTH_STATUS_TEST_FAILED; goto Done; } @@ -327,19 +327,19 @@ Rsa2048Sha256GuidedSectionHandler ( } =20 // // Verify the RSA 2048 SHA 256 signature. // - PERF_START (NULL, "RsaVerify", "PEI", 0); + PERF_INMODULE_BEGIN ("PeiRsaVerify"); CryptoStatus =3D RsaPkcs1Verify ( Rsa,=20 Digest,=20 SHA256_DIGEST_SIZE,=20 CertBlockRsa2048Sha256->Signature,=20 sizeof (CertBlockRsa2048Sha256->Signature) ); - PERF_END (NULL, "RsaVerify", "PEI", 0); + PERF_INMODULE_END ("PeiRsaVerify"); if (!CryptoStatus) { // // If RSA 2048 SHA 256 signature verification fails, AUTH tested faile= d bit is set. // DEBUG ((DEBUG_ERROR, "PeiRsa2048Sha256: RsaPkcs1Verify() failed\n")); --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel