public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Zhang, Chao B" <chao.b.zhang@intel.com>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: "Zeng, Star" <star.zeng@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"Gao, Liming" <liming.gao@intel.com>
Subject: Re: Missing boot related measurements at TPM 2.0 PCRs 0-7 with OVMF
Date: Thu, 9 Aug 2018 18:09:32 +0200	[thread overview]
Message-ID: <b8af998b-90c8-cd62-7b5e-fc5320bc4e30@redhat.com> (raw)
In-Reply-To: <FF72C7E4248F3C4E9BDF19D4918E90F24982B109@shsmsx102.ccr.corp.intel.com>

On 08/09/18 17:46, Zhang, Chao B wrote:
> Hi Laszlo:
>    We seriously considered such dependency change in design. The library is shared between DXE & PEI. So PCD is the generic way to share the data and reduce real register touch.
> Therefore, the problem is that Library can’t be used by SEC anymore.  The decision is,  since there is no SEC usage so far, we’d like to change Lib type first & Split it when there is real usage.
>    I think your suggestion to split the patch & provide more detailed information in log is good.  I will follow this rule later on.

Right, I agree that, if the goal was to exclude SEC from the permitted
client module types, then the LIBRARY_CLASS restriction change was valid.

I also agree that placing the LIBRARY_CLASS change into the exact same
patch was correct, as the introduction of the PCD dependency. In fact,
in this case, separating the LIBRARY_CLASS restrictions to a different
patch would have been wrong -- because then a commit would exist where
the lib instance is no longer suitable for SEC, but the LIBRARY_CLASS
restriction wouldn't enforce that.

Therefore, in this case, the missing bit was really only a better the
commit message -- basically, your above argument, about excluding SEC.

... A workflow comment again: this is now the 2nd time in a short
timeframe that I realize that Intel performs careful investigation in
the background, writes the corresponding patch, and then omits the
entire investigation from the commit message. PLEASE, don't do that. You
are throwing away your own work, and you are wasting the time of the
community.

Commit messages embody communication with people. That is the important
part. That is what makes or breaks Open Development. The code in the
body of the patch is just a consequence of the commit message.

Thanks,
Laszlo

> 
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek
> Sent: Thursday, August 9, 2018 10:56 PM
> To: Marc-André Lureau <marcandre.lureau@gmail.com>; Zhang, Chao B <chao.b.zhang@intel.com>
> Cc: Zeng, Star <star.zeng@intel.com>; edk2-devel@lists.01.org; Gao, Liming <liming.gao@intel.com>
> Subject: Re: [edk2] Missing boot related measurements at TPM 2.0 PCRs 0-7 with OVMF
> 
> On 08/09/18 16:09, Marc-André Lureau wrote:
>> Hi
>>
>> On Mon, Aug 6, 2018 at 5:26 PM, Zhang, Chao B <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>> wrote:
>>> Hi Ricardo
>>>    I double checked OVMF Debug Build. All the 2 PCDs are already built as Dynamic PCD. There should be no problem
>>> Setting & Getting these PCD as Dynamic. We also verified this feature on several real hardware platforms with same configuration.
>>> No issue reported.
>>>    Can you share me the boot log?
>>>
>>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek
>>> Sent: Friday, August 3, 2018 10:46 PM
>>> To: Ricardo Araújo <ricardo@lsd.ufcg.edu.br<mailto:ricardo@lsd.ufcg.edu.br>>; Zhang, Chao B <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>>
>>> Cc: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>>
>>> Subject: Re: [edk2] Missing boot related measurements at TPM 2.0 PCRs 0-7 with OVMF
>>>
>>> On 08/03/18 15:39, Ricardo Araújo wrote:
>>>> Hi folks, sorry for the delay!
>>>>
>>>> I've just applied the patch and got the same error message and empty PCRs.
>>>
>>> Thanks for the feedback -- although it's not the kind I had hoped for :)
>>>
>>> I have now filed "[regression] SecurityPkg commit f15cb995bb38 breaks
>>> TPM2_ENABLE in OvmfPkg":
>>>
>>>   https://bugzilla.tianocore.org/show_bug.cgi?id=1075
>>>
>>> Ricardo, please consider registering in the TianoCore Bugzilla, and
>>> adding yourself to the CC list of BZ#1075.
>>>
>>> For now, I have assigned the BZ to Marc-André, for triaging / analysis.
>>> swtpm is not set up on my end, and the TPM2 enablement for OvmfPkg was
>>> contributed by Marc-André. Marc-André, are you OK with this? The BZ
>>> assignment is about root-causing the issue, at the moment.
>>
>> That fixes the problem for me:
>>
>> -  Constructor                    = Tpm2DeviceLibConstructor
>> +  CONSTRUCTOR                    = Tpm2DeviceLibConstructor
> 
> Nice! \o/
> 
>>
>> It looks to me like the patch "SecurityPkg: Cache TPM interface type
>> info" could use more reviews.
>>
>> Fwiw, I also question why that change (just the line above) was necessary:
>>
>> -  LIBRARY_CLASS                  = Tpm2DeviceLib
>> +  LIBRARY_CLASS                  = Tpm2DeviceLib|PEIM DXE_DRIVER
>> DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
> 
> It's usually a good idea to spell out the client module types that are
> permitted to consume the specific library instance, for a given library
> class requirement. Different module types have different restrictions
> and devices at their disposal, in their respective environments /
> firmware phases, and library instances may be specific to those
> restrictions / devices.
> 
> In this specific case, a PcdLib dependency (more, precisely, a dynamic
> PCD dependency) was added to the library instance, and so it might make
> sense to restrict the library instance to module types whose
> environments (their entry point functions anyway) support dynamic PCDs.
> 
> I do agree though that this change should have been made either in a
> separate patch (if the change isn't closely related to the PCD
> dependency), *or* (if it is) it should have been explained / justified
> specifically, in the commit message. The commit message is very lacking
> indeed.
> 
> Thank you for tracking this down!
> 
> Laszlo
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel
> 



      reply	other threads:[~2018-08-09 16:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 17:33 Missing boot related measurements at TPM 2.0 PCRs 0-7 with OVMF Ricardo Araújo
2018-08-01 17:50 ` Ricardo Araújo
2018-08-01 21:49   ` Laszlo Ersek
2018-08-02  2:04     ` Zhang, Chao B
2018-08-02 13:14       ` Laszlo Ersek
2018-08-03  0:22         ` Zhang, Chao B
2018-08-03 13:39           ` Ricardo Araújo
2018-08-03 14:45             ` Laszlo Ersek
2018-08-06 15:26               ` Zhang, Chao B
2018-08-09 14:09                 ` Marc-André Lureau
2018-08-09 14:55                   ` Laszlo Ersek
2018-08-09 15:46                     ` Zhang, Chao B
2018-08-09 16:09                       ` Laszlo Ersek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8af998b-90c8-cd62-7b5e-fc5320bc4e30@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox