From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web11.1013.1598980477246182010 for ; Tue, 01 Sep 2020 10:14:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KCHOThSy; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598980476; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=de0YFsu8mJr/YcAjlptq/N9iMzu5SorydyuevdwBw80=; b=KCHOThSydI49waXbCRVK4j0PIABf5r8LzYltdPQaGAKB2TghoPz7PMEnsi4HcTM3yjOZQS 9F6W+CZbuBbsgbnr1W8CCPxnxsbFSzkK02Cr+62dkmrrboqBR+CQdhQ3mMJK/E2IWAfqTx oMJE2EU8uOaTqA2nPHV3vz5zvkL1ca8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-538-Qt7OkpU2OauMWaQDC2wdQw-1; Tue, 01 Sep 2020 13:14:26 -0400 X-MC-Unique: Qt7OkpU2OauMWaQDC2wdQw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D5E51DDF5; Tue, 1 Sep 2020 17:14:25 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-251.ams2.redhat.com [10.36.112.251]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A7B060C0F; Tue, 1 Sep 2020 17:14:23 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH] SecurityPkg: Initailize variable Status before it is consumed. From: "Laszlo Ersek" To: Zhiguang Liu , devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Qi Zhang , Rahul Kumar Reply-To: devel@edk2.groups.io, lersek@redhat.com References: <20200901005505.1722-1-zhiguang.liu@intel.com> Message-ID: <60a33dac-e8a0-2ec0-35f4-4696f3115ec1@redhat.com> Date: Tue, 1 Sep 2020 19:14:22 +0200 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US On 09/01/20 09:02, Laszlo Ersek wrote: > On 09/01/20 02:55, Zhiguang Liu wrote: >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2945 >> >> V2: Move "Status = EFI_SUCCESS;" before the EDKII_TCG_PRE_HASH check. >> >> Cc: Jiewen Yao >> Cc: Jian J Wang >> Cc: Qi Zhang >> Cc: Rahul Kumar >> Cc: Laszlo Ersek >> Reviewed-by: Jiewen Yao >> Signed-off-by: Zhiguang Liu >> --- >> SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c >> index 0e770f4485..93a8803ff6 100644 >> --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c >> +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c >> @@ -456,6 +456,7 @@ HashLogExtendEvent ( >> if ((Flags & EDKII_TCG_PRE_HASH) != 0 || (Flags & EDKII_TCG_PRE_HASH_LOG_ONLY) != 0) { >> ZeroMem (&DigestList, sizeof(DigestList)); >> CopyMem (&DigestList, HashData, sizeof(DigestList)); >> + Status = EFI_SUCCESS; >> if ((Flags & EDKII_TCG_PRE_HASH) !=0 ) { >> Status = Tpm2PcrExtend ( >> NewEventHdr->PCRIndex, >> > > Reviewed-by: Laszlo Ersek > > I'll let Jiewen or Jian merge this. > > Please change the status of TianoCore#2945 to IN_PROGRESS, and link both > versions of this patch into the ticket as well (in a new comment). Merged as commit 46db105b7b77, via . BZ updated. Thanks Laszlo