Re: [PATCH] crypto: ctr: avoid VLA use

2018-03-15 Thread kbuild test robot
Hi Salvatore, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc5 next-20180314] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day

RE: [PATCH] crypto: ctr: avoid VLA use

2018-03-15 Thread David Laight
From: Eric Biggers > Sent: 14 March 2018 18:32 ... > Also, I recall there being a long discussion a while back about how > __aligned(16) doesn't work on local variables because the kernel's stack > pointer > isn't guaranteed to maintain the alignment assumed by the compiler (see commit > b8fbe71f7

Re: [PATCH] crypto: ctr: avoid VLA use

2018-03-15 Thread Salvatore Mesoraca
2018-03-15 10:54 GMT+01:00 Herbert Xu : > On Wed, Mar 14, 2018 at 02:17:30PM +0100, Salvatore Mesoraca wrote: >> All ciphers implemented in Linux have a block size less than or >> equal to 16 bytes and the most demanding hw require 16 bits >> alignment for the block buffer. >> We avoid 2 VLAs[1] by

Re: [PATCH] crypto: ctr: avoid VLA use

2018-03-15 Thread Herbert Xu
On Wed, Mar 14, 2018 at 02:17:30PM +0100, Salvatore Mesoraca wrote: > All ciphers implemented in Linux have a block size less than or > equal to 16 bytes and the most demanding hw require 16 bits > alignment for the block buffer. > We avoid 2 VLAs[1] by always allocating 16 bytes with 16 bits > ali

Re: [PATCH] crypto: ctr: avoid VLA use

2018-03-14 Thread Salvatore Mesoraca
2018-03-14 19:31 GMT+01:00 Eric Biggers : > On Wed, Mar 14, 2018 at 02:17:30PM +0100, Salvatore Mesoraca wrote: >> All ciphers implemented in Linux have a block size less than or >> equal to 16 bytes and the most demanding hw require 16 bits >> alignment for the block buffer. >> We avoid 2 VLAs[1]

Re: [PATCH] crypto: ctr: avoid VLA use

2018-03-14 Thread Eric Biggers
On Wed, Mar 14, 2018 at 02:17:30PM +0100, Salvatore Mesoraca wrote: > All ciphers implemented in Linux have a block size less than or > equal to 16 bytes and the most demanding hw require 16 bits > alignment for the block buffer. > We avoid 2 VLAs[1] by always allocating 16 bytes with 16 bits > ali

Re: [PATCH] crypto: ctr: avoid VLA use

2018-03-14 Thread Stephan Mueller
Am Mittwoch, 14. März 2018, 14:46:29 CET schrieb Salvatore Mesoraca: Hi Salvatore, > 2018-03-14 14:31 GMT+01:00 Stephan Mueller : > > Am Mittwoch, 14. März 2018, 14:17:30 CET schrieb Salvatore Mesoraca: > > > > Hi Salvatore, > > > >> if (walk.nbytes) { > >> > >> - crypto_ctr_

Re: [PATCH] crypto: ctr: avoid VLA use

2018-03-14 Thread Salvatore Mesoraca
2018-03-14 14:31 GMT+01:00 Stephan Mueller : > Am Mittwoch, 14. März 2018, 14:17:30 CET schrieb Salvatore Mesoraca: > > Hi Salvatore, > >> if (walk.nbytes) { >> - crypto_ctr_crypt_final(&walk, child); >> - err = blkcipher_walk_done(desc, &walk, 0); >> + err

Re: [PATCH] crypto: ctr: avoid VLA use

2018-03-14 Thread Stephan Mueller
Am Mittwoch, 14. März 2018, 14:17:30 CET schrieb Salvatore Mesoraca: Hi Salvatore, > if (walk.nbytes) { > - crypto_ctr_crypt_final(&walk, child); > - err = blkcipher_walk_done(desc, &walk, 0); > + err = crypto_ctr_crypt_final(&walk, child); > +

[PATCH] crypto: ctr: avoid VLA use

2018-03-14 Thread Salvatore Mesoraca
All ciphers implemented in Linux have a block size less than or equal to 16 bytes and the most demanding hw require 16 bits alignment for the block buffer. We avoid 2 VLAs[1] by always allocating 16 bytes with 16 bits alignment, unless the architecture support efficient unaligned accesses. We also