mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: mfe@pengutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] optee: don't warn about missing OP-TEE header
Date: Wed, 28 Feb 2024 19:03:20 +0100	[thread overview]
Message-ID: <20240228180319.2739412-1-a.fatoum@pengutronix.de> (raw)

OP-TEE header is checked once in PBL, saved into scratch area after
verification and then checked again in barebox proper.

The check in PBL fails silently, but the check in barebox proper that
should always follow, because the header isn't written to the scratch
area is printed with error log level.

Printing an error in either case is wrong though as using a raw OP-TEE
binary without header is a valid use case and the OP-TEE header may
also be missing when barebox is chainloaded from a running barebox.

Therefore reduce the message to debug log level.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/optee.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/optee.c b/common/optee.c
index 34667f1f51e0..a8a43554e757 100644
--- a/common/optee.c
+++ b/common/optee.c
@@ -14,8 +14,8 @@ int optee_verify_header(const struct optee_header *hdr)
 		return -EINVAL;
 
 	if (hdr->magic != OPTEE_MAGIC) {
-		pr_err("Invalid header magic 0x%08x, expected 0x%08x\n",
-			   hdr->magic, OPTEE_MAGIC);
+		pr_debug("Invalid header magic 0x%08x, expected 0x%08x\n",
+			 hdr->magic, OPTEE_MAGIC);
 		return -EINVAL;
 	}
 
-- 
2.39.2




             reply	other threads:[~2024-02-28 18:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28 18:03 Ahmad Fatoum [this message]
2024-02-29  9:10 ` Marco Felsch
2024-02-29  9:17   ` Ahmad Fatoum
2024-02-29  9:33     ` Marco Felsch
2024-02-29  9:46       ` Ahmad Fatoum
2024-02-29 11:13         ` Marco Felsch
2024-02-29 11:46           ` Ahmad Fatoum
2024-03-01  9:21 ` Sascha Hauer

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=20240228180319.2739412-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=mfe@pengutronix.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