]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccree - allow bigger than sector XTS op
authorGilad Ben-Yossef <gilad@benyossef.com>
Tue, 24 Jul 2018 14:12:46 +0000 (15:12 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 3 Aug 2018 10:06:05 +0000 (18:06 +0800)
commit7a9eb897aae2a2f205f3ead425a236a676d21feb
tree4c6f81ba55590b241c53df405f1ae43b20478a1e
parent26839cb1d7677f9f8228c2295e4408b604f7867b
crypto: ccree - allow bigger than sector XTS op

The ccree driver had a sanity check that we are not asked
to encrypt an XTS buffer bigger than a sane sector size
since XTS IV needs to include the sector number in the IV
so this is not expected in any real use case.

Unfortunately, this breaks cryptsetup benchmark test which
has a synthetic performance test using 64k buffer of data
with the same IV.

Remove the sanity check and allow the user to hang themselves
and/or run benchmarks if they so wish.

Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_cipher.c