summaryrefslogtreecommitdiff
path: root/crypto/tea.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-01-07 08:38:15 +0300
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-10 01:16:00 +0300
commita429d2609c153882c421b067ad5ae5a38851459e (patch)
tree896934bd313ef565011f09b13d0dc0ae3b043641 /crypto/tea.c
parent7302533aac2df321b76e8a113e5cfa529c825b09 (diff)
downloadlinux-a429d2609c153882c421b067ad5ae5a38851459e.tar.xz
[CRYPTO] cipher: Set alignmask for multi-byte loads
Many cipher implementations use 4-byte/8-byte loads/stores which require alignment on some architectures. This patch explicitly sets the alignment requirements for them. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tea.c')
-rw-r--r--crypto/tea.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/tea.c b/crypto/tea.c
index e0077c72ec2a..a6a02b30e470 100644
--- a/crypto/tea.c
+++ b/crypto/tea.c
@@ -240,6 +240,7 @@ static struct crypto_alg tea_alg = {
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
.cra_blocksize = TEA_BLOCK_SIZE,
.cra_ctxsize = sizeof (struct tea_ctx),
+ .cra_alignmask = 3,
.cra_module = THIS_MODULE,
.cra_list = LIST_HEAD_INIT(tea_alg.cra_list),
.cra_u = { .cipher = {
@@ -255,6 +256,7 @@ static struct crypto_alg xtea_alg = {
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
.cra_blocksize = XTEA_BLOCK_SIZE,
.cra_ctxsize = sizeof (struct xtea_ctx),
+ .cra_alignmask = 3,
.cra_module = THIS_MODULE,
.cra_list = LIST_HEAD_INIT(xtea_alg.cra_list),
.cra_u = { .cipher = {
@@ -270,6 +272,7 @@ static struct crypto_alg xeta_alg = {
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
.cra_blocksize = XTEA_BLOCK_SIZE,
.cra_ctxsize = sizeof (struct xtea_ctx),
+ .cra_alignmask = 3,
.cra_module = THIS_MODULE,
.cra_list = LIST_HEAD_INIT(xtea_alg.cra_list),
.cra_u = { .cipher = {