From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: chao.b.zhang@intel.com) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by groups.io with SMTP; Wed, 26 Jun 2019 00:29:33 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2019 00:29:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,419,1557212400"; d="scan'208,217";a="166949224" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 26 Jun 2019 00:29:32 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 26 Jun 2019 00:29:31 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 26 Jun 2019 00:29:31 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.33]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.72]) with mapi id 14.03.0439.000; Wed, 26 Jun 2019 15:29:28 +0800 From: "Zhang, Chao B" To: "Wang, Jian J" , "Yao, Jiewen" , "devel@edk2.groups.io" CC: "Hernandez Beltran, Jorge" , "Han, Harry" Subject: Re: [PATCH v4 0/3] Common OBB verification feature Thread-Topic: [PATCH v4 0/3] Common OBB verification feature Thread-Index: AQHVJwvA1KQGALopQUyD/sLc+nF6T6ar6ssAgAECmICAAKXn4A== Date: Wed, 26 Jun 2019 07:29:28 +0000 Message-ID: References: <20190620015859.6424-1-jian.j.wang@intel.com> <74D8A39837DF1E4DA445A8C0B3885C503F6CC3FD@shsmsx102.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTQ0ZjIwMjUtOGMyNi00ZmU5LThlZDgtYjE0MWFiOTdkZDQ1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVFhqbXA5MnJPMXhOTE1cL0lPUk1JTU1XXC9weEUwTnhFTkpQOUx1bk9YV01KdktNdU56QkhndkRtcjBrenBLTE9hIn0= dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: chao.b.zhang@intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_FF72C7E4248F3C4E9BDF19D4918E90F24DEDF136shsmsx102ccrcor_" --_000_FF72C7E4248F3C4E9BDF19D4918E90F24DEDF136shsmsx102ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Jian: Patch is good to me. Just one comment for coding style If (AlgInfo->HashAll (FvBuffer, (UINTN)FvInfo[FvIndex].Length, FvHashValue)= =3D=3D FALSE) Is it better to be if (!AlgInfo->HashAll (FvBuffer, (UINTN)FvInfo[FvIndex].= Length, FvHashValue) ) ? From: Wang, Jian J Sent: Wednesday, June 26, 2019 1:34 PM To: Yao, Jiewen ; devel@edk2.groups.io Cc: Zhang, Chao B ; Hernandez Beltran, Jorge ; Han, Harry Subject: RE: [PATCH v4 0/3] Common OBB verification feature Thanks Jiewen. I'll add it with a few code style corrections. Anyone else has any comments? Regards, Jian > -----Original Message----- > From: Yao, Jiewen > Sent: Tuesday, June 25, 2019 10:09 PM > To: Wang, Jian J >; d= evel@edk2.groups.io > Cc: Zhang, Chao B >= ; Hernandez Beltran, Jorge > >; Han, Harry > > Subject: RE: [PATCH v4 0/3] Common OBB verification feature > > Thanks Jian. Comment below: > > 1) My previous comment 8 is NOT addressed. > > Please add assert for "StoredHashFvPpi->FvNumber". > if (!EFI_ERROR(Status) && StoredHashFvPpi !=3D NULL && StoredHashFvPpi- > >FvNumber > 0) { > > With that fixed, reviewed-by: Jiewen.yao@intel.com > > > Thank you > Yao Jiewen > > > > -----Original Message----- > > From: Wang, Jian J > > Sent: Thursday, June 20, 2019 9:59 AM > > To: devel@edk2.groups.io > > Cc: Zhang, Chao B >; Yao, Jiewen > > >; Hernandez Beltran,= Jorge > > >; Han, Harry > > > Subject: [PATCH v4 0/3] Common OBB verification feature > > > > >V4: change FV_HASH_FLAG_BOOT_MODE definition > > > > >V3: update per Jiewen's comments > > > > >V2: fix parameter description error found by ECC > > > > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1617 > > > > Cc: Chao Zhang > > > Cc: Jiewen Yao > > > Cc: "Hernandez Beltran, Jorge" > > > Cc: Harry Han > > > > > Jian J Wang (3): > > SecurityPkg: add definitions for OBB verification > > SecurityPkg/FvReportPei: implement a common FV verifier and reporter > > SecurityPkg: add FvReportPei.inf in dsc for build validation > > > > SecurityPkg/FvReportPei/FvReportPei.c | 416 > > ++++++++++++++++++ > > SecurityPkg/FvReportPei/FvReportPei.h | 122 +++++ > > SecurityPkg/FvReportPei/FvReportPei.inf | 57 +++ > > SecurityPkg/FvReportPei/FvReportPei.uni | 14 + > > .../FvReportPei/FvReportPeiPeiExtra.uni | 12 + > > .../Ppi/FirmwareVolumeInfoStoredHashFv.h | 62 +++ > > SecurityPkg/SecurityPkg.dec | 9 + > > SecurityPkg/SecurityPkg.dsc | 5 + > > 8 files changed, 697 insertions(+) > > create mode 100644 SecurityPkg/FvReportPei/FvReportPei.c > > create mode 100644 SecurityPkg/FvReportPei/FvReportPei.h > > create mode 100644 SecurityPkg/FvReportPei/FvReportPei.inf > > create mode 100644 SecurityPkg/FvReportPei/FvReportPei.uni > > create mode 100644 SecurityPkg/FvReportPei/FvReportPeiPeiExtra.uni > > create mode 100644 > > SecurityPkg/Include/Ppi/FirmwareVolumeInfoStoredHashFv.h > > > > -- > > 2.17.1.windows.2 --_000_FF72C7E4248F3C4E9BDF19D4918E90F24DEDF136shsmsx102ccrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Jian:

    Patch is good to me.=  Just one comment for coding style

If (AlgInfo->HashAll (FvBuffer, (UINTN)FvInfo= [FvIndex].Length, FvHashValue) =3D=3D FALSE)

 =

Is it bette= r to be if (!AlgInfo->Has= hAll (FvBuffer, (UINTN)FvInfo[FvIndex].Length, FvHashValue) = )  ?

 

 =

From: Wang, Jian J
Sent: Wednesday, June 26, 2019 1:34 PM
To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io Cc: Zhang, Chao B <chao.b.zhang@intel.com>; Hernandez Beltran,= Jorge <jorge.hernandez.beltran@intel.com>; Han, Harry <harry.han@= intel.com>
Subject: RE: [PATCH v4 0/3] Common OBB verification feature

 

Thanks Jiewen. I'll add&= nbsp;it with a few code style corrections.

Anyone else has any comment= s?

Regards,
Jian

> -----Original Message-----
> From: Yao, Jiewen > Sent: Tuesday, June 2= 5, 2019 10:09 PM
> To: Wang, Jian J = ;<jian.j.wang@intel.com>= ; devel@edk2.groups.io
> Cc: Zhang, Chao B&nbs= p;<chao.b.zhang@intel.com&= gt;; Hernandez Beltran, Jorge
> <jorge.hernandez.beltran@intel.com>; Han,&n= bsp;Harry <harry.han@intel.c= om>
> Subject: RE: [PATCH v= 4 0/3] Common OBB verification feature

> Thanks Jian. Comment = below:

> 1) My previous commen= t 8 is NOT addressed.

