diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-07-06 13:53:29 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-06 13:53:29 -0700 |
commit | fbdae9f3e7fb57c07cb0d973f113eb25da2e8ff2 (patch) | |
tree | b20909c92c2d48ab449343967b1c365732d7e4ff /include/linux/crypto.h | |
parent | 176c3652c544b6f8d4bb1984c58c10080f45dbf0 (diff) | |
download | op-kernel-dev-fbdae9f3e7fb57c07cb0d973f113eb25da2e8ff2.zip op-kernel-dev-fbdae9f3e7fb57c07cb0d973f113eb25da2e8ff2.tar.gz |
[CRYPTO] Ensure cit_iv is aligned correctly
This patch ensures that cit_iv is aligned according to cra_alignmask
by allocating it as part of the tfm structure. As a side effect the
crypto layer will also guarantee that the tfm ctx area has enough space
to be aligned by cra_alignmask. This allows us to remove the extra
space reservation from the Padlock driver.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/crypto.h')
-rw-r--r-- | include/linux/crypto.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index ac9d49b..5e2bcc6 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -288,6 +288,11 @@ static inline unsigned int crypto_tfm_alg_digestsize(struct crypto_tfm *tfm) return tfm->__crt_alg->cra_digest.dia_digestsize; } +static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) +{ + return tfm->__crt_alg->cra_alignmask; +} + static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm) { return (void *)&tfm[1]; |