Re: [v3] crypto: ctr - avoid VLA use

2018-04-04 Thread Salvatore Mesoraca
2018-04-03 23:37 GMT+02:00 Laura Abbott : > On 03/30/2018 01:53 AM, Salvatore Mesoraca wrote: >> --- >> crypto/ctr.c | 15 +-- >> 1 file changed, 13 insertions(+), 2 deletions(-) >> >> diff --git a/crypto/ctr.c b/crypto/ctr.c >> index 854d924..49c469d 100644 >>

Re: [v3] crypto: ctr - avoid VLA use

2018-04-04 Thread Salvatore Mesoraca
2018-04-03 23:37 GMT+02:00 Laura Abbott : > On 03/30/2018 01:53 AM, Salvatore Mesoraca wrote: >> --- >> crypto/ctr.c | 15 +-- >> 1 file changed, 13 insertions(+), 2 deletions(-) >> >> diff --git a/crypto/ctr.c b/crypto/ctr.c >> index 854d924..49c469d 100644 >> --- a/crypto/ctr.c >>

Re: [v3] crypto: ctr - avoid VLA use

2018-04-03 Thread Laura Abbott
On 03/30/2018 01:53 AM, 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 bytes alignment for the block buffer. We avoid 2 VLAs[1] by always allocating 16 bytes with 16 bytes alignment, unless the

Re: [v3] crypto: ctr - avoid VLA use

2018-04-03 Thread Laura Abbott
On 03/30/2018 01:53 AM, 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 bytes alignment for the block buffer. We avoid 2 VLAs[1] by always allocating 16 bytes with 16 bytes alignment, unless the

[v3] crypto: ctr - avoid VLA use

2018-03-30 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 bytes alignment for the block buffer. We avoid 2 VLAs[1] by always allocating 16 bytes with 16 bytes alignment, unless the architecture supports efficient unaligned accesses. We

[v3] crypto: ctr - avoid VLA use

2018-03-30 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 bytes alignment for the block buffer. We avoid 2 VLAs[1] by always allocating 16 bytes with 16 bytes alignment, unless the architecture supports efficient unaligned accesses. We