summaryrefslogtreecommitdiff
path: root/crypto/testmgr.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-26 22:01:35 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-26 22:01:35 +0300
commit3f7282139fe1594be464b90141d56738e7a0ea8a (patch)
tree2a6dfc4449ceeee6b5509c3fcc58c33865c89af6 /crypto/testmgr.h
parent752d422e74c41084c3c9c9a159cb8d2795fa0c22 (diff)
parent1e21270685ae4c14361dd501da62cdc4be867d4e (diff)
downloadlinux-3f7282139fe1594be464b90141d56738e7a0ea8a.tar.xz
Merge tag 'for-5.18/64bit-pi-2022-03-25' of git://git.kernel.dk/linux-block
Pull block layer 64-bit data integrity support from Jens Axboe: "This adds support for 64-bit data integrity in the block layer and in NVMe" * tag 'for-5.18/64bit-pi-2022-03-25' of git://git.kernel.dk/linux-block: crypto: fix crc64 testmgr digest byte order nvme: add support for enhanced metadata block: add pi for extended integrity crypto: add rocksoft 64b crc guard tag framework lib: add rocksoft model crc64 linux/kernel: introduce lower_48_bits function asm-generic: introduce be48 unaligned accessors nvme: allow integrity on extended metadata formats block: support pi with extended metadata
Diffstat (limited to 'crypto/testmgr.h')
-rw-r--r--crypto/testmgr.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index d1aa90993bbd..4d7449fc6a65 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -5106,6 +5106,21 @@ static const struct hash_testvec rmd160_tv_template[] = {
}
};
+static const u8 zeroes[4096] = { [0 ... 4095] = 0 };
+static const u8 ones[4096] = { [0 ... 4095] = 0xff };
+
+static const struct hash_testvec crc64_rocksoft_tv_template[] = {
+ {
+ .plaintext = zeroes,
+ .psize = 4096,
+ .digest = "\x4e\xb6\x22\xeb\x67\xd3\x82\x64",
+ }, {
+ .plaintext = ones,
+ .psize = 4096,
+ .digest = "\xac\xa3\xec\x02\x73\xba\xdd\xc0",
+ }
+};
+
static const struct hash_testvec crct10dif_tv_template[] = {
{
.plaintext = "abc",