Skip to contentSkip to conversation

crytpo: fix crc64 testmgr digest byte order

PATCH Applied [email protected] 2 participants 2 messages Mar 22, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crytpo: fix crc64 testmgr digest byte order

From: Keith Busch <[email protected]>

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")
---
 crypto/testmgr.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
crypto/testmgr.h +2 -2
index f1a22794c404..59919a636508 100644
@@ -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",
 	}
 };
 
Signature · 1 line
2.17.2
maintainer Applied
#1 lore raw
Quoted 6 lines · On Tue, 22 Mar 2022 08:21:07 -0600, [email protected] wrote:

From: Keith Busch <[email protected]>

The result is set in little endian, so the expected digest needs to be consistent for big endian machines.

Applied, thanks!

[1/1] crytpo: fix crc64 testmgr digest byte order

      commit: c30cf83999ad58135fa01fbf9f2b15ce15b5cc4a

Best regards,

Signature · 1 line
Jens Axboe