U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Ziswiler <marcel@ziswiler.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [REGRESSION] commit 3ef46a9 "Fix hash verification" breaks crc32 verify
Date: Tue, 05 May 2015 14:32:41 +0200	[thread overview]
Message-ID: <1430829161.2850.29.camel@localhost.localdomain> (raw)

U-Boot SPL 2015.04-00631-gace97d2 (May 05 2015 - 13:32:44)


U-Boot 2015.04-00631-gace97d2 (May 05 2015 - 13:32:44)

TEGRA30
Model: Toradex Colibri T30
DRAM:  1 GiB
iC:   Tegra SD/MMC: 0, Tegra SD/MMC: 1
In:    serial
Out:   serial
Err:   serial
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0 
Colibri T30 # crc32 0x80000000 0x100
crc32 for 80000000 ... 800000ff ==> 9eb4f5ca
Colibri T30 # crc32 -v 0x80000000 0x100 c9a057b3
crc32 for 80000000 ... 800000ff ==> 9eb4f5ca != ffffffff ** ERROR **
Colibri T30 # crc32 -v 0x80000000 0x100 9eb4f5ca
crc32 for 80000000 ... 800000ff ==> 9eb4f5ca != 301eeead ** ERROR **

WTF is going on?

Git bisection revealed the following:

3ef46a998a2f2c52e227246ac0438ca048ddfd09 is the first bad commit
commit 3ef46a998a2f2c52e227246ac0438ca048ddfd09
Author: Nikolay Dimitrov <picmaster@mail.bg>
Date:   Fri Dec 12 20:01:23 2014 +0200

    Fix hash verification
    
    Fix issue in parse_verify_sum() which swaps handling of env-var and
*address.
    Move hash_command() argc check earlier.
    Cosmetic change on do_hash() variable declaration.
    Improved help message for "hash" command.
    
    Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
    Reviewed-by: Simon Glass <sjg@chromium.org>

:040000 040000 631448e48e845fa9a5c33600e02c7f5b8ea886b0
1a75a34d961c61729a10babb9e875ac8e66f03dc M	common

git revert 3ef46a998a2f2c52e227246ac0438ca048ddfd09

Colibri T30 # crc32 0x80000000 0x100
crc32 for 80000000 ... 800000ff ==> 9eb4f5ca
Colibri T30 # crc32 -v 0x80000000 0x100 c9a057b3
crc32 for 80000000 ... 800000ff ==> 9eb4f5ca != c9a057b3 ** ERROR **
Colibri T30 # crc32 -v 0x80000000 0x100 9eb4f5ca

Ah, that looks much better!

I will cook up a proper patch shortly...

                 reply	other threads:[~2015-05-05 12:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1430829161.2850.29.camel@localhost.localdomain \
    --to=marcel@ziswiler.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