All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>,
	Simon Glass <sjg@chromium.org>,  Alexander Graf <agraf@csgraf.de>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH 2/2] efi_selftest: add selftest for EFI_TCG2_PROTOCOL and Measured Boot
Date: Sat, 30 Oct 2021 09:02:02 +0300	[thread overview]
Message-ID: <CAC_iWjLAvktF1C7MpORjRLqzJ0d4-pfauyqn4pbw7EUsia+Gog@mail.gmail.com> (raw)
In-Reply-To: <b2df632b-0d2c-7282-bf6c-a67a53cc441d@gmx.de>

Hi Heinrich

[...]

> >>> +$(obj)/efi_selftest_tcg2.o: $(obj)/efi_miniapp_file_image_measuredboot.h
> >>> diff --git a/lib/efi_selftest/efi_selftest_miniapp_measuredboot.c b/lib/efi_selftest/efi_selftest_miniapp_measuredboot.c
> >>
> >> Thank you for going the extra mile and adding the test.
> >>
> >> Which image is actually loaded seems to be irrelevant for the test. Can
> >> we reuse an existing one, e.g. efi_miniapp_file_image_return.h?
> >>
> >> I guess the PCR related to the loaded image is not checked as it will
> >> depend on the build tools and date.
> >
> > Sorry, I'm doing wrong.
> > Actually this selftest verifies the PE/COFF image measurement, so measuremt
> > will be different depending on the build tools and date.
> >   # In my build environment, timestamp is set to all zero.
> >
> > To test the PE/COFF image measurement, I must prepare the
> > static PE/COFF image. I plan to add efi_miniapp_file_image_measuredboot.h
> > as a pre-compiled small static PE/COFF image for the measurement test,
> > instead of adding efi_selftest_miniapp_measuredboot.c or reusing existing one.
>
> You will need one image per UEFI architecture (ia32, x64, arm, aa64,
> riscv32, riscv64). You could present the image via the
> EFI_LOAD_FILE2_PROTOCOL, see lib/efi_selftest/efi_selftest_load_file.c.

The EFI TCG2 is governed by a spec.  What it basically does is extend
a number of hardware PCRs with a sha1/256/384/512 for a given image.
Wouldn't performing the selftest for arm/arm64 be enough?  What am I
missing?

[...]

Regards
/Ilias

  reply	other threads:[~2021-10-30  6:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 11:24 [PATCH 0/2] add selftest for EFI_TCG2_PROTOCOL and Measured Boot Masahisa Kojima
2021-10-22 11:24 ` [PATCH 1/2] efi_loader: add missing const qualifier Masahisa Kojima
2021-10-23  8:40   ` Heinrich Schuchardt
2021-10-23 17:21     ` Ilias Apalodimas
2021-10-22 11:24 ` [PATCH 2/2] efi_selftest: add selftest for EFI_TCG2_PROTOCOL and Measured Boot Masahisa Kojima
2021-10-23  9:42   ` Heinrich Schuchardt
2021-10-25  7:59     ` Masahisa Kojima
2021-10-25  9:43       ` Heinrich Schuchardt
2021-10-30  6:02         ` Ilias Apalodimas [this message]
2021-10-30  6:13           ` Heinrich Schuchardt
2021-11-01  9:38             ` Masahisa Kojima
2021-10-24 19:54 ` [PATCH 0/2] " Simon Glass
2021-11-02  8:03   ` Masahisa Kojima
2021-11-02 14:55     ` Simon Glass
2021-11-02 16:27       ` Ilias Apalodimas
2021-11-05  2:02         ` Simon Glass

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=CAC_iWjLAvktF1C7MpORjRLqzJ0d4-pfauyqn4pbw7EUsia+Gog@mail.gmail.com \
    --to=ilias.apalodimas@linaro.org \
    --cc=agraf@csgraf.de \
    --cc=masahisa.kojima@linaro.org \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /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.