Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Mar 2016 18:22:54 +0000 (11:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Mar 2016 18:22:54 +0000 (11:22 -0700)
Pull crypto update from Herbert Xu:
 "Here is the crypto update for 4.6:

  API:
   - Convert remaining crypto_hash users to shash or ahash, also convert
     blkcipher/ablkcipher users to skcipher.
   - Remove crypto_hash interface.
   - Remove crypto_pcomp interface.
   - Add crypto engine for async cipher drivers.
   - Add akcipher documentation.
   - Add skcipher documentation.

  Algorithms:
   - Rename crypto/crc32 to avoid name clash with lib/crc32.
   - Fix bug in keywrap where we zero the wrong pointer.

  Drivers:
   - Support T5/M5, T7/M7 SPARC CPUs in n2 hwrng driver.
   - Add PIC32 hwrng driver.
   - Support BCM6368 in bcm63xx hwrng driver.
   - Pack structs for 32-bit compat users in qat.
   - Use crypto engine in omap-aes.
   - Add support for sama5d2x SoCs in atmel-sha.
   - Make atmel-sha available again.
   - Make sahara hashing available again.
   - Make ccp hashing available again.
   - Make sha1-mb available again.
   - Add support for multiple devices in ccp.
   - Improve DMA performance in caam.
   - Add hashing support to rockchip"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits)
  crypto: qat - remove redundant arbiter configuration
  crypto: ux500 - fix checks of error code returned by devm_ioremap_resource()
  crypto: atmel - fix checks of error code returned by devm_ioremap_resource()
  crypto: qat - Change the definition of icp_qat_uof_regtype
  hwrng: exynos - use __maybe_unused to hide pm functions
  crypto: ccp - Add abstraction for device-specific calls
  crypto: ccp - CCP versioning support
  crypto: ccp - Support for multiple CCPs
  crypto: ccp - Remove check for x86 family and model
  crypto: ccp - memset request context to zero during import
  lib/mpi: use "static inline" instead of "extern inline"
  lib/mpi: avoid assembler warning
  hwrng: bcm63xx - fix non device tree compatibility
  crypto: testmgr - allow rfc3686 aes-ctr variants in fips mode.
  crypto: qat - The AE id should be less than the maximal AE number
  lib/mpi: Endianness fix
  crypto: rockchip - add hash support for crypto engine in rk3288
  crypto: xts - fix compile errors
  crypto: doc - add skcipher API documentation
  crypto: doc - update AEAD AD handling
  ...

18 files changed:
1  2 
Documentation/devicetree/bindings/vendor-prefixes.txt
arch/arm/crypto/aes-ce-glue.c
arch/arm64/crypto/aes-glue.c
crypto/Kconfig
crypto/shash.c
drivers/char/hw_random/Kconfig
drivers/crypto/atmel-aes.c
drivers/crypto/atmel-sha.c
drivers/md/dm-crypt.c
fs/cifs/cifsencrypt.c
fs/ext4/crypto.c
include/net/sctp/structs.h
include/net/tcp.h
net/bluetooth/smp.c
net/ipv4/tcp.c
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c
net/sctp/socket.c

Simple merge
Simple merge
diff --cc crypto/Kconfig
Simple merge
diff --cc crypto/shash.c
Simple merge
Simple merge
Simple merge
@@@ -1461,9 -1539,8 +1543,10 @@@ err_algs
        if (sha_dd->caps.has_dma)
                atmel_sha_dma_cleanup(sha_dd);
  err_sha_dma:
 +iclk_unprepare:
 +      clk_unprepare(sha_dd->iclk);
  res_err:
+       tasklet_kill(&sha_dd->queue_task);
        tasklet_kill(&sha_dd->done_task);
  sha_dd_err:
        dev_err(dev, "initialization failed.\n");
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/ipv4/tcp.c
@@@ -2943,17 -2939,26 +2943,26 @@@ static bool tcp_md5sig_pool_populated 
  
  static void __tcp_alloc_md5sig_pool(void)
  {
+       struct crypto_ahash *hash;
        int cpu;
  
 -      if (IS_ERR_OR_NULL(hash))
+       hash = crypto_alloc_ahash("md5", 0, CRYPTO_ALG_ASYNC);
++      if (IS_ERR(hash))
+               return;
        for_each_possible_cpu(cpu) {
-               if (!per_cpu(tcp_md5sig_pool, cpu).md5_desc.tfm) {
-                       struct crypto_hash *hash;
+               struct ahash_request *req;
  
-                       hash = crypto_alloc_hash("md5", 0, CRYPTO_ALG_ASYNC);
-                       if (IS_ERR(hash))
-                               return;
-                       per_cpu(tcp_md5sig_pool, cpu).md5_desc.tfm = hash;
-               }
+               if (per_cpu(tcp_md5sig_pool, cpu).md5_req)
+                       continue;
+               req = ahash_request_alloc(hash, GFP_KERNEL);
+               if (!req)
+                       return;
+               ahash_request_set_callback(req, 0, NULL, NULL);
+               per_cpu(tcp_md5sig_pool, cpu).md5_req = req;
        }
        /* before setting tcp_md5sig_pool_populated, we must commit all writes
         * to memory. See smp_rmb() in tcp_get_md5sig_pool()
Simple merge
Simple merge
Simple merge