> Please add assert for=  "StoredHashFvPpi->FvNumber".
>   if (!EFI_ERROR(Stat= us) && StoredHashFvPpi !=3D NULL &&= ; StoredHashFvPpi-
> >FvNumber > 0) {<= /span>

> With that fixed, revi= ewed-by: Jiewen.yao@intel.com<= /a>


> Thank you
> Yao Jiewen


> > -----Original Message--= ---
> > From: Wang, Jian&n= bsp;J
> > Sent: Thursday, Ju= ne 20, 2019 9:59 AM
> > To: 
devel@edk2.groups.io

> > Cc: Zhang, Chao&nb= sp;B <chao.b.zhang@intel.= com>; Yao, Jiewen
> > <jiewen.yao@intel.com>; Hernandez Beltran,&= nbsp;Jorge
> > <jorge.hernandez.beltran@intel.com>;&nbs= p;Han, Harry <harry.han= @intel.com>
> > Subject: [PATCH v4=  0/3] Common OBB verification feature
> >
> > >V4: change FV= _HASH_FLAG_BOOT_MODE definition
> >
> > >V3: update pe= r Jiewen's comments
> >
> > >V2: fix param= eter description error found by ECC
> >
> > https://bugzilla.tianocore.org/show_b= ug.cgi?id=3D1617
> >
> > Cc: Chao Zhang&nbs= p;<chao.b.zhang@intel.com&= gt;
> > Cc: Jiewen Yao&nbs= p;<jiewen.yao@intel.com><= /span>
> > Cc: "Hernandez&nbs= p;Beltran, Jorge" <jorge.hernandez.beltran@intel.com>
> > Cc: Harry Han = ;<harry.han@intel.com>
> >
> > Jian J Wang (= 3):
> >   SecurityPkg:&nbs= p;add definitions for OBB verification
> >   SecurityPkg/FvRe= portPei: implement a common FV verifier and&n= bsp;reporter
> >   SecurityPkg:&nbs= p;add FvReportPei.inf in dsc for build valida= tion
> >
> >  SecurityPkg/FvReportPe= i/FvReportPei.c         | = ;416
> > +++++= 3;++++++++++++
> >  SecurityPkg/FvReportPe= i/FvReportPei.h         | = ;122 +++++
> >  SecurityPkg/FvReportPe= i/FvReportPei.inf       |  57&= nbsp;+++
> >  SecurityPkg/FvReportPe= i/FvReportPei.uni       |  14&= nbsp;+
> >  .../FvReportPei/FvRepo= rtPeiPeiExtra.uni       |  12&= nbsp;+
> >  .../Ppi/FirmwareVolume= InfoStoredHashFv.h      |  62 = +++
> >  SecurityPkg/SecurityPk= g.dec           &nbs= p;       |   9 +=
> >  SecurityPkg/SecurityPk= g.dsc           &nbs= p;       |   5 +=
> >  8 files chan= ged, 697 insertions(+)
> >  create mode = 100644 SecurityPkg/FvReportPei/FvReportPei.c
> >  create mode = 100644 SecurityPkg/FvReportPei/FvReportPei.h
> >  create mode = 100644 SecurityPkg/FvReportPei/FvReportPei.inf
> >  create mode = 100644 SecurityPkg/FvReportPei/FvReportPei.uni
> >  create mode = 100644 SecurityPkg/FvReportPei/FvReportPeiPeiExtra.uni
> >  create mode = 100644
> > SecurityPkg/Include/Ppi/Firm= wareVolumeInfoStoredHashFv.h
> >
> > --
> > 2.17.1.windows.2=

--_000_FF72C7E4248F3C4E9BDF19D4918E90F24DEDF136shsmsx102ccrcor_--