From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v2, 2/2] rsa: Fix return value and masked error
Date: Mon, 25 Jul 2016 22:31:40 -0400 [thread overview]
Message-ID: <20160726023140.GA14698@bill-the-cat> (raw)
In-Reply-To: <20160722065841.18093-3-mario.six@gdsys.cc>
On Fri, Jul 22, 2016 at 08:58:41AM +0200, mario.six at gdsys.cc wrote:
> When signing images, we repeatedly call fit_add_file_data() with
> successively increasing size values to include the keys in the DTB.
>
> Unfortunately, if large keys are used (such as 4096 bit RSA keys), this
> process fails sometimes, and mkimage needs to be called repeatedly to
> integrate the keys into the DTB.
>
> This is because fit_add_file_data actually returns the wrong error
> code, and the loop terminates prematurely, instead of trying again with
> a larger size value.
>
> This patch corrects the return value by fixing the return value of
> fdt_add_bignum, fixes a case where an error is masked by a unconditional
> setting of a return value variable, and also removes a error message,
> which is misleading, since we actually allow the function to fail. A
> (hopefully helpful) comment is also added to explain the lack of error
> message.
>
> This is probably related to 1152a05 ("tools: Correct error handling in
> fit_image_process_hash()") and the corresponding error reported here:
>
> https://www.mail-archive.com/u-boot at lists.denx.de/msg217417.html
>
> Signed-off-by: Mario Six <mario.six@gdsys.cc>
> Reviewed-by: Simon Glass <sjg@chromium.org>
The delta between v1 and v2 has been applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160725/7d3575fe/attachment.sig>
prev parent reply other threads:[~2016-07-26 2:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 6:58 [U-Boot] [PATCH v2 0/2] Fix signing problems with large keys Mario Six
2016-07-22 6:58 ` [U-Boot] [PATCH v2 1/2] tools: Fix return code of fit_image_process_sig() Mario Six
2016-07-26 2:31 ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-07-22 6:58 ` [U-Boot] [PATCH v2 2/2] rsa: Fix return value and masked error Mario Six
2016-07-23 2:57 ` Simon Glass
2016-07-26 2:31 ` Tom Rini [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=20160726023140.GA14698@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.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