From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B8069224DCA4D for ; Thu, 8 Mar 2018 03:34:12 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 437FFD1438; Thu, 8 Mar 2018 11:40:28 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-50.rdu2.redhat.com [10.10.120.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4CD9710FFE6C; Thu, 8 Mar 2018 11:40:21 +0000 (UTC) To: marcandre.lureau@redhat.com, edk2-devel@lists.01.org Cc: qemu-devel@nongnu.org, javierm@redhat.com, pjones@redhat.com, jiewen.yao@intel.com, Star Zeng , Chao Zhang References: <20180307155746.18526-1-marcandre.lureau@redhat.com> <20180307155746.18526-2-marcandre.lureau@redhat.com> From: Laszlo Ersek Message-ID: <5962657b-3609-b361-03be-30f474722de1@redhat.com> Date: Thu, 8 Mar 2018 12:40:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180307155746.18526-2-marcandre.lureau@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 08 Mar 2018 11:40:28 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 08 Mar 2018 11:40:28 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [PATCH v2 1/8] SecurityPkg: also clear HashInterfaceHob.SupportedHashMask X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 11:34:14 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 03/07/18 16:57, marcandre.lureau@redhat.com wrote: > From: Marc-André Lureau > > Commit 4cc2b63bd829426b05bad0d8952f1855a10d6ed7 fixed an out of bounds > ZeroMem() call. However, as Laszlo Ersek pointed out, the intent was > to clear all but the Identifier (to revert the effect of > RegisterHashInterfaceLib()). For that, it should clear the > SupportedHashMask too. > > Cc: Jiewen Yao > Cc: Chao Zhang > Cc: Star Zeng > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marc-André Lureau > --- > .../Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c > index 361a4f6508a0..bf6e1336ee76 100644 > --- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c > +++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c > @@ -426,6 +426,7 @@ HashLibBaseCryptoRouterPeiConstructor ( > // > ZeroMem (&HashInterfaceHob->HashInterface, sizeof (HashInterfaceHob->HashInterface)); > HashInterfaceHob->HashInterfaceCount = 0; > + HashInterfaceHob->SupportedHashMask = 0; > } > > // > Reviewed-by: Laszlo Ersek Thanks, Laszlo