From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Date: Mon, 16 Jul 2018 11:01:34 +0000 Subject: Re: [PATCH] ppp: mppe: Remove VLA usage Message-Id: List-Id: References: <20180716040516.GA32783@beast> In-Reply-To: <20180716040516.GA32783@beast> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Kees Cook Cc: Paul Mackerras , "David S. Miller" , Herbert Xu , Eric Biggers , "Gustavo A. R. Silva" , linux-ppp@vger.kernel.org, Networking , Linux Kernel Mailing List On Mon, Jul 16, 2018 at 6:05 AM, Kees Cook wrote: > In the quest to remove all stack VLA usage from the kernel[1], this > removes the discouraged use of AHASH_REQUEST_ON_STACK (and associated > VLA) by switching to shash directly and keeping the associated descriptor > allocated with the regular state on the heap. > > [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com > > Signed-off-by: Kees Cook I had concerns at first that this approach might make it slower, but upon reading through implementation of the shash_ahash_ implementation, I concluded that it can only be better than before, improving both performance and stack usage. Acked-by: Arnd Bergmann