[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH] Remove VLAIS usage from dm-crypt

On 10/30/2012 07:15 PM, Behan Webster wrote:
> From: Jan-Simon Möller <dl9pf gmx de>
> The use of variable length arrays in structs (VLAIS) in the Linux Kernel code
> precludes the use of compilers which don't implement VLAIS (for instance the
> Clang compiler). This patch instead allocates the appropriate amount of memory
> using an char array.

The dmcrypt code should use the same code practices as crypto API.

Apparently, your approach was not accepted there


> +	char sdesc[sizeof(struct shash_desc)
> +		+ crypto_shash_descsize(lmk->hash_tfm)
> +	struct shash_desc *desc = (struct shash_desc *)sdesc;

I would like to see kenrel compilable by Clang but obfuscating the code
this way is perhaps not the ideal way.

Until it is accepted in crypto layer, NACK.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]