aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/crypto/des_glue.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-19 23:31:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-19 23:31:02 -0500
commitf01af9f85855e38fbd601e033a8eac204cc4cc1c (patch)
tree106b1b24dd17a0c6cb9fdda35a249f429310b025 /arch/sparc/crypto/des_glue.c
parent9eb127cc04c4005c8c0708ce92146d91da862b42 (diff)
parent62ba63dc892cf836ecb9ce4fdb7644d45c95070b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller: "Please pull to get these sparc AES/DES/CAMELLIA crypto bug fixes as well as an addition of a pte_accessible() define for sparc64 and a hugetlb fix from Dave Kleikamp." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Set CRYPTO_TFM_REQ_MAY_SLEEP consistently in CAMELLIA code. sparc64: Set CRYPTO_TFM_REQ_MAY_SLEEP consistently in DES code. sparc64: Fix ECB looping constructs in AES code. sparc64: Set CRYPTO_TFM_REQ_MAY_SLEEP consistently in AES code. sparc64: Fix AES ctr mode block size. sparc64: Fix unrolled AES 256-bit key loops. sparc64: Define pte_accessible() sparc: huge_ptep_set_* functions need to call set_huge_pte_at()
Diffstat (limited to 'arch/sparc/crypto/des_glue.c')
-rw-r--r--arch/sparc/crypto/des_glue.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sparc/crypto/des_glue.c b/arch/sparc/crypto/des_glue.c
index 41524cebcc49..3065bc61f9d3 100644
--- a/arch/sparc/crypto/des_glue.c
+++ b/arch/sparc/crypto/des_glue.c
@@ -100,6 +100,7 @@ static int __ecb_crypt(struct blkcipher_desc *desc,
100 100
101 blkcipher_walk_init(&walk, dst, src, nbytes); 101 blkcipher_walk_init(&walk, dst, src, nbytes);
102 err = blkcipher_walk_virt(desc, &walk); 102 err = blkcipher_walk_virt(desc, &walk);
103 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
103 104
104 if (encrypt) 105 if (encrypt)
105 des_sparc64_load_keys(&ctx->encrypt_expkey[0]); 106 des_sparc64_load_keys(&ctx->encrypt_expkey[0]);
@@ -147,6 +148,7 @@ static int cbc_encrypt(struct blkcipher_desc *desc,
147 148
148 blkcipher_walk_init(&walk, dst, src, nbytes); 149 blkcipher_walk_init(&walk, dst, src, nbytes);
149 err = blkcipher_walk_virt(desc, &walk); 150 err = blkcipher_walk_virt(desc, &walk);
151 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
150 152
151 des_sparc64_load_keys(&ctx->encrypt_expkey[0]); 153 des_sparc64_load_keys(&ctx->encrypt_expkey[0]);
152 while ((nbytes = walk.nbytes)) { 154 while ((nbytes = walk.nbytes)) {
@@ -177,6 +179,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc,
177 179
178 blkcipher_walk_init(&walk, dst, src, nbytes); 180 blkcipher_walk_init(&walk, dst, src, nbytes);
179 err = blkcipher_walk_virt(desc, &walk); 181 err = blkcipher_walk_virt(desc, &walk);
182 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
180 183
181 des_sparc64_load_keys(&ctx->decrypt_expkey[0]); 184 des_sparc64_load_keys(&ctx->decrypt_expkey[0]);
182 while ((nbytes = walk.nbytes)) { 185 while ((nbytes = walk.nbytes)) {
@@ -266,6 +269,7 @@ static int __ecb3_crypt(struct blkcipher_desc *desc,
266 269
267 blkcipher_walk_init(&walk, dst, src, nbytes); 270 blkcipher_walk_init(&walk, dst, src, nbytes);
268 err = blkcipher_walk_virt(desc, &walk); 271 err = blkcipher_walk_virt(desc, &walk);
272 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
269 273
270 if (encrypt) 274 if (encrypt)
271 K = &ctx->encrypt_expkey[0]; 275 K = &ctx->encrypt_expkey[0];
@@ -317,6 +321,7 @@ static int cbc3_encrypt(struct blkcipher_desc *desc,
317 321
318 blkcipher_walk_init(&walk, dst, src, nbytes); 322 blkcipher_walk_init(&walk, dst, src, nbytes);
319 err = blkcipher_walk_virt(desc, &walk); 323 err = blkcipher_walk_virt(desc, &walk);
324 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
320 325
321 K = &ctx->encrypt_expkey[0]; 326 K = &ctx->encrypt_expkey[0];
322 des3_ede_sparc64_load_keys(K); 327 des3_ede_sparc64_load_keys(K);
@@ -352,6 +357,7 @@ static int cbc3_decrypt(struct blkcipher_desc *desc,
352 357
353 blkcipher_walk_init(&walk, dst, src, nbytes); 358 blkcipher_walk_init(&walk, dst, src, nbytes);
354 err = blkcipher_walk_virt(desc, &walk); 359 err = blkcipher_walk_virt(desc, &walk);
360 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
355 361
356 K = &ctx->decrypt_expkey[0]; 362 K = &ctx->decrypt_expkey[0];
357 des3_ede_sparc64_load_keys(K); 363 des3_ede_sparc64_load_keys(K);