From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 6D311740032 for ; Mon, 18 Dec 2023 01:36:50 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=piP5UH8X7zGFU2VQd4nEfmi83xmbQawf2jh0+JWEXAM=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1702863409; v=1; b=IeDftcTAsgEPu8jJaR3BObWTkcGSH9BbmG15KXo1ftu0iYPsE3ausweN0xBHH8vqlSS1a2H+ MsF8jYE5yBJJSkEk/88RYSqDc3umTRsQanQMOWzrVo76LtLhCidcu0+9NdFFVNQEoM7gOxyRStd mCclRy+7IHRmNB149sYZZbhA= X-Received: by 127.0.0.2 with SMTP id oI2FYY7687511xeoYyUEulck; Sun, 17 Dec 2023 17:36:49 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mx.groups.io with SMTP id smtpd.web11.33195.1702863408378887283 for ; Sun, 17 Dec 2023 17:36:48 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10927"; a="2642151" X-IronPort-AV: E=Sophos;i="6.04,284,1695711600"; d="scan'208";a="2642151" X-Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2023 17:36:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,284,1695711600"; d="scan'208";a="23587027" X-Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Dec 2023 17:36:48 -0800 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 17 Dec 2023 17:36:47 -0800 X-Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 17 Dec 2023 17:36:40 -0800 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Sun, 17 Dec 2023 17:36:40 -0800 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sun, 17 Dec 2023 17:36:40 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KiLacr6WIcPLVRpm9wiNrkGDaQpObK8eWXP3xJgtDaonQFgsGQ3auh+gRzSXBOJHHfrzbOVECpKDjSYW19nWiVgKQBMm54ZTLdd56gf3/myQWHFMFaNv5/gK23JdH/7ZFioGHv/fjfCMzUrzQgu9FFfXhTr7//iDIxHjG0EeXf/Fcm0SJBLO4T+PZielIA39UyWJ2YdBYBdyRyr0zACMPmonCby8ZBGl4vSVwnZAsjQuHZIgwTmUZ3Ps/uyULC5+wXYRS3wUeJ5GNVU4VooycdbyRPb+OkGVUI2YbGwJtc6ZoCxE8xRUGpNZZwgEdVVUhXxiZwY6mYCwjEW/STeAUQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sziMKpKkS52Ouh2/UHIrzOhkQLT1ku8LdbDbDmNOt1E=; b=N1Se/n9oYRVJJCNGavlgYUL1Lh10KTHeMxau9ZiF+IopNn1dN9PC1VZcfFYCR5QHntRTchU2iyuLqSKgPwLBALLxFFMbFfV6v9fDdEUljZM9YjpQCkz5GwbTWuD5mqUQOsWtUVSlMn9JnrhKO8LV5QZXTYpaX6wPpkmiR6FcUScctMRUMUjaP5qq942jnO+N1h6Yb0IH1O2TIGYwenjWEO24uR8PrO8eIM2pfHGSbiLLVCs4RQszchGlTw5bQZUqJbhz61qPf5UnwRPKY2LH5UL+GqfgeRTktBNSqirozs5t+jmL8kJ4xp5xi7oK8F8zA+eRLM79ExTlaGRxCjR3dQ== 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 X-Received: from SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) by DS0PR11MB7286.namprd11.prod.outlook.com (2603:10b6:8:13c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37; Mon, 18 Dec 2023 01:36:37 +0000 X-Received: from SN6PR11MB2717.namprd11.prod.outlook.com ([fe80::cc3:f3da:662e:8558]) by SN6PR11MB2717.namprd11.prod.outlook.com ([fe80::cc3:f3da:662e:8558%3]) with mapi id 15.20.7091.034; Mon, 18 Dec 2023 01:36:37 +0000 From: "Xu, Wei6" To: "devel@edk2.groups.io" , "Xu, Wei6" CC: Laszlo Ersek , Ard Biesheuvel , Sami Mujawar , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH v4 0/4] StandaloneMmCore finds drivers in uncompressed inner fv. Thread-Topic: [edk2-devel] [PATCH v4 0/4] StandaloneMmCore finds drivers in uncompressed inner fv. Thread-Index: AQHaEIbAQ+ydnPBFckqS3kgqJ1W9b7Cugv9A Date: Mon, 18 Dec 2023 01:36:36 +0000 Message-ID: References: <1794F968339CC3DE.12603@groups.io> In-Reply-To: <1794F968339CC3DE.12603@groups.io> Accept-Language: en-US, en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN6PR11MB2717:EE_|DS0PR11MB7286:EE_ x-ms-office365-filtering-correlation-id: cb743aa3-aa49-445c-e5c1-08dbff69c683 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 6DJX6hI747jRXSD1vm/0nl4wXCzM8jbN2D1aUciUfwRhGyxWEBh/Aj/bpO09rXCPH94KAIqQIR5TKYoEpyBNeW6pj7hENHlZh8CoWHPsERBi+5D/FYedMrabEvspah7QoX+MQNoUqf169pLtSySssu6qMrGH9yOe9ZRkCqiNu+ZjWG0R/APf5EmFv9xBRLTRcSEbKlLIG2NPvuuUZui/TYuhHhcugyAFaJeaVYRnF76G23AFSY+OwcndLEvSmGzcW4K9YM1+dDn2C/UVvBIyZe5Zw3E/M3hZH5x3zeUeRZiVLnKHgwtht9Y1DmoRSbiPc7mIxS/z6SNxD0Zg4YbJFY1eH60umzuQLypTlwHzEwNM+gW3St9/RtvqTCB4La0/aSsJWIPG1d5yANPs80j/xrAImbUV8PYuUBHEifot6Vz9LBTSFvJ4VwtAWPl+Gxt3A5XCjwriKOk6ACc3yeTfblahww1b/OIhCdx4WjOFIQ+sk9m5G8svNgamlMtFczDF85WIU4vvNyU90uNcm/Ni0KmtUPs4XsgGj9t/OAkI2kSp55sH6xjRbhaeNVk7YJ6q9rsKIJrXik2WF3ijs3SSrejvkEA1csrnkvRsRnmJafns6YoEJMZrCXavcnGObeNiU557m7T/PyAa/KrhXFrITQ== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?JcppNuL76gYtOK0fFPwCybGAYzQNxg7TL0Ozp20yN8ERXsKRCFm806hT74DR?= =?us-ascii?Q?g0STaOufjfLNHbuMcXXDG0Tjasii7tVdfP4w+ZwAnBVE7RRGYXiZaUQEEPFl?= =?us-ascii?Q?UDu7vb2rmmpZq3W10K3LHTpPfs4qZAg743RzSwdi+TnzDZvKlqqyxeSjFdxU?= =?us-ascii?Q?OMc453Qua2xOx35VK/4h7uco18a8hM9dhZ+I5TuWotp9vhWI3KuLlDrb/rYl?= =?us-ascii?Q?9Bmv6YW8hnTAQ1SN+gFajac++4CDiNtVZDX+V5Qa/9eVUby7aVMMRJkuQw0D?= =?us-ascii?Q?bPLZQC9WT3Xa7ga+HkfoqJYhnC/qEBeN7hdco0+c5kDTDF6r+tRC4fhh+tHN?= =?us-ascii?Q?QfQzjmlEfb9Z0+UOCRNA0o2SvODQmeobf9RKIz2d1xgg87ltkGlNp6/RS2Ns?= =?us-ascii?Q?3OEuRxXyIs+xbua6o74JA1ydXi8VnMAS97dgpTA6LiaybmtAgKU9ROpeeRue?= =?us-ascii?Q?qrLPXURUQVw3/adldh4h4TT3qOVrYaT+02TS/r+fleQYidHxvil3yD/fOKrb?= =?us-ascii?Q?D9oQDkQcAWmpfpQ9JBOSMLY3lgrsFOVstT4mLJDjRGsGgNPo2+/9/e9s95sS?= =?us-ascii?Q?Sl2B3eiK/1u7LNUC4EL532vt2ELUwOX33GODb7d63in1bifDslNn3s1fjvdw?= =?us-ascii?Q?Vj69QAMmfUKQlEdVpHjAGAuq9Ho3Xy4bpxaV62jMaLE/rck/qHZ85GIsF1HJ?= =?us-ascii?Q?A2J4X+wd3qRtqIO08X9Ih8Kaag+G91HiOS+wWWv5XfCAIbSkySPlAwwVWbd8?= =?us-ascii?Q?w/9jsdSc9d5Wqd/n9dpIJdg3CSHnBZ1YXhP0j1BmcnOv8MpmHoAYLskZgYcm?= =?us-ascii?Q?7xhRujqGG0INLvS9INOHRipIdnbSg3+pJZ3jOErfZxojFijUYU2Mfb/4yIwi?= =?us-ascii?Q?+UYvHlsi16JkIrRF9Oz6f0Z08JWnoLxniU3LuMj3tMxe5XssJKdTwpy21hTI?= =?us-ascii?Q?6xdgG16aRg/yTFqW9d8VlSswVKEM8C4pAXRNcDnBJA2HJW1G8GURHMatQw1l?= =?us-ascii?Q?kcyE5sxe2QBktgQ8Z8xSmgcVFzwnD/tQBNG2KmM+nFxhl4Tep3B3WLWQRbk8?= =?us-ascii?Q?06BfF4roeKoN0m3MkRShOY9QhqGNDYzuR4sNjXYcWmNWniZWop9AvqhFZiQR?= =?us-ascii?Q?fkDOCnDtVbwjLOXJEm488Pn2pqRXWR4zAhOn9ZFUEWBwR1edV69wX/GPu4pl?= =?us-ascii?Q?79Ak+hRvn1q82l+aJb1sgL0UFYWdvCuNTG8LqaNnNXSapmmy/rxAB2Up7jjr?= =?us-ascii?Q?6m7zv1g/2DKmLcLNr4EqOlu0DJ3yst6xZ54wvMJx/rXvqIy2S/PXvhmsbdAG?= =?us-ascii?Q?rJq99zHfuLnrGckWKEjPOla9SIPRSUJlmK/ZyM2FLeKE2gOrzR301FrjMrPv?= =?us-ascii?Q?yOz6uYMr1KAb/+v41DthmLDAR9iqw3cTnbBPTp1D5XZTtp4bkoqiNKwODB3q?= =?us-ascii?Q?QhZfT6uXUnckiVMIoZxAqmuTycKW9g8aPceqBxDV2RDNQ2zXe/PwsXj/eejL?= =?us-ascii?Q?wZ0Ut2jXsSTmZ7qk+urL+8ut2WzB4hzdaPqW62rCSwfy+n3imYVt750hpED0?= =?us-ascii?Q?5XXnhitUD/XXM1aah0o=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2717.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb743aa3-aa49-445c-e5c1-08dbff69c683 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Dec 2023 01:36:36.9726 (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: nBdxzUEs8G98atqfsZS811lWxsFOEDo6J5wTZTEV2pdol5mtsrhHl+MPPDTolY2AYz2KP3dKZM2WTT7pL9xYtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7286 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,wei6.xu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 0QyKCWEkZOLOXerKQpG67UMTx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=IeDftcTA; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") This patch series already got "reviewed-by" from Laszlo. Could anyone help = to merge the changes? Thanks a lot. Thanks Laszlo for reviewing the patches. BR, Wei -----Original Message----- From: devel@edk2.groups.io On Behalf Of Xu, Wei6 Sent: Monday, November 6, 2023 3:53 PM To: devel@edk2.groups.io Cc: Xu, Wei6 ; Laszlo Ersek ; Ard Bie= sheuvel ; Sami Mujawar ; N= i, Ray Subject: [edk2-devel] [PATCH v4 0/4] StandaloneMmCore finds drivers in unco= mpressed inner fv. V1: This patch is to fix the issue that StandaloneMmCore fails to detect uncomp= ressed inner FV. PR: https://github.com/tianocore/edk2/pull/4943 V2: Based on V1, fix some other issues 1. Add Missing object size checks before casting pointers to header types a. InnerFvHeader =3D (EFI_FIRMWARE_VOLUME_HEADER *)SectionData;=20 This is introduced in V1, add the size check on SectionDataSize agains= t EFI_FIRMWARE_VOLUME_HEADER b. Section =3D (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1); Use FfsFindSection instead of FfsFindSectionData to avoid pointer cast= ing. 2. Fix potential memory leak issue that ScratchBuffer is not freed when pag= e allocation for DstBuffer fails. PR: https://github.com/tianocore/edk2/pull/4965 V3: 1. Separate patch per individual issue fix on patch V2. 2. Fix one more issue: Limit FwVol encapsulation section recursion in MmCor= eFfsFindMmDriver(). PR: https://github.com/tianocore/edk2/pull/4975 V4: Patch (1/4): Move the declaration of MmCoreFfsFindMmDriver() from source fi= le to the header file "StandaloneMmCore.h" Patch (2/4): Handle the case that ExtractGuidedSectionDecode()'s decoded bu= ffer is identical to the data in InputSection Patch (3/4): Fix the issue 'S= ection + 1' migth be a wrong address for InnerFvHeader if Section is EFI_CO= MMON_SECTION_HEADER2. Patch (4/4): 'Continue' if an EFI_SECTION_FIRMWARE_VOLUME_IMAGE is found, d= o not look for an EFI_SECTION_GUID_DEFINED again. PR: https://github.com/tianocore/edk2/pull/5004 For the recursion logic improvement, Let's do it in other patch set in futu= re after this patch is committed. Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Sami Mujawar Cc: Ray Ni Wei6 Xu (4): StandaloneMmPkg/Core: Limit FwVol encapsulation section recursion StandaloneMmPkg/Core: Fix potential memory leak issue StandaloneMmPkg/Core: Fix issue that offset calculation might be wrong StandaloneMmPkg/Core: Fix the failure to find uncompressed inner FV StandaloneMmPkg/Core/Dispatcher.c | 5 -- StandaloneMmPkg/Core/FwVol.c | 88 +++++++++++++++++------ StandaloneMmPkg/Core/StandaloneMmCore.c | 7 +- StandaloneMmPkg/Core/StandaloneMmCore.h | 26 +++++++ StandaloneMmPkg/Core/StandaloneMmCore.inf | 3 + StandaloneMmPkg/StandaloneMmPkg.dec | 5 ++ 6 files changed, 103 insertions(+), 31 deletions(-) -- 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112612): https://edk2.groups.io/g/devel/message/112612 Mute This Topic: https://groups.io/mt/103235459/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-