kernel_optimize_test/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
aead.h crypto: Resolve shadow warnings 2014-08-01 22:35:55 +08:00
aes.h
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
cast_common.h
cast5.h
cast6.h
compress.h
cryptd.h
crypto_wq.h
ctr.h
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
hash_info.h crypto: provide single place for hash algo information 2013-10-25 17:14:03 -04:00
hash.h crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code 2014-10-14 10:51:22 +02:00
if_alg.h
lrw.h
mcryptd.h crypto: sha-mb - multibuffer crypto infrastructure 2014-08-25 20:32:25 +08:00
md5.h
null.h crypto: export NULL algorithms defines 2014-03-21 21:54:26 +08:00
padlock.h
pcrypt.h
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
scatterwalk.h crypto: api - Move crypto_yield() to algapi.h 2014-06-20 21:26:04 +08:00
serpent.h
sha.h
skcipher.h crypto: Resolve shadow warnings 2014-08-01 22:35:55 +08:00
twofish.h
vmac.h
xts.h