From: Marco Felsch <m.felsch@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org, Jonas Rebmann <jre@pengutronix.de>
Subject: Re: [PATCH] fixup! FIT: compare key name hint with streq_ptr for clarity
Date: Wed, 22 Oct 2025 11:57:35 +0200 [thread overview]
Message-ID: <20251022095735.bqyrvior5jsq6rho@pengutronix.de> (raw)
In-Reply-To: <20251022093813.4191649-1-a.fatoum@pengutronix.de>
On 25-10-22, Ahmad Fatoum wrote:
> FIT: fix use of multiple FIT keys
>
> streq_ptr returns true if both arguments are NULL. This can happen if we
Damn!
> have no FIT key name hints at all and shouldn't lead to ignoring keys,
> so add the check for the hint.
>
> Cc: Marco Felsch <m.felsch@pengutronix.de>
> Reported-by: Jonas Rebmann <jre@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> common/image-fit.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/common/image-fit.c b/common/image-fit.c
> index 3017ccb5048f..22f768e7a070 100644
> --- a/common/image-fit.c
> +++ b/common/image-fit.c
> @@ -290,8 +290,8 @@ static int fit_check_signature(struct fit_handle *handle, struct device_node *si
> for_each_public_key(key) {
> fail_reason = "verification failed";
>
> - /* Don't recheck with same key as before */
> - if (streq_ptr(key->key_name_hint, key_name))
> + /* Don't recheck with same key_name as before */
> + if (key_name && streq_ptr(key->key_name_hint, key_name))
> continue;
>
> ret = public_key_verify(key, sig_value, sig_len, hash, algo);
> --
> 2.47.3
>
>
--
#gernperDu
#CallMeByMyFirstName
Pengutronix e.K. | |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
prev parent reply other threads:[~2025-10-22 9:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 9:38 Ahmad Fatoum
2025-10-22 9:56 ` Sascha Hauer
2025-10-22 9:57 ` Marco Felsch [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=20251022095735.bqyrvior5jsq6rho@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=jre@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