aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/padlock-aes.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-07-06 16:53:29 -0400
committerDavid S. Miller <davem@davemloft.net>2005-07-06 16:53:29 -0400
commitfbdae9f3e7fb57c07cb0d973f113eb25da2e8ff2 (patch)
treeb20909c92c2d48ab449343967b1c365732d7e4ff /drivers/crypto/padlock-aes.c
parent176c3652c544b6f8d4bb1984c58c10080f45dbf0 (diff)
[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 'drivers/crypto/padlock-aes.c')
-rw-r--r--drivers/crypto/padlock-aes.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index d2745ff4699c..c5b58fae95f2 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -465,8 +465,7 @@ static struct crypto_alg aes_alg = {
465 .cra_name = "aes", 465 .cra_name = "aes",
466 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 466 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
467 .cra_blocksize = AES_BLOCK_SIZE, 467 .cra_blocksize = AES_BLOCK_SIZE,
468 .cra_ctxsize = sizeof(struct aes_ctx) + 468 .cra_ctxsize = sizeof(struct aes_ctx),
469 PADLOCK_ALIGNMENT,
470 .cra_alignmask = PADLOCK_ALIGNMENT - 1, 469 .cra_alignmask = PADLOCK_ALIGNMENT - 1,
471 .cra_module = THIS_MODULE, 470 .cra_module = THIS_MODULE,
472 .cra_list = LIST_HEAD_INIT(aes_alg.cra_list), 471 .cra_list = LIST_HEAD_INIT(aes_alg.cra_list),