[PATCH 6/6] crypto: cfb - avoid VLA use

2018-04-09 Thread Salvatore Mesoraca
We avoid 3 VLAs[1] by always allocating MAX_BLOCKSIZE bytes or, when needed for alignement, MAX_BLOCKSIZE + MAX_ALIGNMASK bytes. We also check the selected cipher at instance creation time, if it doesn't comply with these limits, the creation will fail. [1]

[PATCH 6/6] crypto: cfb - avoid VLA use

2018-04-07 Thread Salvatore Mesoraca
We avoid 3 VLAs[1] by always allocating MAX_BLOCKSIZE bytes or, when needed for alignement, MAX_BLOCKSIZE + MAX_ALIGNMASK bytes. We also check the selected cipher at instance creation time, if it doesn't comply with these limits, the creation will fail. [1]