• Herbert Xu's avatar
    crypto: aead - Fix aead_instance struct size · f5d8660a
    Herbert Xu authored
    The struct aead_instance is meant to extend struct crypto_instance
    by incorporating the extra members of struct aead_alg.  However,
    the current layout which is copied from shash/ahash does not specify
    the struct fully.  In particular only aead_alg is present.
    
    For shash/ahash this works because users there add extra headroom
    to sizeof(struct crypto_instance) when allocating the instance.
    Unfortunately for aead, this bit was lost when the new aead_instance
    was added.
    
    Rather than fixing it like shash/ahash, this patch simply expands
    struct aead_instance to contain what is supposed to be there, i.e.,
    adding struct crypto_instance.
    
    In order to not break existing AEAD users, this is done through an
    anonymous union.
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    f5d8660a
Name
Last commit
Last update
..
aead.h Loading commit data...
akcipher.h Loading commit data...
compress.h Loading commit data...
geniv.h Loading commit data...
hash.h Loading commit data...
rng.h Loading commit data...
rsa.h Loading commit data...
skcipher.h Loading commit data...