]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
crypto: shash - Remove VLA usage in unaligned hashing
authorKees Cook <keescook@chromium.org>
Tue, 7 Aug 2018 21:18:42 +0000 (14:18 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 4 Sep 2018 03:37:03 +0000 (11:37 +0800)
commitf3569fd613f669c95ad187208ad281995f30cc2a
tree7e5516a5ba41982e79f2493a3eba2327d4da4586
parent1299c9cfae6dccd79e4e035cad44f99fdb828593
crypto: shash - Remove VLA usage in unaligned hashing

In the quest to remove all stack VLA usage from the kernel[1], this uses
the newly defined max alignment to perform unaligned hashing to avoid
VLAs, and drops the helper function while adding sanity checks on the
resulting buffer sizes. Additionally, the __aligned_largest macro is
removed since this helper was the only user.

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

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/shash.c
include/linux/compiler_types.h