From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Mon, 07 Oct 2019 11:14:28 -0700 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D9B4E189F45F; Mon, 7 Oct 2019 18:14:27 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-11.rdu2.redhat.com [10.10.120.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 995FA5C1D4; Mon, 7 Oct 2019 18:14:26 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 26/35] SecurityPkg: fix UninstallMultipleProtocolInterfaces() calls To: devel@edk2.groups.io, chao.b.zhang@intel.com, "Wang, Jian J" , "Yao, Jiewen" References: <20190917194935.24322-1-lersek@redhat.com> <20190917194935.24322-27-lersek@redhat.com> <70253a73-a5ef-501f-c08b-207bb9c1200d@redhat.com> <9232f7fd-a0e9-4c5c-4258-1df728a36900@redhat.com> From: "Laszlo Ersek" Message-ID: Date: Mon, 7 Oct 2019 20:14:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Mon, 07 Oct 2019 18:14:27 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 10/05/19 16:28, Zhang, Chao B wrote: > Reviewed-by : Chao Zhang Thanks! Laszlo >=20 > -----Original Message----- > From: Zhang, Chao B=20 > Sent: 2019=E5=B9=B410=E6=9C=884=E6=97=A5 21:14 > To: edk2-devel-groups-io ; 'lersek@redhat.com' ; Wang, Jian J ; Yao, Jiewen > Subject: RE: [edk2-devel] [PATCH 26/35] SecurityPkg: fix UninstallMultip= leProtocolInterfaces() calls >=20 > Hi Laszlo: > Sorry for late response. The fix is good to me. I am also interested = in how you find this issue, can you share it? > > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: 2019=E5=B9=B410=E6=9C=883=E6=97=A5 19:07 > To: Zhang, Chao B ; Wang, Jian J ; Yao, Jiewen > Cc: edk2-devel-groups-io > Subject: Re: [edk2-devel] [PATCH 26/35] SecurityPkg: fix UninstallMultip= leProtocolInterfaces() calls >=20 > Pinging SecurityPkg maintainers again, for reviewing this patch. >=20 > Thanks > Laszlo >=20 > On 09/26/19 14:45, Laszlo Ersek wrote: >> Chao, Jian, Jiewen, >> >> can you please review this patch? >> >> Thanks, >> Laszlo >> >> On 09/17/19 21:49, Laszlo Ersek wrote: >>> Unlike the InstallMultipleProtocolInterfaces() boot service, which=20 >>> takes an (EFI_HANDLE*) as first parameter, the >>> UninstallMultipleProtocolInterfaces() boot service takes an=20 >>> EFI_HANDLE as first parameter. >>> >>> These are actual bugs. They must have remained hidden until now=20 >>> because they are all in Unload() functions, which are probably=20 >>> exercised infrequently. Fix the UninstallMultipleProtocolInterfaces() = calls. >>> >>> Cc: Chao Zhang >>> Cc: Jian Wang >>> Cc: Jiewen Yao >>> Signed-off-by: Laszlo Ersek >>> --- >>> >>> Notes: >>> build-tested only >>> >>> SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c = | 2 +- >>> SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c = | 2 +- >>> >>> SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi >>> gDriver.c | 2 +- >>> 3 files changed, 3 insertions(+), 3 deletions(-) >>> >>> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c >>> b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c >>> index 54155a338100..9052eced757d 100644 >>> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c >>> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c >>> @@ -443,7 +443,7 @@ Tcg2ConfigDriverUnload ( >>> ASSERT (PrivateData->Signature =3D=3D=20 >>> TCG2_CONFIG_PRIVATE_DATA_SIGNATURE); >>> >>> gBS->UninstallMultipleProtocolInterfaces ( >>> - &ImageHandle, >>> + ImageHandle, >>> &gEfiCallerIdGuid, >>> PrivateData, >>> NULL >>> diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c >>> b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c >>> index 341879e4c4ba..fb06624fdb8f 100644 >>> --- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c >>> +++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c >>> @@ -138,7 +138,7 @@ TcgConfigDriverUnload ( >>> ASSERT (PrivateData->Signature =3D=3D=20 >>> TCG_CONFIG_PRIVATE_DATA_SIGNATURE); >>> >>> gBS->UninstallMultipleProtocolInterfaces ( >>> - &ImageHandle, >>> + ImageHandle, >>> &gEfiCallerIdGuid, >>> PrivateData, >>> NULL >>> diff --git >>> a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCon >>> figDriver.c >>> b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCon >>> figDriver.c index 798ef9cfbc01..6c0294151e6c 100644 >>> --- >>> a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCon >>> figDriver.c >>> +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBoo >>> +++ tConfigDriver.c >>> @@ -115,7 +115,7 @@ SecureBootConfigDriverUnload ( >>> ASSERT (PrivateData->Signature =3D=3D=20 >>> SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE); >>> >>> gBS->UninstallMultipleProtocolInterfaces ( >>> - &ImageHandle, >>> + ImageHandle, >>> &gEfiCallerIdGuid, >>> PrivateData, >>> NULL >>> >> >> >> >> >=20 >=20 >=20 >=20