From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 3354B81D77 for ; Wed, 8 Feb 2017 20:40:06 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP; 08 Feb 2017 20:40:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,349,1484035200"; d="scan'208";a="62549205" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga005.jf.intel.com with ESMTP; 08 Feb 2017 20:40:05 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Feb 2017 20:40:05 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Feb 2017 20:40:05 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Thu, 9 Feb 2017 12:40:03 +0800 From: "Zeng, Star" To: "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [Patch 2/2] MdeModulePkg PeiCore: Don't cache GUIDED section with AUTH_NOT_TESTED Thread-Index: AQHSgosbL+d6ENY3X0iUiI7C5h4QOaFgF9DQ Date: Thu, 9 Feb 2017 04:40:02 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B8250C1@shsmsx102.ccr.corp.intel.com> References: <1486613692-11076-1-git-send-email-liming.gao@intel.com> <1486613692-11076-3-git-send-email-liming.gao@intel.com> In-Reply-To: <1486613692-11076-3-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 2/2] MdeModulePkg PeiCore: Don't cache GUIDED section with AUTH_NOT_TESTED 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:40:06 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----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 2/2] MdeModulePkg PeiCore: Don't cache GUIDED section with = AUTH_NOT_TESTED If GUIDED section authentication has EFI_AUTH_STATUS_NOT_TESTED, its matche= d extraction ppi may not be installed. So, don't cache its data. Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- MdeModulePkg/Core/Pei/FwVol/FwVol.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/Fw= Vol/FwVol.c index 8d07bd0..0bbb86d 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -2,7 +2,7 @@ Pei Core Firmware File System service routines. =20 Copyright (c) 2015 HP Development Company, L.P. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials =20 are licensed and made available under the terms and conditions of the BSD = License =20 which accompanies this distribution. The full text of the license may be = found at =20 @@ -913,17 +913,19 @@ ProcessSection ( } =20 if (!EFI_ERROR (Status)) { - // - // Update cache section data. - // - if (PrivateData->CacheSection.AllSectionCount < CACHE_SETION_MAX= _NUMBER) { - PrivateData->CacheSection.AllSectionCount ++; + if ((Authentication & EFI_AUTH_STATUS_NOT_TESTED) =3D=3D 0) { + // + // Update cache section data. + // + if (PrivateData->CacheSection.AllSectionCount < CACHE_SETION_M= AX_NUMBER) { + PrivateData->CacheSection.AllSectionCount ++; + } + PrivateData->CacheSection.Section [PrivateData->CacheSection.S= ectionIndex] =3D Section; + PrivateData->CacheSection.SectionData [PrivateData->CacheSecti= on.SectionIndex] =3D PpiOutput; + PrivateData->CacheSection.SectionSize [PrivateData->CacheSecti= on.SectionIndex] =3D PpiOutputSize; + PrivateData->CacheSection.AuthenticationStatus [PrivateData->C= acheSection.SectionIndex] =3D Authentication; + PrivateData->CacheSection.SectionIndex =3D=20 + (PrivateData->CacheSection.SectionIndex + 1)%CACHE_SETION_MAX_NUMBER; } - PrivateData->CacheSection.Section [PrivateData->CacheSection.Sec= tionIndex] =3D Section; - PrivateData->CacheSection.SectionData [PrivateData->CacheSection= .SectionIndex] =3D PpiOutput; - PrivateData->CacheSection.SectionSize [PrivateData->CacheSection= .SectionIndex] =3D PpiOutputSize; - PrivateData->CacheSection.AuthenticationStatus [PrivateData->Cac= heSection.SectionIndex] =3D Authentication; - PrivateData->CacheSection.SectionIndex =3D (PrivateData->CacheSe= ction.SectionIndex + 1)%CACHE_SETION_MAX_NUMBER; =20 TempAuthenticationStatus =3D 0; Status =3D ProcessSection ( -- 2.8.0.windows.1