From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.1182.1689265282601596196 for ; Thu, 13 Jul 2023 09:21:23 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=a+QDwX+2; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: saloni.kasbekar@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689265282; x=1720801282; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=fP8Gyb7XUsgNIuUbxXc1Y5nbwgXHCIL/izFqstUg4xk=; b=a+QDwX+2Os0nT3iKsDoOKMurmDmRc0w2aKA0T+0AFTyPPXkFQQwkh2My 65zTOTouDQegx+ehBuYDX7G6ClrBrEulUCB8P0Qlah8JfERF/BayzLcCo FSzwtKmebzX+5udfRzMrKjSR08VnpggdLTjEKzM9LD7w2m8MZmRjtr5kA X2dheyRHju20TSTIqqhM6zIQxj/k2Z3Fe1WXhG4DbS0lYytWmDV1lPEjN gjcL1QDalg16CIiur/b6okL8/JEZD43t9y3e9mFfyEv881imlBADQFICi gvnNeFE954rwc6bT5QISoWeUNSRZ+7dMknXX8OJdsJCa2j7lm6WhQMlab w==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="431405132" X-IronPort-AV: E=Sophos;i="6.01,203,1684825200"; d="scan'208";a="431405132" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2023 09:12:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="968673299" X-IronPort-AV: E=Sophos;i="6.01,203,1684825200"; d="scan'208";a="968673299" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga006.fm.intel.com with ESMTP; 13 Jul 2023 09:12:42 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 13 Jul 2023 09:12:42 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 13 Jul 2023 09:12:41 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Thu, 13 Jul 2023 09:12:41 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.44) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Thu, 13 Jul 2023 09:12:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hp/VSwwVnzSBoBUSdN6uqCRTX5AFKZkTFYcNKq8hvI43P5t/cQl4jMo6bpSND7J7jC0OLPmrIavU5VATD9HNcFCJAZzpy50+tC8u3sK1ZzxWjyrIl61DyZUNNmmE9mdRNfhv6B1JjH++1ujCFl3Q+FrtTfco4uBW8W6p8Z4PPpYtHhndnb6q63IZWjkmpFB2BHc1v3bbHdR0CtfiEXXO531DfM4MAdLeVjDAuAib2NSCF0UqNnZoWggjWtlibXeBgIFxjAuuLLEk+cEkzelsA3bmeCzhHrXMwTZdHwJISmRERcDKzj49iprxC+AL7bPsCpQ/vItubZpNdvDBgGOGJA== 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=VYGbEtJrjCirsxPNkA6VtFWDeW5gic5lFcRthGZWaG4=; b=kpmdys6rFn0Cx/nhAql8l58mujF4sqiOgW0zaAYzO3u4Pe/QGv414jNK8jZbsIBTHqqallrf8Snlu9PWKCdSUXDQWXOUXmvhhcvWwkrCwrYnkx7HX/+hL/xzwnn5tx7JLA/G97nfv6DvBL4DWJFAzKIVn91XhnZFKh1gv+4KGWNRB4EJlBJe8y/KDK63DNu8UqsHW9taF1EWbEndDIjP1WMSJE4Y8WIwXm2vyn3cqrMDFmBF+mRrdu+2OqUtEis5UpDkWIvtCCOBdgQAbeaiKMqfS3Uqr/gxN0YtSAoqcOhwbFmNtxVBpLbiWTrwdXIwEu2NBTikyq3bjq/zbQiBLQ== 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 Received: from BY5PR11MB3861.namprd11.prod.outlook.com (2603:10b6:a03:18d::13) by IA1PR11MB6465.namprd11.prod.outlook.com (2603:10b6:208:3a7::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Thu, 13 Jul 2023 16:12:39 +0000 Received: from BY5PR11MB3861.namprd11.prod.outlook.com ([fe80::6093:aa1f:57ef:5237]) by BY5PR11MB3861.namprd11.prod.outlook.com ([fe80::6093:aa1f:57ef:5237%6]) with mapi id 15.20.6588.024; Thu, 13 Jul 2023 16:12:39 +0000 From: "Saloni Kasbekar" To: Nickle Wang , "devel@edk2.groups.io" , "Clark-williams, Zachary" , "Kinney, Michael D" CC: Abner Chang , Igor Kulchytskyy , "Nick Ramirez" Subject: Re: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver binding start issue. Thread-Topic: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver binding start issue. Thread-Index: AQHZPUwAuV9WkswkYkek1DFyHKnaxa+gO4QQgAEvnACAADfV0IABlBQQgBT7atCAAJx/sA== Date: Thu, 13 Jul 2023 16:12:39 +0000 Message-ID: References: <174276A45CE2816B.5513@groups.io> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY5PR11MB3861:EE_|IA1PR11MB6465:EE_ x-ms-office365-filtering-correlation-id: 3a6def5b-e5db-46cc-6697-08db83bbfad1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: G8YjnEqm+wFBz4ExyVHnsa3wQ0JYO83IZ3PnwD+Vf7M7iSoVlsvny6KUNjpvyc14nIdXxHP45Hco4z1ucG4/lB0sz7m/7gp+9XT6U2B6V2KrKvH3zetoXoDJN1U3NJDuMv6MGJgQQQtwAgzvKmJaiiBo6YykNealC4wnggJyM9nUZ6ppWhKVbifq+liCE2Qpzd1iIk3Ale8OeAPZo+0V24LEAqYWxn7Z5vHYM2FqfAEHnCDqU+uVy6Ep30ov+S7uyg2/pAdDNLpJf8QEk7gKf/M1NK1MdO891b8pAA4tI4XfQaVLEdPowJz2o5XwrrnERhp9qK2hgFgVU/AbCL6bF6uiNjuPR+px4qsPfsT95LdZmoH8ymG94F9DJXPSucV/oiMK0Dz7xOWIiRGqoPEkqz657LFeL+zd24XxIxw29FFIko0+rE+YZGv4Q6bcKAw4MSBaYQJcWdMK6VcuQILf4iq2cGRX0K+7NaOBllvFTRY5O8GjskVq4dOTsIE3dKvv+vtZFp0XoQsaMPNEB1UMT2dki8tsqeG0EE8ae6N5ulVATgInlZQKGWfx9iyDdXy7wZ2DACwGC6Jey1fUOCohz7HsxQwx2Fk8x5z2STcjtEvQ99lH8MLp8ldMSDZNi3Z/FM1c11EoLek9eyGMSTByPIbbdKrS8UNunf/S2DBHSe4= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR11MB3861.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(346002)(136003)(376002)(366004)(396003)(39860400002)(451199021)(41300700001)(82960400001)(122000001)(38100700002)(2906002)(8676002)(316002)(8936002)(66899021)(5660300002)(52536014)(64756008)(66556008)(66946007)(6636002)(66476007)(66446008)(4326008)(86362001)(38070700005)(76116006)(71200400001)(33656002)(7696005)(966005)(9686003)(83380400001)(110136005)(55016003)(54906003)(53546011)(26005)(6506007)(186003)(478600001)(44824005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?oaTluJsRehouPLi/D69/ngQ9v3miXdYhPI00h/bdxP5Jb3pZ8XUxqbaE2H24?= =?us-ascii?Q?vdvovuKUHm0RLB4HhakNFIrzAZBuVmsPcO4RHfwuwFmkE3v0J2Tb3hHAdd9u?= =?us-ascii?Q?Qx1rw9q6viZ7sIhym/+OVTrjha19pKwhlgCXVCzU3gAwYM5FNfWJkxckolKC?= =?us-ascii?Q?6+sNOja/ZOkSmumLoQH4DD10lZBaWkbyRy8jwZ45us4jaKY+omOpt49TqeAq?= =?us-ascii?Q?6FYaSLgUorDW2LdFLTl0hOeViZflegSCi3RugzELADCabgUpsrhEz3HTEmQK?= =?us-ascii?Q?JjxAkmklketaAzzEHxCsPFKNS3x7UojdahtYAud0fKwDMAbcvYUCHr/z+yW+?= =?us-ascii?Q?7jhBWXQPlNpa3xilfptwyRfrnMj1YsN/KsBf+uk6bUMPMGDw09I4ZXa4DTv7?= =?us-ascii?Q?DL6Bj6PBYtPI/L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Y5?= =?us-ascii?Q?zKgDl+fa6CMzKELfnNSbDmYC1OLJyyzp73cJfdBD0ffALuBvzy1uyJyEumJz?= =?us-ascii?Q?mDlOlds2aQ3UgkBkIvepHTzwOzEqZrwwOc8YeRmSepOiBifpTuVO9SfwykRH?= =?us-ascii?Q?81/8cyAiBU9dGjYlEFKs4gwh8/7NB+q5e+nn7szaJFK/CWLXNtCfx8qmDpC4?= =?us-ascii?Q?QQSaGCbYvKzQqHHVo7BhH+AnOOTkHKmmat5iX/MLODuQRZZpg6vz69Pk5MmR?= =?us-ascii?Q?agtLnzAG6C6nwWivc6UZ8bQebHiKJhEGGoEGlgUU?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB3861.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a6def5b-e5db-46cc-6697-08db83bbfad1 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2023 16:12:39.3172 (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: 56i7UeE/yS1YSsi1DqZTzs+faqritMDQTBSdgsYxwpbKq4isoAGxtTkw3wH2wF9b3mynW42bG6wbh1jX3NiJVeW0aqdK/snCJjzVkr3PELs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6465 Return-Path: saloni.kasbekar@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Mike, Would you be able to help us merge the patch? Thanks, Saloni -----Original Message----- From: Nickle Wang =20 Sent: Wednesday, July 12, 2023 11:54 PM To: devel@edk2.groups.io; Kasbekar, Saloni ; Cla= rk-williams, Zachary Cc: Abner Chang ; Igor Kulchytskyy ; Ni= ck Ramirez Subject: RE: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver bindin= g start issue. Hi Saloni, Could you please help to merge this fix since there is no objection during = past weeks? Thanks, Nickle > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Saloni=20 > Kasbekar via groups.io > Sent: Friday, June 30, 2023 6:28 AM > To: Nickle Wang ; devel@edk2.groups.io > Cc: Maciej Rabeda ; Siyuan Fu=20 > ; Abner Chang ; Igor=20 > Kulchytskyy ; Nick Ramirez > Subject: Re: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver=20 > binding start issue. >=20 > External email: Use caution opening links or attachments >=20 >=20 > Hi Nickle, >=20 > That makes sense. Thanks for the clarification. >=20 > Reviewed-by: Saloni Kasbekar >=20 > Thanks, > Saloni >=20 > -----Original Message----- > From: Nickle Wang > Sent: Wednesday, June 28, 2023 3:30 PM > To: Kasbekar, Saloni ; devel@edk2.groups.io > Cc: Maciej Rabeda ; Siyuan Fu=20 > ; Abner Chang ; Igor=20 > Kulchytskyy ; Nick Ramirez > Subject: RE: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver=20 > binding start issue. >=20 > Hi Saloni, >=20 > Thanks for your review. >=20 > When uninstall fails, per UEFI specification, the protocol will be=20 > installed again and will be visible to UEFI drivers. >=20 > Page 190, UEFI spec. 2.10: > "If any errors are generated while the protocol interfaces are being=20 > uninstalled, then the protocols uninstalled prior to the error will be=20 > reinstalled with the boot service > EFI_BOOT_SERVICES.InstallProtocolInterface() and the status code=20 > EFI_INVALID_PARAMETER is returned." >=20 > In this case, if we do FreePool while driver still can locate=20 > gEfiHttpServiceBindingProtocolGuid. Driver will access to the memory=20 > that is released to system. Memory issue may happen. >=20 > Regards, > Nickle >=20 > > -----Original Message----- > > From: Kasbekar, Saloni > > Sent: Thursday, June 29, 2023 3:07 AM > > To: devel@edk2.groups.io; Nickle Wang > > Cc: Maciej Rabeda ; Siyuan Fu=20 > > ; Abner Chang ; Igor=20 > > Kulchytskyy ; Nick Ramirez > > Subject: RE: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver=20 > > binding start issue. > > > > External email: Use caution opening links or attachments > > > > > > Hi Nickle, > > > > We would want to do the FreePool even if the Uninstall fails (like=20 > > in the case where we failed to install the multiple protocol=20 > > interfaces and then went to ON_ERROR). Do you think it's better if=20 > > we change it to - > > > > if (HttpService !=3D NULL) { > > HttpCleanService (HttpService, UsingIpv6); > > Status =3D gBS->UninstallMultipleProtocolInterfaces ( > > &ControllerHandle, > > &gEfiHttpServiceBindingProtocolGuid, > > &HttpService->ServiceBinding, > > NULL > > ); > > if ((HttpService->Tcp4ChildHandle =3D=3D NULL) &&=20 > > (HttpService->Tcp6ChildHandle =3D=3D NULL)) { > > FreePool (HttpService); > > } > > } > > > > Thanks, > > Saloni > > > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of=20 > > Nickle Wang via groups.io > > Sent: Tuesday, June 27, 2023 5:56 PM > > To: devel@edk2.groups.io; Nickle Wang > > Cc: Maciej Rabeda ; Siyuan Fu=20 > > ; Abner Chang ; Igor=20 > > Kulchytskyy ; Nick Ramirez > > Subject: Re: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver=20 > > binding start issue. > > > > May I know if someone can help to review this patch? > > > > Thanks, > > Nickle > > > > > -----Original Message----- > > > From: devel@edk2.groups.io On Behalf Of=20 > > > Nickle Wang via groups.io > > > Sent: Friday, February 10, 2023 8:34 PM > > > To: devel@edk2.groups.io > > > Cc: Maciej Rabeda ; Siyuan Fu=20 > > > ; Abner Chang ; Igor=20 > > > Kulchytskyy ; Nick Ramirez > > > Subject: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver=20 > > > binding start issue. > > > > > > External email: Use caution opening links or attachments > > > > > > > > > When failure happens in HttpDxeStart, the error handling code=20 > > > release the memory buffer but it does not uninstall HTTP service=20 > > > bindnig protocol. As the result, application can still locate this=20 > > > protocol and invoke service binding fucntions in released memory pool= . > > > > > > Signed-off-by: Nickle Wang > > > Cc: Maciej Rabeda > > > Cc: Siyuan Fu > > > Cc: Abner Chang > > > Cc: Igor Kulchytskyy > > > Cc: Nick Ramirez > > > --- > > > NetworkPkg/HttpDxe/HttpDriver.c | 13 +++++++++++-- > > > 1 file changed, 11 insertions(+), 2 deletions(-) > > > > > > diff --git a/NetworkPkg/HttpDxe/HttpDriver.c=20 > > > b/NetworkPkg/HttpDxe/HttpDriver.c index 5d918d3c4d..f6d1263cad > > > 100644 > > > --- a/NetworkPkg/HttpDxe/HttpDriver.c > > > +++ b/NetworkPkg/HttpDxe/HttpDriver.c > > > @@ -3,6 +3,7 @@ > > > > > > Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.=
> > > (C) Copyright 2016 Hewlett Packard Enterprise Development=20 > > > LP
> > > + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights > reserved. > > > > > > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > > @@ -464,8 +465,16 @@ ON_ERROR: > > > > > > if (HttpService !=3D NULL) { > > > HttpCleanService (HttpService, UsingIpv6); > > > - if ((HttpService->Tcp4ChildHandle =3D=3D NULL) && (HttpService- > > > >Tcp6ChildHandle =3D=3D NULL)) { > > > - FreePool (HttpService); > > > + Status =3D gBS->UninstallMultipleProtocolInterfaces ( > > > + &ControllerHandle, > > > + &gEfiHttpServiceBindingProtocolGuid, > > > + &HttpService->ServiceBinding, > > > + NULL > > > + ); > > > + if (!EFI_ERROR (Status)) { > > > + if ((HttpService->Tcp4ChildHandle =3D=3D NULL) && (HttpService= - > > > >Tcp6ChildHandle =3D=3D NULL)) { > > > + FreePool (HttpService); > > > + } > > > } > > > } > > > > > > -- > > > 2.39.1.windows.1 > > > > > > > > > > > > > > > > > > > > > > > > > >=20 >=20 >=20 >=20 >=20