linux-stable/include/crypto
Behan Webster a0a77af141 crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code
Add a macro which replaces the use of a Variable Length Array In Struct (VLAIS)
with a C99 compliant equivalent. This macro instead allocates the appropriate
amount of memory using an char array.

The new code can be compiled with both gcc and clang.

struct shash_desc contains a flexible array member member ctx declared with
CRYPTO_MINALIGN_ATTR, so sizeof(struct shash_desc) aligns the beginning
of the array declared after struct shash_desc with long long.

No trailing padding is required because it is not a struct type that can
be used in an array.

The CRYPTO_MINALIGN_ATTR is required so that desc is aligned with long long
as would be the case for a struct containing a member with
CRYPTO_MINALIGN_ATTR.

If you want to get to the ctx at the end of the shash_desc as before you can do
so using shash_desc_ctx(shash)

Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Michał Mirosław <mirqus@gmail.com>
2014-10-14 10:51:22 +02:00
..
internal crypto: sha-mb - multibuffer crypto infrastructure 2014-08-25 20:32:25 +08:00
ablk_helper.h crypto: create generic version of ablk_helper 2013-09-24 06:02:24 +10:00
aead.h crypto: Resolve shadow warnings 2014-08-01 22:35:55 +08:00
aes.h crypto: aes - Move key_length in struct crypto_aes_ctx to be the last field 2009-02-18 16:48:04 +08:00
algapi.h crypto: api - Move crypto_yield() to algapi.h 2014-06-20 21:26:04 +08:00
authenc.h crypto: authenc - Export key parsing helper function 2013-10-16 20:56:25 +08:00
b128ops.h
blowfish.h crypto: blowfish - split generic and common c code 2011-09-22 21:25:25 +10:00
cast5.h crypto: cast5/cast6 - move lookup tables to shared module 2012-12-06 17:16:26 +08:00
cast6.h crypto: cast5/cast6 - move lookup tables to shared module 2012-12-06 17:16:26 +08:00
cast_common.h crypto: cast5/cast6 - move lookup tables to shared module 2012-12-06 17:16:26 +08:00
compress.h crypto: zlib - New zlib crypto module, using pcomp 2009-03-04 15:16:19 +08:00
cryptd.h crypto: cryptd - Adding the AEAD interface type support to cryptd 2010-09-20 16:05:12 +08:00
crypto_wq.h crypto: api - Use dedicated workqueue for crypto subsystem 2009-02-19 14:33:40 +08:00
ctr.h [CRYPTO] ctr: Refactor into ctr and rfc3686 2008-01-11 08:16:41 +11:00
des.h crypto: des_3des - add x86-64 assembly implementation 2014-06-20 21:27:58 +08:00
drbg.h crypto: drbg - fix maximum value checks on 32 bit systems 2014-08-26 16:58:05 +08:00
gf128mul.h Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
hash.h crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code 2014-10-14 10:51:22 +02:00
hash_info.h crypto: provide single place for hash algo information 2013-10-25 17:14:03 -04:00
if_alg.h net: remove mm.h inclusion from netdevice.h 2011-06-21 19:17:20 -07:00
lrw.h crypto: lrw - add interface for parallelized cipher implementions 2011-11-09 11:50:31 +08:00
mcryptd.h crypto: sha-mb - multibuffer crypto infrastructure 2014-08-25 20:32:25 +08:00
md5.h crypto: md5 - Add export support 2010-01-17 21:55:31 +11:00
null.h crypto: export NULL algorithms defines 2014-03-21 21:54:26 +08:00
padlock.h crypto: padlock - Move padlock.h into include/crypto 2011-01-07 14:52:00 +11:00
pcrypt.h crypto: pcrypt - Add pcrypt crypto parallelization wrapper 2010-01-07 15:57:19 +11:00
pkcs7.h PKCS#7: Find intersection between PKCS#7 message and known, trusted keys 2014-07-08 13:50:15 +01:00
public_key.h KEYS: Restore partial ID matching functionality for asymmetric keys 2014-10-06 15:21:05 +01:00
rng.h crypto: rng - RNG interface and implementation 2008-08-29 15:50:04 +10:00
scatterwalk.h crypto: api - Move crypto_yield() to algapi.h 2014-06-20 21:26:04 +08:00
serpent.h crypto: serpent-sse2 - add lrw support 2011-11-21 16:13:24 +08:00
sha.h crypto: sha512 - Expose generic sha512 routine to be callable from other modules 2013-04-25 21:00:57 +08:00
skcipher.h crypto: Resolve shadow warnings 2014-08-01 22:35:55 +08:00
twofish.h crypto: twofish-x86_64-3way - add lrw support 2011-11-09 11:53:32 +08:00
vmac.h crypto: vmac - Make VMAC work when blocks aren't aligned 2012-10-15 22:33:20 +08:00
xts.h crypto: xts: add interface for parallelized cipher implementations 2011-11-09 11:56:06 +08:00