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: philmd@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Mon, 23 Sep 2019 02:55:09 -0700 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 647E7C047B68 for ; Mon, 23 Sep 2019 09:55:08 +0000 (UTC) Received: by mail-wr1-f70.google.com with SMTP id z1so4602258wrw.21 for ; Mon, 23 Sep 2019 02:55:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WijtNoXLfsB3DlIRQKMri7KVI9wO4IFkfDY5QLae5Ko=; b=g1jtYrcTo/WqalXFtVSZ9xFlhOUapaC/kN3YPtO3zw2hgujhClqUbLzuSuOR3J4UlO mEzf6GLArJgRI3W48Zjnh1qzDlxBeRQ/QHMm5c6PXAKdt9Yru4caV9rTLpUa0U5VlLFN tvx5m/XzHZQlpVDckb04LhiJjR2FQlZUHcuKlXEfXKFks7UuWVZZskW0JHPD421ubHwb s/c0vuVOe8v1dYVWz5ssOvFHX7+mec0B+8GJ0RiCeF+PlOvgzvJxmIxMUd6j3FaVHRv5 OIonWNvRpiKVhJ9BCj2vj6ruikdjh3qgl3lztYeLE6f+WKNJq95ved+oyXxa2ONIR9B0 auJw== X-Gm-Message-State: APjAAAWlBJtfcZUfnyar2nBo2Md4SZ8+Iy9Sc8ei7i1Dc1i2SJjgf+nC b9Gs/7/zRhVCUyoa9SkW+1O8jiBQKlnodXzTzrF4gZFoJMNdfRFxLjB05FY1BtqUSD1WGSqPOjt yY/kCP4aTR22clQ== X-Received: by 2002:adf:db06:: with SMTP id s6mr18076826wri.41.1569232507194; Mon, 23 Sep 2019 02:55:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjq4P64ErXueLoGkZDMsDxz4IvABOzDoOX1G7NC8hFte69WZFyLfTmOYQSUKAymcqHURAjcw== X-Received: by 2002:adf:db06:: with SMTP id s6mr18076811wri.41.1569232507010; Mon, 23 Sep 2019 02:55:07 -0700 (PDT) Received: from [192.168.1.40] (240.red-88-21-68.staticip.rima-tde.net. [88.21.68.240]) by smtp.gmail.com with ESMTPSA id t203sm13644769wmf.42.2019.09.23.02.55.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Sep 2019 02:55:06 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH 26/35] SecurityPkg: fix UninstallMultipleProtocolInterfaces() calls To: devel@edk2.groups.io, lersek@redhat.com Cc: Chao Zhang , Jian Wang , Jiewen Yao References: <20190917194935.24322-1-lersek@redhat.com> <20190917194935.24322-27-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <543eb8db-b73e-0716-760f-1eb49ceb1b0e@redhat.com> Date: Mon, 23 Sep 2019 11:55:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190917194935.24322-27-lersek@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 9/17/19 9:49 PM, Laszlo Ersek wrote: > Unlike the InstallMultipleProtocolInterfaces() boot service, which takes > an (EFI_HANDLE*) as first parameter, the > UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as > first parameter. > > These are actual bugs. They must have remained hidden until now because > they are all in Unload() functions, which are probably 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/SecureBootConfigDriver.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 == 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 == TCG_CONFIG_PRIVATE_DATA_SIGNATURE); > > gBS->UninstallMultipleProtocolInterfaces ( > - &ImageHandle, > + ImageHandle, > &gEfiCallerIdGuid, > PrivateData, > NULL > diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDriver.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDriver.c > index 798ef9cfbc01..6c0294151e6c 100644 > --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDriver.c > +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDriver.c > @@ -115,7 +115,7 @@ SecureBootConfigDriverUnload ( > ASSERT (PrivateData->Signature == SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE); > > gBS->UninstallMultipleProtocolInterfaces ( > - &ImageHandle, > + ImageHandle, > &gEfiCallerIdGuid, > PrivateData, > NULL > Reviewed-by: Philippe Mathieu-Daude