HI Dandan : That patch is good to me. Reviewed-by: Chao Zhang <chao.b.zh...@intel.com> -----Original Message----- From: Bi, Dandan Sent: Friday, June 22, 2018 4:56 PM To: edk2-devel@lists.01.org Cc: Gao, Liming <liming....@intel.com>; Zhang, Chao B <chao.b.zh...@intel.com> Subject: [patch V2 8/9] SecurityPkg: Use new added Perf macros
Replace old Perf macros with the new added ones. Cc: Liming Gao <liming....@intel.com> Cc: Chao Zhang <chao.b.zh...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan...@intel.com> --- .../DxeRsa2048Sha256GuidedSectionExtractLib.c | 16 ++++++++-------- .../PeiRsa2048Sha256GuidedSectionExtractLib.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c b/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c index 39768fbac22..d6f4207a506 100644 --- a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c +++ b/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa +++ 2048Sha256GuidedSectionExtractLib.c @@ -161,13 +161,13 @@ Rsa2048Sha256GuidedSectionHandler ( // Get the RSA 2048 SHA 256 information. // CertBlockRsa2048Sha256 = &((RSA_2048_SHA_256_SECTION2_HEADER *) InputSection)->CertBlockRsa2048Sha256; OutputBufferSize = SECTION2_SIZE (InputSection) - sizeof (RSA_2048_SHA_256_SECTION2_HEADER); if ((((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 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 = (UINT8 *)InputSection + sizeof (RSA_2048_SHA_256_SECTION2_HEADER); } // @@ -189,13 +189,13 @@ Rsa2048Sha256GuidedSectionHandler ( // Get the RSA 2048 SHA 256 information. // CertBlockRsa2048Sha256 = &((RSA_2048_SHA_256_SECTION_HEADER *)InputSection)->CertBlockRsa2048Sha256; OutputBufferSize = SECTION_SIZE (InputSection) - sizeof (RSA_2048_SHA_256_SECTION_HEADER); if ((((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 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 = (UINT8 *)InputSection + sizeof (RSA_2048_SHA_256_SECTION_HEADER); } // @@ -325,13 +325,13 @@ Rsa2048Sha256GuidedSectionHandler ( if (!CryptoStatus) { DEBUG ((DEBUG_ERROR, "DxeRsa2048Sha256: Sha256Init() failed\n")); *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED; goto Done; } - PERF_START (NULL, "RsaShaData", "DXE", 0); + PERF_INMODULE_BEGIN ("DxeRsaShaData"); CryptoStatus = Sha256Update (HashContext, *OutputBuffer, OutputBufferSize); - PERF_END (NULL, "RsaShaData", "DXE", 0); + PERF_INMODULE_END ("DxeRsaShaData"); if (!CryptoStatus) { DEBUG ((DEBUG_ERROR, "DxeRsa2048Sha256: Sha256Update() failed\n")); *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED; goto Done; } @@ -343,19 +343,19 @@ Rsa2048Sha256GuidedSectionHandler ( } // // Verify the RSA 2048 SHA 256 signature. // - PERF_START (NULL, "RsaVerify", "DXE", 0); + PERF_INMODULE_BEGIN ("DxeRsaVerify"); CryptoStatus = RsaPkcs1Verify ( Rsa, Digest, SHA256_DIGEST_SIZE, CertBlockRsa2048Sha256->Signature, 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 failed bit is set. // DEBUG ((DEBUG_ERROR, "DxeRsa2048Sha256: RsaPkcs1Verify() failed\n")); diff --git a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c b/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c index ba1c700ad03..2272308ddca 100644 --- a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c +++ b/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa +++ 2048Sha256GuidedSectionExtractLib.c @@ -158,13 +158,13 @@ Rsa2048Sha256GuidedSectionHandler ( // Get the RSA 2048 SHA 256 information. // CertBlockRsa2048Sha256 = &((RSA_2048_SHA_256_SECTION2_HEADER *) InputSection)->CertBlockRsa2048Sha256; OutputBufferSize = SECTION2_SIZE (InputSection) - sizeof (RSA_2048_SHA_256_SECTION2_HEADER); if ((((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 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 = (UINT8 *)InputSection + sizeof (RSA_2048_SHA_256_SECTION2_HEADER); } // @@ -186,13 +186,13 @@ Rsa2048Sha256GuidedSectionHandler ( // Get the RSA 2048 SHA 256 information. // CertBlockRsa2048Sha256 = &((RSA_2048_SHA_256_SECTION_HEADER *)InputSection)->CertBlockRsa2048Sha256; OutputBufferSize = SECTION_SIZE (InputSection) - sizeof (RSA_2048_SHA_256_SECTION_HEADER); if ((((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 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 = (UINT8 *)InputSection + sizeof (RSA_2048_SHA_256_SECTION_HEADER); } // @@ -309,13 +309,13 @@ Rsa2048Sha256GuidedSectionHandler ( if (!CryptoStatus) { DEBUG ((DEBUG_ERROR, "PeiRsa2048Sha256: Sha256Init() failed\n")); *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED; goto Done; } - PERF_START (NULL, "RsaShaData", "PEI", 0); + PERF_INMODULE_BEGIN ("PeiRsaShaData"); CryptoStatus = Sha256Update (HashContext, *OutputBuffer, OutputBufferSize); - PERF_END (NULL, "RsaShaData", "PEI", 0); + PERF_INMODULE_END ("PeiRsaShaData"); if (!CryptoStatus) { DEBUG ((DEBUG_ERROR, "PeiRsa2048Sha256: Sha256Update() failed\n")); *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED; goto Done; } @@ -327,19 +327,19 @@ Rsa2048Sha256GuidedSectionHandler ( } // // Verify the RSA 2048 SHA 256 signature. // - PERF_START (NULL, "RsaVerify", "PEI", 0); + PERF_INMODULE_BEGIN ("PeiRsaVerify"); CryptoStatus = RsaPkcs1Verify ( Rsa, Digest, SHA256_DIGEST_SIZE, CertBlockRsa2048Sha256->Signature, 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 failed bit is set. // DEBUG ((DEBUG_ERROR, "PeiRsa2048Sha256: RsaPkcs1Verify() failed\n")); -- 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel