From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 82F7E82095 for ; Wed, 8 Feb 2017 20:44:29 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 08 Feb 2017 20:44:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,349,1484035200"; d="scan'208";a="223104126" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 08 Feb 2017 20:44:29 -0800 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Feb 2017 20:44:28 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Feb 2017 20:44:28 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Thu, 9 Feb 2017 12:44:26 +0800 From: "Zeng, Star" To: "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [Patch 1/2] MdeModulePkg PeiCore: Reset PeimNeedingDispatch when its security violation Thread-Index: AQHSgosZe1SUf/C0M022xZNrEafdDqFgGBXg Date: Thu, 9 Feb 2017 04:44:26 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B8250DF@shsmsx102.ccr.corp.intel.com> References: <1486613692-11076-1-git-send-email-liming.gao@intel.com> <1486613692-11076-2-git-send-email-liming.gao@intel.com> In-Reply-To: <1486613692-11076-2-git-send-email-liming.gao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 1/2] MdeModulePkg PeiCore: Reset PeimNeedingDispatch when its security violation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2017 04:44:29 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng to this change. How about to also move the code blocks below into the "if (Status !=3D EFI_= SECURITY_VIOLATION) {" to follow PI Spec? PERF_START (PeimFileHandle, "PEIM", NULL, 0); REPORT_STATUS_CODE_WITH_EXTENDED_DATA ( EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_BEGIN), (VOID *)(&PeimFileHandle), sizeof (PeimFileHandle) ); REPORT_STATUS_CODE_WITH_EXTENDED_DATA ( EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_END), (VOID *)(&PeimFileHandle), sizeof (PeimFileHandle) ); PERF_END (PeimFileHandle, "PEIM", NULL, 0); PI Spec: EFI_SW_PC_INIT_BEGIN Initializing software module by using StartImage() or an equivalent PEI ser= vice. Thanks, Star -----Original Message----- From: Gao, Liming=20 Sent: Thursday, February 9, 2017 12:15 PM To: edk2-devel@lists.01.org Cc: Zeng, Star Subject: [Patch 1/2] MdeModulePkg PeiCore: Reset PeimNeedingDispatch when i= ts security violation When PEIM is security violation, its matched extraction ppi may not be inst= alled. So, its PeimNeedingDispatch will still reset to TRUE. Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/Pei/Dispatcher/Dispatcher.c index 3934ed0..ff43a90 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -1,7 +1,7 @@ /** @file EFI PEI Core dispatch services =20 -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This pro= gram and the accompanying materials are licensed and made available under = the terms and conditions of the BSD License @@ -1111,6 +1111,13 @@ PeiDispa= tcher ( PeimEntryPoint =3D (EFI_PEIM_ENTRY_POINT2)(UINTN)EntryPo= int; PeimEntryPoint (PeimFileHandle, (const EFI_PEI_SERVICES = **) PeiServices); Private->PeimDispatchOnThisPass =3D TRUE; + } else { + // + // The related GuidedSectionExtraction PPI for the + // signed PEIM image section may be installed in the res= t + // of this do-while loop, so need to make another pass. + // + Private->PeimNeedingDispatch =3D TRUE; } =20 REPORT_STATUS_CODE_WITH_EXTENDED_DATA ( -- 2.8.0.windows.1