lkml.org 
[lkml]   [2018]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [v3] crypto: ctr - avoid VLA use
2018-04-03 23:37 GMT+02:00 Laura Abbott <labbott@redhat.com>:
> 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
>> +++ b/crypto/ctr.c
>> @@ -21,6 +21,9 @@
>> #include <linux/scatterlist.h>
>> #include <linux/slab.h>
>> +#define MAX_BLOCKSIZE 16
>> +#define MAX_ALIGNMASK 15
>> +
>
>
> Can we pull this out into a header file, I think this would cover
>
> crypto/cipher.c: In function ‘cipher_crypt_unaligned’:
> crypto/cipher.c:70:2: warning: ISO C90 forbids variable length array
> ‘buffer’ [-Wvla]
> u8 buffer[size + alignmask];
> ^~

Yeah, I'll send a patchset that includes the fix for crypto/cipher.c too.

Thank you for the suggestion :)

Salvatore

\
 
 \ /
  Last update: 2018-04-04 11:50    [W:0.064 / U:1.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site