OSDN Git Service

dm crypt: convert essiv from ahash to shash
authorKees Cook <keescook@chromium.org>
Mon, 16 Jul 2018 03:59:12 +0000 (20:59 -0700)
committerMike Snitzer <snitzer@redhat.com>
Fri, 27 Jul 2018 19:24:28 +0000 (15:24 -0400)
commitc07c88f54f2323516e8038aa9301ab0db4812c81
treed4ce17f49ce595adb276aee60aa02684516f27d1
parentc7329eff72aa237d6bedef6dc57c93dc048d2a16
dm crypt: convert essiv from ahash to shash

In preparing to remove all stack VLA usage from the kernel[1], remove
the discouraged use of AHASH_REQUEST_ON_STACK in favor of the smaller
SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash to direct
shash.  The stack allocation will be made a fixed size in a later patch
to the crypto subsystem.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-crypt.c