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

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

 



On 10/30/2012 07:15 PM, Behan Webster wrote:
> From: Jan-Simon Möller <dl9pf@xxxxxx>
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux