android_kernel_lge_bullhead/include/crypto
Behan Webster 9b68d7de04 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>
Change-Id: I23b3116ceb658f4e047c7a80bcfadc49b1653206
2019-08-26 17:34:07 +02:00
..
internal crypto: hmac - require that the underlying hash algorithm is unkeyed 2018-04-16 18:12:23 +00:00
ablk_helper.h crypto: create generic version of ablk_helper 2014-08-15 17:22:16 -07:00
aead.h [CRYPTO] aead: Add top-level givencrypt/givdecrypt calls 2008-01-11 08:16:50 +11: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 This is the 3.10.106 stable release 2018-01-25 17:54:29 -07:00
authenc.h [CRYPTO] authenc: Move enckeylen into key itself 2008-01-11 08:16:30 +11: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: Create header file for common macros 2008-01-11 08:16:02 +11: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 2019-08-26 17:34:07 +02:00
ice.h crypto: qcom: Add support for Inline Crypto Engine 2014-12-05 09:37:20 -08:00
if_alg.h crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path 2017-02-06 09:04:07 +01:00
lrw.h crypto: lrw - add interface for parallelized cipher implementions 2011-11-09 11:50:31 +08:00
md5.h crypto: md5 - Add export support 2010-01-17 21:55:31 +11: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
public_key.h KEYS: Provide signature verification with an asymmetric key 2012-10-08 13:50:15 +10:30
rng.h crypto: rng - RNG interface and implementation 2008-08-29 15:50:04 +10:00
scatterwalk.h crypto: scatterwalk - Use sg_chain_ptr on chain entries 2013-12-11 22:36:29 -08:00
serpent.h crypto: serpent-sse2 - add lrw support 2011-11-21 16:13:24 +08:00
sha.h crypto: sha512-generic - move to generic glue implementation 2019-08-26 16:59:12 +02:00
sha1_base.h crypto: sha1 - implement base layer for SHA-1 2019-08-26 16:59:09 +02:00
sha256_base.h crypto: sha256 - implement base layer for SHA-256 2019-08-26 16:59:10 +02:00
sha512_base.h crypto: sha512 - implement base layer for SHA-512 2019-08-26 16:59:10 +02:00
skcipher.h [CRYPTO] skcipher: Add top-level givencrypt/givdecrypt calls 2008-01-11 08:16:49 +11: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 - consolidate sanity check for keys 2019-08-26 16:59:13 +02:00