All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
	 Simon Glass <sjg@chromium.org>, Alexander Graf <agraf@csgraf.de>
Subject: Re: [PATCH] efi_loader: fix BootOrder variable measurement handling
Date: Tue, 9 Nov 2021 11:44:19 +0200	[thread overview]
Message-ID: <CAC_iWjLRO4iUSuvmW8YyB1riDCZ6LVhSuhOm2gQN8Hi0viaQeg@mail.gmail.com> (raw)
In-Reply-To: <20211109094454.32570-1-masahisa.kojima@linaro.org>

On Tue, 9 Nov 2021 at 11:42, Masahisa Kojima <masahisa.kojima@linaro.org>
wrote:

> UEFI specification does not require that BootOrder is defined.
> In current implementation, boot variable measurement fails and
> returns EFI_NOT_FOUND if BootOrder is not defined.
>
> This commit correcly handles this case, skip the boot variable
> measurement if BootOrder is not defined.
>
> Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
> ---
>  lib/efi_loader/efi_tcg2.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
> index 586f73af6d..189e4a5ba5 100644
> --- a/lib/efi_loader/efi_tcg2.c
> +++ b/lib/efi_loader/efi_tcg2.c
> @@ -1452,8 +1452,8 @@ static efi_status_t
> tcg2_measure_boot_variable(struct udevice *dev)
>         boot_order = efi_get_var(var_name, &efi_global_variable_guid,
>                                  &var_data_size);
>         if (!boot_order) {
> -               ret = EFI_NOT_FOUND;
> -               goto error;
> +               /* If "BootOrder" is not defined, skip the boot variable
> measurement */
> +               return EFI_SUCCESS;
>         }
>
>         ret = tcg2_measure_variable(dev, 1, EV_EFI_VARIABLE_BOOT2,
> var_name,
> --
> 2.17.1
>
> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

  reply	other threads:[~2021-11-09  9:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09  9:44 [PATCH] efi_loader: fix BootOrder variable measurement handling Masahisa Kojima
2021-11-09  9:44 ` Ilias Apalodimas [this message]
2021-11-09 11:00 ` Heinrich Schuchardt

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_iWjLRO4iUSuvmW8YyB1riDCZ6LVhSuhOm2gQN8Hi0viaQeg@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.