Re: [PATCH] async_pq: Remove VLA usage

2018-05-03 Thread Kees Cook
On Thu, May 3, 2018 at 3:57 PM, Kyle Spiers wrote: > In the quest to remove VLAs from the kernel[1], this moves the > allocation of coefs and blocks from the stack to being kmalloc()ed. > > [1] https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by: Kyle Spiers Reviewed-by: Kees Cook Thanks for

Re: [PATCH 01/10] crypto: aead - allow to allocate AEAD requests on the stack

2018-05-03 Thread Herbert Xu
On Thu, May 03, 2018 at 02:23:30PM +0200, 'Antoine Tenart' wrote: > > I was expecting this question :) The thing is this define looks *a lot* > like the ones defined in other places in the crypto framework, such as > SKCIPHER_REQUEST_ON_STACK and AHASH_REQUEST_ON_STACK. Those haven't been > tackled

[PATCH] async_pq: Remove VLA usage

2018-05-03 Thread Kyle Spiers
In the quest to remove VLAs from the kernel[1], this moves the allocation of coefs and blocks from the stack to being kmalloc()ed. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kyle Spiers --- crypto/async_tx/async_pq.c | 18 ++ crypto/async_tx/raid6test.c | 8 +++-

[PATCH 2/2] crypto: vmx - Remove overly verbose printk from AES XTS init

2018-05-03 Thread Michael Ellerman
In p8_aes_xts_init() we do a printk(KERN_INFO ...) to report the fallback implementation we're using. However with a slow console this can significantly affect the speed of crypto operations. So remove it. Fixes: c07f5d3da643 ("crypto: vmx - Adding support for XTS") Cc: sta...@vger.kernel.org # v4

[PATCH 1/2] crypto: vmx - Remove overly verbose printk from AES init routines

2018-05-03 Thread Michael Ellerman
In the vmx AES init routines we do a printk(KERN_INFO ...) to report the fallback implementation we're using. However with a slow console this can significantly affect the speed of crypto operations. Using 'cryptsetup benchmark' the removal of the printk() leads to a ~5x speedup for aes-cbc decryp

Re: [PATCH 01/10] crypto: aead - allow to allocate AEAD requests on the stack

2018-05-03 Thread 'Antoine Tenart'
Hi David, On Wed, May 02, 2018 at 02:55:19PM +, David Laight wrote: > From: Antoine Tenart > > > > +#define AEAD_REQUEST_ON_STACK(name, tfm) \ > > + char __##name##_desc[sizeof(struct aead_request) + \ > > + crypto_aead_reqsize(tfm)] CRYPTO_MINALIGN_ATTR; \ > > + struct aead_req

[PATCH 4.9.y, 4.14.y] crypto: talitos - fix IPsec cipher in length

2018-05-03 Thread Horia Geantă
commit 2b1227301a8e4729409694e323b72c064c47cb6b upstream. For SEC 2.x+, cipher in length must contain only the ciphertext length. In case of using hardware ICV checking, the ICV length is provided via the "extent" field of the descriptor pointer. Cc: # 4.8+ Fixes: 549bd8bc5987 ("crypto: talitos