diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 16:20:43 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 16:20:43 -0400 |
| commit | b8716614a7cc2fc15ea2a518edd04755fb08d922 (patch) | |
| tree | 2a8a5d04066b2bd589ba2ebbeb228e2a6a178ec9 | |
| parent | 31f6765266417c0d99f0e922fe82848a7c9c2ae9 (diff) | |
| parent | 2dc9b5dbdef09840de852a4f0cc6a9c9eece7220 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu:
"* sha512 bug fixes (already in your tree).
* SHA224/SHA384 AEAD support in caam.
* X86-64 optimised version of Camellia.
* Tegra AES support.
* Bulk algorithm registration interface to make driver registration easier.
* padata race fixes.
* Misc fixes."
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (31 commits)
padata: Fix race on sequence number wrap
padata: Fix race in the serialization path
crypto: camellia - add assembler implementation for x86_64
crypto: camellia - rename camellia.c to camellia_generic.c
crypto: camellia - fix checkpatch warnings
crypto: camellia - rename camellia module to camellia_generic
crypto: tcrypt - add more camellia tests
crypto: testmgr - add more camellia test vectors
crypto: camellia - simplify key setup and CAMELLIA_ROUNDSM macro
crypto: twofish-x86_64/i586 - set alignmask to zero
crypto: blowfish-x86_64 - set alignmask to zero
crypto: serpent-sse2 - combine ablk_*_init functions
crypto: blowfish-x86_64 - use crypto_[un]register_algs
crypto: twofish-x86_64-3way - use crypto_[un]register_algs
crypto: serpent-sse2 - use crypto_[un]register_algs
crypto: serpent-sse2 - remove dead code from serpent_sse2_glue.c::serpent_sse2_init()
crypto: twofish-x86 - Remove dead code from twofish_glue_3way.c::init()
crypto: In crypto_add_alg(), 'exact' wants to be initialized to 0
crypto: caam - fix gcc 4.6 warning
crypto: Add bulk algorithm registration interface
...
38 files changed, 5831 insertions, 654 deletions
diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c index 1fa26d9a1a68..ea49bd93c6b9 100644 --- a/arch/arm/mach-tegra/fuse.c +++ b/arch/arm/mach-tegra/fuse.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 22 | #include <linux/module.h> | ||
| 22 | 23 | ||
| 23 | #include <mach/iomap.h> | 24 | #include <mach/iomap.h> |
| 24 | 25 | ||
| @@ -58,6 +59,7 @@ unsigned long long tegra_chip_uid(void) | |||
| 58 | hi = fuse_readl(FUSE_UID_HIGH); | 59 | hi = fuse_readl(FUSE_UID_HIGH); |
| 59 | return (hi << 32ull) | lo; | 60 | return (hi << 32ull) | lo; |
| 60 | } | 61 | } |
| 62 | EXPORT_SYMBOL(tegra_chip_uid); | ||
| 61 | 63 | ||
| 62 | int tegra_sku_id(void) | 64 | int tegra_sku_id(void) |
| 63 | { | 65 | { |
diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile index 2b0b9631474b..e191ac048b59 100644 --- a/arch/x86/crypto/Makefile +++ b/arch/x86/crypto/Makefile | |||
| @@ -8,6 +8,7 @@ obj-$(CONFIG_CRYPTO_SALSA20_586) += salsa20-i586.o | |||
| 8 | obj-$(CONFIG_CRYPTO_SERPENT_SSE2_586) += serpent-sse2-i586.o | 8 | obj-$(CONFIG_CRYPTO_SERPENT_SSE2_586) += serpent-sse2-i586.o |
| 9 | 9 | ||
| 10 | obj-$(CONFIG_CRYPTO_AES_X86_64) += aes-x86_64.o | 10 | obj-$(CONFIG_CRYPTO_AES_X86_64) += aes-x86_64.o |
| 11 | obj-$(CONFIG_CRYPTO_CAMELLIA_X86_64) += camellia-x86_64.o | ||
| 11 | obj-$(CONFIG_CRYPTO_BLOWFISH_X86_64) += blowfish-x86_64.o | 12 | obj-$(CONFIG_CRYPTO_BLOWFISH_X86_64) += blowfish-x86_64.o |
| 12 | obj-$(CONFIG_CRYPTO_TWOFISH_X86_64) += twofish-x86_64.o | 13 | obj-$(CONFIG_CRYPTO_TWOFISH_X86_64) += twofish-x86_64.o |
| 13 | obj-$(CONFIG_CRYPTO_TWOFISH_X86_64_3WAY) += twofish-x86_64-3way.o | 14 | obj-$(CONFIG_CRYPTO_TWOFISH_X86_64_3WAY) += twofish-x86_64-3way.o |
| @@ -25,6 +26,7 @@ salsa20-i586-y := salsa20-i586-asm_32.o salsa20_glue.o | |||
| 25 | serpent-sse2-i586-y := serpent-sse2-i586-asm_32.o serpent_sse2_glue.o | 26 | serpent-sse2-i586-y := serpent-sse2-i586-asm_32.o serpent_sse2_glue.o |
| 26 | 27 | ||
| 27 | aes-x86_64-y := aes-x86_64-asm_64.o aes_glue.o | 28 | aes-x86_64-y := aes-x86_64-asm_64.o aes_glue.o |
| 29 | camellia-x86_64-y := camellia-x86_64-asm_64.o camellia_glue.o | ||
| 28 | blowfish-x86_64-y := blowfish-x86_64-asm_64.o blowfish_glue.o | 30 | blowfish-x86_64-y := blowfish-x86_64-asm_64.o blowfish_glue.o |
| 29 | twofish-x86_64-y := twofish-x86_64-asm_64.o twofish_glue.o | 31 | twofish-x86_64-y := twofish-x86_64-asm_64.o twofish_glue.o |
| 30 | twofish-x86_64-3way-y := twofish-x86_64-asm_64-3way.o twofish_glue_3way.o | 32 | twofish-x86_64-3way-y := twofish-x86_64-asm_64-3way.o twofish_glue_3way.o |
diff --git a/arch/x86/crypto/blowfish_glue.c b/arch/x86/crypto/blowfish_glue.c index b05aa163d55a..7967474de8f7 100644 --- a/arch/x86/crypto/blowfish_glue.c +++ b/arch/x86/crypto/blowfish_glue.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | * | 25 | * |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | #include <asm/processor.h> | ||
| 28 | #include <crypto/blowfish.h> | 29 | #include <crypto/blowfish.h> |
| 29 | #include <linux/crypto.h> | 30 | #include <linux/crypto.h> |
| 30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
| @@ -76,27 +77,6 @@ static void blowfish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) | |||
| 76 | blowfish_dec_blk(crypto_tfm_ctx(tfm), dst, src); | 77 | blowfish_dec_blk(crypto_tfm_ctx(tfm), dst, src); |
| 77 | } | 78 | } |
| 78 | 79 | ||
| 79 | static struct crypto_alg bf_alg = { | ||
| 80 | .cra_name = "blowfish", | ||
| 81 | .cra_driver_name = "blowfish-asm", | ||
| 82 | .cra_priority = 200, | ||
| 83 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, | ||
| 84 | .cra_blocksize = BF_BLOCK_SIZE, | ||
| 85 | .cra_ctxsize = sizeof(struct bf_ctx), | ||
| 86 | .cra_alignmask = 3, | ||
| 87 | .cra_module = THIS_MODULE, | ||
| 88 | .cra_list = LIST_HEAD_INIT(bf_alg.cra_list), | ||
| 89 | .cra_u = { | ||
| 90 | .cipher = { | ||
| 91 | .cia_min_keysize = BF_MIN_KEY_SIZE, | ||
| 92 | .cia_max_keysize = BF_MAX_KEY_SIZE, | ||
| 93 | .cia_setkey = blowfish_setkey, | ||
| 94 | .cia_encrypt = blowfish_encrypt, | ||
| 95 | .cia_decrypt = blowfish_decrypt, | ||
| 96 | } | ||
| 97 | } | ||
| 98 | }; | ||
| 99 | |||
| 100 | static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk, | 80 | static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk, |
| 101 | void (*fn)(struct bf_ctx *, u8 *, const u8 *), | 81 | void (*fn)(struct bf_ctx *, u8 *, const u8 *), |
| 102 | void (*fn_4way)(struct bf_ctx *, u8 *, const u8 *)) | 82 | void (*fn_4way)(struct bf_ctx *, u8 *, const u8 *)) |
| @@ -160,28 +140,6 @@ static int ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, | |||
| 160 | return ecb_crypt(desc, &walk, blowfish_dec_blk, blowfish_dec_blk_4way); | 140 | return ecb_crypt(desc, &walk, blowfish_dec_blk, blowfish_dec_blk_4way); |
| 161 | } | 141 | } |
| 162 | 142 | ||
| 163 | static struct crypto_alg blk_ecb_alg = { | ||
| 164 | .cra_name = "ecb(blowfish)", | ||
| 165 | .cra_driver_name = "ecb-blowfish-asm", | ||
| 166 | .cra_priority = 300, | ||
| 167 | .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, | ||
| 168 | .cra_blocksize = BF_BLOCK_SIZE, | ||
| 169 | .cra_ctxsize = sizeof(struct bf_ctx), | ||
| 170 | .cra_alignmask = 0, | ||
| 171 | .cra_type = &crypto_blkcipher_type, | ||
| 172 | .cra_module = THIS_MODULE, | ||
| 173 | .cra_list = LIST_HEAD_INIT(blk_ecb_alg.cra_list), | ||
| 174 | .cra_u = { | ||
| 175 | .blkcipher = { | ||
| 176 | .min_keysize = BF_MIN_KEY_SIZE, | ||
| 177 | .max_keysize = BF_MAX_KEY_SIZE, | ||
| 178 | .setkey = blowfish_setkey, | ||
| 179 | .encrypt = ecb_encrypt, | ||
| 180 | .decrypt = ecb_decrypt, | ||
| 181 | }, | ||
| 182 | }, | ||
| 183 | }; | ||
| 184 | |||
| 185 | static unsigned int __cbc_encrypt(struct blkcipher_desc *desc, | 143 | static unsigned int __cbc_encrypt(struct blkcipher_desc *desc, |
| 186 | struct blkcipher_walk *walk) | 144 | struct blkcipher_walk *walk) |
| 187 | { | 145 | { |
| @@ -307,29 +265,6 @@ static int cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, | |||
| 307 | return err; | 265 | return err; |
| 308 | } | 266 | } |
| 309 | 267 | ||
| 310 | static struct crypto_alg blk_cbc_alg = { | ||
| 311 | .cra_name = "cbc(blowfish)", | ||
