All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] vboot: Do not use hashed-strings offset
Date: Thu, 7 Jun 2018 12:28:32 -0800	[thread overview]
Message-ID: <CAPnjgZ3OomASidQj4PyfOuYPjGw+K3xQ6+WLMRyz9DW-s4Xg_w@mail.gmail.com> (raw)
In-Reply-To: <20180603144650.0a2f1ac5840f3276efdb8a34@gmail.com>

Hi Teddy,

On 3 June 2018 at 10:46, Teddy Reed <teddy.reed@gmail.com> wrote:
>
> The hashed-strings signature property includes two uint32_t values.
> The first is unneeded as there should never be a start offset into the
> strings region. The second, the size, is needed because the added
> signature node appends to this region.
>
> See tools/image-host.c, where a static 0 value is used for the offset.
>
> Signed-off-by: Teddy Reed <teddy.reed@gmail.com>
> ---
>  common/image-sig.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/common/image-sig.c b/common/image-sig.c
> index f65d883..9b0a872 100644
> --- a/common/image-sig.c
> +++ b/common/image-sig.c
> @@ -372,8 +372,7 @@ int fit_config_check_sig(const void *fit, int noffset, int required_keynode,
>         /* Add the strings */
>         strings = fdt_getprop(fit, noffset, "hashed-strings", NULL);
>         if (strings) {
> -               fdt_regions[count].offset = fdt_off_dt_strings(fit) +
> -                               fdt32_to_cpu(strings[0]);
> +               fdt_regions[count].offset = fdt_off_dt_strings(fit);

Can you please add a comment here, and in image-host.c, so that we
keep these in sync?

>                 fdt_regions[count].size = fdt32_to_cpu(strings[1]);
>                 count++;
>         }
> --
> 2.7.4
>

Regards,
Simon

  reply	other threads:[~2018-06-07 20:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-03 18:46 [U-Boot] [PATCH] vboot: Do not use hashed-strings offset Teddy Reed
2018-06-07 20:28 ` Simon Glass [this message]
2018-06-07 21:58   ` Teddy Reed

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=CAPnjgZ3OomASidQj4PyfOuYPjGw+K3xQ6+WLMRyz9DW-s4Xg_w@mail.gmail.com \
    --to=sjg@chromium.org \
    --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 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.