All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ge Yang <yangge1116@126.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>, ardb@kernel.org
Cc: jarkko@kernel.org, sathyanarayanan.kuppuswamy@linux.intel.com,
	ilias.apalodimas@linaro.org, jgg@ziepe.ca,
	linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, liuzixing@hygon.cn
Subject: Re: [PATCH V5] efi/tpm: Fix the issue where the CC platforms event log header can't be correctly identified
Date: Sat, 12 Jul 2025 11:24:25 +0800	[thread overview]
Message-ID: <f43764cd-597b-487f-878b-a071df12f414@126.com> (raw)
In-Reply-To: <31d1da85f3ec863d16f4bcb173dab687efd6ceed.camel@HansenPartnership.com>



在 2025/7/12 11:03, James Bottomley 写道:
> On Sat, 2025-07-12 at 10:55 +0800, yangge1116@126.com wrote:
>> From: Ge Yang <yangge1116@126.com>
>>
>> Since commit d228814b1913 ("efi/libstub: Add get_event_log() support
>> for CC platforms") reuses TPM2 support code for the CC platforms,
>> when launching a TDX virtual machine with coco measurement enabled,
>> the following error log is generated:
>>
>> [Firmware Bug]: Failed to parse event in TPM Final Events Log
>>
>> Call Trace:
>> efi_config_parse_tables()
>>    efi_tpm_eventlog_init()
>>      tpm2_calc_event_log_size()
>>        __calc_tpm2_event_size()
>>
>> The pcr_idx value in the Intel TDX log header is 1, causing the
>> function __calc_tpm2_event_size() to fail to recognize the log
>> header, ultimately leading to the "Failed to parse event in TPM Final
>> Events Log" error.
>>
>> According to UEFI Specification 2.10, Section 38.4.1: For TDX, TPM
>> PCR 0 maps to MRTD, so the log header uses TPM PCR 1 instead.
> 
> This isn't a justification ... Intel just screwed up.  Whatever the
> UEFI spec says about PCR mapping, the log spec the TCG produces
> requires the header event to have a pcrIndex of 0 and, since it isn't
> recorded in a PCR, it doesn't matter what the mapping is.
> 
> Just say Intel misread the spec and wrongly sets pcrIndex to 1 in the
> header and since they did this, we fear others might, so we're relaxing
> the header check.
> 

OK, thanks.


> Regards,
> 
> James


      reply	other threads:[~2025-07-12  3:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-12  2:55 [PATCH V5] efi/tpm: Fix the issue where the CC platforms event log header can't be correctly identified yangge1116
2025-07-12  3:03 ` James Bottomley
2025-07-12  3:24   ` Ge Yang [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-all 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=f43764cd-597b-487f-878b-a071df12f414@126.com \
    --to=yangge1116@126.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=ardb@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuzixing@hygon.cn \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.