From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.5146.1589000116811734442 for ; Fri, 08 May 2020 21:55:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=M/nB9sOo; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: yunhuax.feng@intel.com) IronPort-SDR: tNjEcDXhTD1L571EVbq96+YYLU3HVmMx/iLtOAUXiP6aU8HRQeARqUW2Dz+c2jUVVfilLgWTm5 yt0qTGTbHz/w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 21:55:16 -0700 IronPort-SDR: YCtQz9w7NKSGEyXIOYTlCrkd5TRsoRkO3rYZU1s4ggxlIET3fY1oiZmAMi+FyheOTEEw3IkSHC i/OAGgIFl6eA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,370,1583222400"; d="scan'208";a="436015150" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by orsmga005.jf.intel.com with ESMTP; 08 May 2020 21:55:15 -0700 Received: from orsmsx156.amr.corp.intel.com (10.22.240.22) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 May 2020 21:55:15 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX156.amr.corp.intel.com (10.22.240.22) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 May 2020 21:55:15 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 May 2020 21:55:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q8QjJwPwQ+ue6zEVaxHSMzOrlp/Nl7MCf7jsvsmyBtr5NZcwq2++HyOJtf+wTNutbJsJt9AF98QJywWzPp8w/6ksXKddv814JucG5K5HluH7VSOaPX504rYYuCr0U9xnIuvtCktE7PB0jMRPIDxSFH72mcA9eMqsDu8VrsM5IIrOwCzr23RgVDnSLls3FaHaH/BJ2bQJ/xpK0KasNZa17EWqD7+G9Cm5RR3R+s0Qtnkc8ReMFx6x6qGV+KYRM3tCba/4hE2DDf7yif5unSAlPAZjXLEhkeK9/2k8t6yPNt/uty1FQLvnuPOgBmQSeDd4XnOC4OzWy4YbrZgfCr7kwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=awb7PVzFVZ5pCvwjNm8y+wFRs++GKdN17QkGhi84Bw0=; b=RWDs6s+mLMkrNHZLIEUyUpZimzoV/uwUmTXfQ9zbxKA4UHXMghGDrCR27U6C7GevwOgWWQzj6C6zQsgs1C4PvLMNO6ozOeP3b8ANzCF2EnA1YQv/Cvn3dPISVpiY2BU4d4X6yLxznB9qSLNjur3W2VGEYctKGFcQn0u424T9meNM/CjJXFZXgLaMMn+MdI1r1HoesTLC8hLMcegWhhq+9nFlUU1s/bjbTlU7xJsVnQ9lrMmxtJm9kWSB39bwSLOfpE/Rq+StiM7/Las/esBdNYeti36CGI5Ht+r/b2Xd+7Pt53KQYJ3Ra9t1lbvFRDPqsXWaIlvEPjYW3PgBgZ6nZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=awb7PVzFVZ5pCvwjNm8y+wFRs++GKdN17QkGhi84Bw0=; b=M/nB9sOoB5Aft1kTpFbQ58+r4h1O8KZpXWPbOIWit1B8AhhtxzZIgI9SbU6s8/Zp3pg4StqAswePruY6/xSzzkRJc/PDDKW2jNKqf/RiL8uKYq31GItB8NOn4M5qT7L+My0kKV4eP7UOWp+k7VGSTFO8PYs7OYLvSlfvQ7GcnpQ= Received: from BN8PR11MB3793.namprd11.prod.outlook.com (2603:10b6:408:86::23) by BN8PR11MB3811.namprd11.prod.outlook.com (2603:10b6:408:8a::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.27; Sat, 9 May 2020 04:55:13 +0000 Received: from BN8PR11MB3793.namprd11.prod.outlook.com ([fe80::6455:7f80:a3b2:730b]) by BN8PR11MB3793.namprd11.prod.outlook.com ([fe80::6455:7f80:a3b2:730b%5]) with mapi id 15.20.2979.033; Sat, 9 May 2020 04:55:13 +0000 From: "Feng, YunhuaX" To: "devel@edk2.groups.io" , "Ni, Ray" CC: "Feng, Bob C" , "Gao, Liming" Subject: Re: [edk2-devel] [edk2-staging][PATCH] BaseTools/Fmmt: Fix found the next FFS issue Thread-Topic: [edk2-devel] [edk2-staging][PATCH] BaseTools/Fmmt: Fix found the next FFS issue Thread-Index: AdYlpUzbYGIqiayXSXG6NdcZlBf1zAABoBJAAAAVEAAAAVfW4AABXGCg Date: Sat, 9 May 2020 04:55:12 +0000 Message-ID: References: <734D49CCEBEEF84792F5B80ED585239D5C530A62@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5C530BB7@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C530BB7@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.192] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: acee2852-fac8-49f6-829d-08d7f3d528ce x-ms-traffictypediagnostic: BN8PR11MB3811: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 03982FDC1D x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zlNR15++hIsohRCuH/pv9JcTb/yzrta77V5/EjoNdHQ2aeKopbdXoWE5/qrQWnJXbF1XdmXtr0Gqu47rakJdklNn0gqoa1Oy5r9QE3Mg1YegggNkWBvp8x9gXjgHNry3+mggV656P/K78HDnZ+3wi+5W8rTiaNdc+weNBS1lBWY6worJ4DCYZerTIZ49Uuj/8BuP2CTuxbuiFwZTYcPcZPxOjgqGgl1Z+pt36DOOcELNDslA0Z+f7CsgEW6+BNCKvrmhw3Sgl0gAKJGPuLuD82wYjy6lXjNT8Nd6NYy4F8vg9EiqIyU6qUi5rkrbucPKTQIJO7NNh93PP6M3KlAXvkKQkPItQDrUZrIiOievy5jo98ggE41vNWmPFpFSdkblpB9iTonV70kwkiApj6MN0gRFWdOWtHCENzrMlfUZWjcKNdK5mtYU2Twhm2Ak273Byio7jYq6OkZaojyFFkwWAmBEzZJP6R/EPFbUhZEErQlz6aIJ9SEbZTi/dIr4rSOZ8xkO3gbVJ3jd+Ea0wfJmn2xFHXbfmH+u25hwRV0zIFe3fE1twhGAuW2UZxFNUtW6WHvaaKDbngX6ZYEiS4uj2hhYq3eg743vvbJ97P1ZfmI= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR11MB3793.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(366004)(39860400002)(396003)(346002)(376002)(136003)(33430700001)(53546011)(478600001)(6506007)(55016002)(54906003)(966005)(76116006)(66946007)(9686003)(316002)(8936002)(52536014)(110136005)(6636002)(5660300002)(26005)(8676002)(7696005)(186003)(4326008)(2906002)(107886003)(33440700001)(66556008)(64756008)(66446008)(71200400001)(33656002)(86362001)(66476007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: 9mG+0bsQG1bv1qt5/SwOss2rTEu2O7YAFyX41ThbPqg+9iC6vPbZ1rnt7wRvmxaon881cf1UbviSC/BpW1qMD36jMxkqexjItIWnzK7ej4i8B1WKxdQLpCAL5NlZ8k0FNF5KA7tQxv8JsqQ3PKHpj5joV4Bvo6rSANRuJ/JNIn1/IuC9k5DSC/RXrUD//h+3VQhUaFCKfFmImNRmc1wIyEF67LzSXMUfhPyMWM2qnjzqt2gg0AXauFAuMLoxOAbsyHN3JyWqkO+Ks4pbs6OilqGpm41IE3haDCA8yTwWopCxwPMvsIihohxXoSzUfqgsK4sOpB7eKh5ggk8yhMBnHm3BKCcuDnE3d+cBUxesEs0NofM5GV0uAIGnAwIm7AH67cgflZ4Iv2PLAbN7FVSYCL71GgSWJDo3YpjJD2eUn0TblqSB7rRlvB0VwaYK8PoouMh7ZYXb9UrmiXjkNCNoswzOb/Kek1tiQHSVo9ByJj4= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: acee2852-fac8-49f6-829d-08d7f3d528ce X-MS-Exchange-CrossTenant-originalarrivaltime: 09 May 2020 04:55:12.8483 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LhviHaXNkSL6ch3efsPt1R+YIIONfacCC8Jw5a6aBGKfkVrU/8k43EcpBIBmI84FdFSuS+RxFSXQv1nAaGenew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3811 Return-Path: yunhuax.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes , you are right, the condition of break should think about Fv's erase p= olicy, I will update this patch. Thank you -----Original Message----- From: devel@edk2.groups.io On Behalf Of Ni, Ray Sent: Saturday, May 9, 2020 11:28 AM To: Feng, YunhuaX ; devel@edk2.groups.io Cc: Feng, Bob C ; Gao, Liming Subject: Re: [edk2-devel] [edk2-staging][PATCH] BaseTools/Fmmt: Fix found = the next FFS issue Ok can you add comments to explain: 1. Why 0xFF instead of 0x00 is used as a condition of break (I am not clea= r). 2. Why 0xFFFFFF is used (I am clear now thanks for the explanation. Please= explain in comments). > -----Original Message----- > From: Feng, YunhuaX > Sent: Saturday, May 9, 2020 11:21 AM > To: Ni, Ray ; devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming=20 > > Subject: RE: [edk2-staging][PATCH] BaseTools/Fmmt: Fix found the next=20 > FFS issue >=20 > Hi Ray, > I have checked the EFI_FFS_FILE_HEADER, the Size only 3 bytes,=20 > GetFfsFileLength only return 0xFFFFFF. I not found existing macro >=20 > typedef struct { > EFI_GUID Name; > EFI_FFS_INTEGRITY_CHECK IntegrityCheck; EFI_FV_FILETYPE Type;=20 > EFI_FFS_FILE_ATTRIBUTES Attributes; > UINT8 Size[3]; > EFI_FFS_FILE_STATE State; > } EFI_FFS_FILE_HEADER >=20 >=20 > -----Original Message----- > From: Ni, Ray > Sent: Saturday, May 9, 2020 10:46 AM > To: devel@edk2.groups.io; Feng, YunhuaX > Cc: Feng, Bob C ; Gao, Liming=20 > > Subject: RE: [edk2-staging][PATCH] BaseTools/Fmmt: Fix found the next=20 > FFS issue >=20 > Yunhua, > Why the comparison is against 0xFFFFFF not 0xFFFFFFFF? >=20 > Is there any existing macro that you can use? >=20 > Thanks, > Ray >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Feng,= =20 > > YunhuaX > > Sent: Saturday, May 9, 2020 9:59 AM > > To: devel@edk2.groups.io > > Cc: Feng, Bob C ; Gao, Liming=20 > > > > Subject: [edk2-devel] [edk2-staging][PATCH] BaseTools/Fmmt: Fix=20 > > found the next FFS issue > > > > if found the next FFS size equal 0xFFFFFF, return NOT_FOUND > > > > Cc: Bob Feng > > Cc: Liming Gao > > > > Signed-off-by: Yunhua Feng > > --- > > BaseTools/Source/C/FMMT/FmmtLib.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/BaseTools/Source/C/FMMT/FmmtLib.c=20 > > b/BaseTools/Source/C/FMMT/FmmtLib.c > > index cdbee3d629..4fb10ecfe6 100644 > > --- a/BaseTools/Source/C/FMMT/FmmtLib.c > > +++ b/BaseTools/Source/C/FMMT/FmmtLib.c > > @@ -1769,10 +1769,13 @@ FvBufFindNextFile ( > > (*Key + sizeof (*fhdr)) < fvSize; > > *Key =3D (UINTN)ALIGN_POINTER (*Key, 8) > > ) { > > fhdr =3D (EFI_FFS_FILE_HEADER*) ((UINT8*)hdr + *Key); > > fsize =3D GetFfsFileLength (fhdr); > > + if (fsize =3D=3D 0xffffff) { > > + break; > > + } > > if (!EFI_TEST_FFS_ATTRIBUTES_BIT( > > FvbAttributes, > > fhdr->State, > > EFI_FILE_HEADER_VALID > > ) || > > -- > > 2.12.2.windows.2 > > > > > >=20 >=20 >=20