public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Eddie James <eajames@linux.ibm.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH 0/3] tpm: Support boot measurements
Date: Thu, 5 Jan 2023 15:44:48 +0200	[thread overview]
Message-ID: <Y7bUUJxLlZ+1VORj@hades> (raw)
In-Reply-To: <42398bef-dafb-3a2a-f369-f995b6f06c0f@linux.ibm.com>

Hi Eddie,


On Wed, Jan 04, 2023 at 08:55:06AM -0600, Eddie James wrote:
> 
> On 1/4/23 01:47, Ilias Apalodimas wrote:
> > Hi Eddie,
> > Thanks for the patch
> > 
> > Looking at the patch there's a lot of code duplication with
> > lib/efi_loader/efi_tcg2.c.
> > Any reason why we aren't reusing that ?
> 
> 
> Hi,
> 
> Well the EFI code can't be used directly without configuring to include the
> EFI subsystem and exporting a bunch of those functions in a header file
> somewhere, so I added the functions in the generic tpm librrary. Now it's a
> matter of doing the work to use the generic functions in the EFI system. I
> can do that in this series if necesssary, I just haven't gotten to it.

Doing it the other way around is easier.  Just carve out the functions you
want from efi_tcg.c to tpm-v2.c and use them for bootm measurements.  Then
the rest of the EFI will remain unaffected.

Cheers
/Ilias
> 
> Thanks,
> 
> Eddie
> 
> 
> > 
> > Regards
> > /Ilias
> > 
> > On Tue, 3 Jan 2023 at 22:42, Eddie James <eajames@linux.ibm.com> wrote:
> > > This series adds support for measuring the boot images more generically
> > > than the existing EFI support. The series includes optional measurement
> > > from the bootm command.
> > > Eventually the EFI code could be refactored to use the generic functions.
> > > 
> > > Eddie James (3):
> > >    tpm: Fix spelling for tpmu_ha union
> > >    tpm: Support boot measurements
> > >    bootm: Support boot measurement
> > > 
> > >   boot/bootm.c       |  53 ++++
> > >   cmd/bootm.c        |   2 +
> > >   common/Kconfig     |   6 +
> > >   include/efi_tcg2.h |  44 ---
> > >   include/image.h    |   1 +
> > >   include/tpm-v2.h   | 139 ++++++++-
> > >   lib/tpm-v2.c       | 700 +++++++++++++++++++++++++++++++++++++++++++++
> > >   7 files changed, 899 insertions(+), 46 deletions(-)
> > > 
> > > --
> > > 2.31.1
> > > 

      parent reply	other threads:[~2023-01-05 13:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 20:41 [PATCH 0/3] tpm: Support boot measurements Eddie James
2023-01-03 20:42 ` [PATCH 1/3] tpm: Fix spelling for tpmu_ha union Eddie James
2023-01-04  7:48   ` Ilias Apalodimas
2023-01-03 20:42 ` [PATCH 2/3] tpm: Support boot measurements Eddie James
2023-01-03 20:42 ` [PATCH 3/3] bootm: Support boot measurement Eddie James
2023-01-04  9:56   ` Etienne Carriere
2023-01-04 14:56     ` Eddie James
2023-01-04 20:01   ` Simon Glass
2023-01-04  7:47 ` [PATCH 0/3] tpm: Support boot measurements Ilias Apalodimas
2023-01-04 14:55   ` Eddie James
2023-01-04 20:01     ` Simon Glass
2023-01-05 13:44     ` Ilias Apalodimas [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=Y7bUUJxLlZ+1VORj@hades \
    --to=ilias.apalodimas@linaro.org \
    --cc=eajames@linux.ibm.com \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox