[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] [PATCH] Remove VLAIS usage from dm-crypt
- From: Milan Broz <mbroz redhat com>
- To: Behan Webster <behanw converseincode com>
- Cc: linux-raid vger kernel org, pageexec freemail hu, dm-devel redhat com, Jan-Simon Möller <dl9pf gmx de>, agk redhat com
- Subject: Re: [dm-devel] [PATCH] Remove VLAIS usage from dm-crypt
- Date: Sat, 03 Nov 2012 20:30:08 +0100
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
http://article.gmane.org/gmane.linux.kernel/1386451
http://article.gmane.org/gmane.linux.kernel.cryptoapi/7993
> + char sdesc[sizeof(struct shash_desc)
> + + crypto_shash_descsize(lmk->hash_tfm)
> + + CRYPTO_MINALIGN] CRYPTO_MINALIGN_ATTR;
> + 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.
Milan
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]