u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	 Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Alexander Graf <agraf@csgraf.de>,  Bin Meng <bmeng.cn@gmail.com>,
	Christian Gmeiner <christian.gmeiner@gmail.com>
Subject: Re: [PATCH v3 1/3] efi_loader: add SMBIOS table measurement
Date: Fri, 1 Oct 2021 09:23:33 -0600	[thread overview]
Message-ID: <CAPnjgZ2Dj26mXRyoGQdZDu9frW2OPTPOka2mNCf6hH0A=7Q5jw@mail.gmail.com> (raw)
In-Reply-To: <20211001111844.7422-2-masahisa.kojima@linaro.org>

Hi,

On Fri, 1 Oct 2021 at 05:19, Masahisa Kojima <masahisa.kojima@linaro.org> wrote:
>
> TCG PC Client spec requires to measure the SMBIOS
> table that contain static configuration information
> (e.g. Platform Manufacturer Enterprise Number assigned by IANA,
> platform model number, Vendor and Device IDs for each SMBIOS table).
>
> The device- and environment-dependent information such as
> serial number is cleared to zero or space character for
> the measurement.
>
> Existing smbios_string() function returns pointer to the string
> with const qualifier, but exisintg use case is updating version
> string and const qualifier must be removed.
> This commit removes const qualifier from smbios_string()
> return value and reuses to clear the strings for the measurement.
>
> This commit also fixes the following compiler warning:
>
> lib/smbios-parser.c:59:39: warning: cast to pointer from integer of
> different size [-Wint-to-pointer-cast]
>   const struct smbios_header *header = (struct smbios_header *)entry->struct_table_address;
>
> Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
> ---
>
> Changes in v3:
> - TCG spec says EV_SEPARATOR must be the last,
>   swap the order of measurement
>
> Changes in v2:
> - use flexible array for table_entry field
> - modify funtion name to find_smbios_table()
> - remove unnecessary const qualifier from smbios_string()
> - create non-const version of next_header()
>
>  include/efi_loader.h          |   2 +
>  include/efi_tcg2.h            |  15 ++++
>  include/smbios.h              |  17 +++-
>  lib/efi_loader/Kconfig        |   1 +
>  lib/efi_loader/efi_boottime.c |   2 +
>  lib/efi_loader/efi_smbios.c   |   2 -
>  lib/efi_loader/efi_tcg2.c     |  84 +++++++++++++++++++
>  lib/smbios-parser.c           | 152 +++++++++++++++++++++++++++++++---
>  8 files changed, 261 insertions(+), 14 deletions(-)

As part of this work, can you or someone else at Linaro please add
tests for the SMBIOS code?

Also as mentioned in the previous version, we should have tests for
this. Ilias suggested what needs to be added to the sandbox emulator.

Thanks,
Simon

  reply	other threads:[~2021-10-01 15:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 11:18 [PATCH v3 0/3] Enhance Measured Boot Masahisa Kojima
2021-10-01 11:18 ` [PATCH v3 1/3] efi_loader: add SMBIOS table measurement Masahisa Kojima
2021-10-01 15:23   ` Simon Glass [this message]
2021-10-01 19:47     ` Ilias Apalodimas
2021-10-21  0:12   ` Heinrich Schuchardt
2021-10-21  8:38     ` Masahisa Kojima
2021-10-21  8:49       ` Heinrich Schuchardt
2021-10-21 12:52         ` Masahisa Kojima
2021-10-21 12:59           ` Heinrich Schuchardt
2021-10-21 13:41             ` Masahisa Kojima
2021-11-02 14:56               ` Simon Glass
2021-11-04  1:26                 ` Masahisa Kojima
2021-10-01 11:18 ` [PATCH v3 2/3] efi_loader: add UEFI GPT measurement Masahisa Kojima
2021-10-01 15:23   ` Simon Glass
2021-10-22 10:49     ` Masahisa Kojima
2021-10-01 16:28   ` Heinrich Schuchardt
2021-10-04  3:11     ` Masahisa Kojima
2021-10-01 11:18 ` [PATCH v3 3/3] efi_loader: add DeployedMode and AuditMode variable measurement Masahisa Kojima
2021-10-01 16:43   ` Heinrich Schuchardt
2021-10-04  2:30     ` Masahisa Kojima
2021-10-22  8:04       ` Masahisa Kojima

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='CAPnjgZ2Dj26mXRyoGQdZDu9frW2OPTPOka2mNCf6hH0A=7Q5jw@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=agraf@csgraf.de \
    --cc=bmeng.cn@gmail.com \
    --cc=christian.gmeiner@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=masahisa.kojima@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).