From: Tom Rini <trini@konsulko.com>
To: Paul HENRYS <paul.henrys_ext@softathome.com>
Cc: u-boot@lists.u-boot-project.org, alpernebiyasak@gmail.com,
philippe.reynes@softathome.com
Subject: Re: [PATCH] binman: pre_load: add sign-size parameter for partial image signing
Date: Fri, 20 Nov 2026 10:24:40 -0600 [thread overview]
Message-ID: <20261120162440.GF3176972@bill-the-cat> (raw)
In-Reply-To: <9a1f82e3-e4e0-49b3-a73c-62ce34ff7f9b@softathome.com>
[-- Attachment #1: Type: text/plain, Size: 3528 bytes --]
On Fri, Nov 20, 2026 at 05:00:12PM +0100, Paul HENRYS wrote:
> Dear Tom,
>
> On 20/11/2026 16:40, Tom Rini wrote:
> > On Fri, Nov 20, 2026 at 04:36:26PM +0100, Paul HENRYS wrote:
> > > Add an optional sign-size property to the pre-load entry type, allowing
> > > users to sign only a leading portion of the image rather than the whole
> > > thing. When set, only the first sign-size bytes are hashed and the
> > > image_size field in the pre-load header is set accordingly.
> > >
> > > This modification is particularly useful when signing FIT images whose
> > > data are stored externally to the FIT and hashes are already
> > > calculated and stored in the FIT header.
> > >
> > > Assisted-by: Claude Sonnet 4.6
> > Our AI policy is currently "Please don't", and I do owe and have been
> > half drafting a longer write-up on that.
> Does it mean, don't use AI or just don't add the prefix?
> I saw some other commits with AI assisted information so I just added it as
> well.
> I just pushed another patch after reading your message. I will also correct
> that there.
That's part of what makes it harder to write up. Yes, it's "please don't
use AI", and also yes, some people don't proactively disclose and of
those some content is clear enough that no one would know if it wasn't
disclosed.
> > > Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
> > > ---
> > > tools/binman/etype/pre_load.py | 46 ++++++++++++++++---
> > > tools/binman/ftest.py | 41 +++++++++++++++++
> > > .../pre_load_ecdsa_sign_size_too_large.dts | 23 ++++++++++
> > > .../pre_load_rsa_sign_size_too_large.dts | 23 ++++++++++
> > > .../test/security/pre_load_sign_size.dts | 23 ++++++++++
> > > 5 files changed, 150 insertions(+), 6 deletions(-)
> > > create mode 100644 tools/binman/test/security/pre_load_ecdsa_sign_size_too_large.dts
> > > create mode 100644 tools/binman/test/security/pre_load_rsa_sign_size_too_large.dts
> > > create mode 100644 tools/binman/test/security/pre_load_sign_size.dts
> > >
> > > diff --git a/tools/binman/etype/pre_load.py b/tools/binman/etype/pre_load.py
> > > index 7890c1c62a8..3612307d4ab 100644
> > > --- a/tools/binman/etype/pre_load.py
> > > +++ b/tools/binman/etype/pre_load.py
> > > @@ -53,6 +53,11 @@ class Entry_pre_load(Entry_collection):
> > > - key-name: Filename of the private key to sign
> > > - header-size: Total size of the header
> > > - version: Version of the header
> > > + - sign-size: Number of bytes of the image to sign (default: sign the
> > > + entire image). When set, only the first sign-size bytes are hashed
> > > + and the header image_size field is set to this value. This allows
> > > + the runtime verifier to authenticate a leading portion of the image
> > > + while ignoring any trailing data.
> > Why does this comment need to be almost 5x as long as all of the others
> > for this function? Thanks.
> Here, that is a typical abuse of the AI which is much better than me at
> writing English but more prolix...
> I missed that and will sum it up. Thx.
I figured as much. And I really hate the notion that AI is better at
writing, in part because I keep track of how often AI hallucinates
(rather than questionable translation) over on my social media, of the
few emails a day I throw at it, to see if my own understanding of them
is correct.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2026-11-20 16:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 15:36 [PATCH] binman: pre_load: add sign-size parameter for partial image signing Paul HENRYS
2026-11-20 15:40 ` Tom Rini
2026-11-20 16:00 ` Paul HENRYS
2026-11-20 16:24 ` 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=20261120162440.GF3176972@bill-the-cat \
--to=trini@konsulko.com \
--cc=alpernebiyasak@gmail.com \
--cc=paul.henrys_ext@softathome.com \
--cc=philippe.reynes@softathome.com \
--cc=u-boot@lists.u-boot-project.org \
/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.