From: kbusch@kernel.org
To: linux-block@vger.kernel.org, axboe@kernel.dk
Cc: ebiggers@kernel.org, Keith Busch <kbusch@kernel.org>
Subject: [PATCH] crytpo: fix crc64 testmgr digest byte order
Date: Tue, 22 Mar 2022 08:21:07 -0600 [thread overview]
Message-ID: <20220322142107.4581-1-kbusch@kernel.org> (raw)
From: Keith Busch <kbusch@kernel.org>
The result is set in little endian, so the expected digest needs to
be consistent for big endian machines.
Fixes: commit f3813f4b287e4 ("crypto: add rocksoft 64b crc guard tag framework")
Reported-by: Vasily Gorbik <gor@linux.ibm.com>
Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
crypto/testmgr.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index f1a22794c404..59919a636508 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -3686,11 +3686,11 @@ static const struct hash_testvec crc64_rocksoft_tv_template[] = {
{
.plaintext = zeroes,
.psize = 4096,
- .digest = (u8 *)(u64[]){ 0x6482d367eb22b64eull },
+ .digest = "\x4e\xb6\x22\xeb\x67\xd3\x82\x64",
}, {
.plaintext = ones,
.psize = 4096,
- .digest = (u8 *)(u64[]){ 0xc0ddba7302eca3acull },
+ .digest = "\xac\xa3\xec\x02\x73\xba\xdd\xc0",
}
};
--
2.17.2
next reply other threads:[~2022-03-22 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 14:21 kbusch [this message]
2022-03-22 14:31 ` [PATCH] crytpo: fix crc64 testmgr digest byte order Jens Axboe
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=20220322142107.4581-1-kbusch@kernel.org \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=ebiggers@kernel.org \
--cc=linux-block@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox