All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de, git@xilinx.com, ilias.apalodimas@linaro.org
Cc: Alexander Graf <agraf@csgraf.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>
Subject: [PATCH] efi_loader: Do not show error message if TPM is not present
Date: Mon, 29 Nov 2021 14:06:02 +0100	[thread overview]
Message-ID: <657a869c04e9b09e3bd2e6fd74ff94320b7fbe9b.1638191161.git.michal.simek@xilinx.com> (raw)

For systems which have TPM support enabled but actual device is missing
there is no reason to show a message that measurement failed.
That's why properly check error code which is returned.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 lib/efi_loader/efi_image_loader.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c
index eb95580538cc..c6a254dc25dd 100644
--- a/lib/efi_loader/efi_image_loader.c
+++ b/lib/efi_loader/efi_image_loader.c
@@ -934,8 +934,9 @@ efi_status_t efi_load_pe(struct efi_loaded_image_obj *handle,
 
 #if CONFIG_IS_ENABLED(EFI_TCG2_PROTOCOL)
 	/* Measure an PE/COFF image */
-	if (tcg2_measure_pe_image(efi, efi_size, handle,
-				  loaded_image_info))
+	ret = tcg2_measure_pe_image(efi, efi_size, handle,
+				    loaded_image_info);
+	if (ret && ret != EFI_NOT_FOUND)
 		log_err("PE image measurement failed\n");
 #endif
 
-- 
2.33.1


             reply	other threads:[~2021-11-29 13:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 13:06 Michal Simek [this message]
2021-11-29 13:30 ` [PATCH] efi_loader: Do not show error message if TPM is not present Ilias Apalodimas
2021-11-29 13:44   ` Michal Simek
2021-11-29 13:52     ` Ilias Apalodimas

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=657a869c04e9b09e3bd2e6fd74ff94320b7fbe9b.1638191161.git.michal.simek@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=agraf@csgraf.de \
    --cc=git@xilinx.com \
    --cc=ilias.apalodimas@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 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.