Skip to content

Commit

Permalink
crypto: fix crc64 testmgr digest byte order
Browse files Browse the repository at this point in the history
The result is set in little endian, so the expected digest needs to
be consistent for big endian machines.

Fixes: f3813f4 ("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>
Link: https://lore.kernel.org/r/20220322142107.4581-1-kbusch@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Keith Busch authored and Jens Axboe committed Mar 23, 2022
1 parent 4020aad commit 1e21270
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/testmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
};

Expand Down

0 comments on commit 1e21270

Please sign in to comment.