OSDN Git Service

crypto: sha-mb - Fix total_len for correct hash when larger than 512MB
authorGreg Tucker <greg.b.tucker@intel.com>
Mon, 14 Nov 2016 23:11:44 +0000 (16:11 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 17 Nov 2016 15:35:00 +0000 (23:35 +0800)
commit7a0b86b1b964d31604eb216a5648906b38470bba
treed7a59bb859af973ff732205aaa600f314e3e1028
parent75aa0a7cafe951538c7cb7c5ed457a3371ec5bcd
crypto: sha-mb - Fix total_len for correct hash when larger than 512MB

Current multi-buffer hash implementations have a restriction on the total
length of a hash job to 512MB. Hashing larger buffers will result in an
incorrect hash. This extends the limit to 2^62 - 1.

Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
Acked-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/sha1-mb/sha1_mb.c
arch/x86/crypto/sha1-mb/sha1_mb_ctx.h
arch/x86/crypto/sha256-mb/sha256_mb.c
arch/x86/crypto/sha256-mb/sha256_mb_ctx.h
arch/x86/crypto/sha512-mb/sha512_mb.c
arch/x86/crypto/sha512-mb/sha512_mb_ctx.h