]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: tcrypt - Remove VLA usage
authorKees Cook <keescook@chromium.org>
Fri, 27 Apr 2018 02:57:28 +0000 (19:57 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 5 May 2018 06:52:53 +0000 (14:52 +0800)
commitccf3bf547e5ba79212bab6f2b39ece3a7458f959
tree3e1de3cf13e7f764b249f1a37a5a30b29550b3c3
parent859a494806a97c0065a29c6e0025a0cd5ef3c7a9
crypto: tcrypt - Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
allocates the return code buffers before starting jiffie timers, rather
than using stack space for the array. Additionally cleans up some exit
paths and make sure that the num_mb module_param() is used only once
per execution to avoid possible races in the value changing.

[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/tcrypt.c