Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 Sep 2019 19:11:14 +0000 (12:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 Sep 2019 19:11:14 +0000 (12:11 -0700)
Pull crypto updates from Herbert Xu:
 "API:
   - Add the ability to abort a skcipher walk.

  Algorithms:
   - Fix XTS to actually do the stealing.
   - Add library helpers for AES and DES for single-block users.
   - Add library helpers for SHA256.
   - Add new DES key verification helper.
   - Add surrounding bits for ESSIV generator.
   - Add accelerations for aegis128.
   - Add test vectors for lzo-rle.

  Drivers:
   - Add i.MX8MQ support to caam.
   - Add gcm/ccm/cfb/ofb aes support in inside-secure.
   - Add ofb/cfb aes support in media-tek.
   - Add HiSilicon ZIP accelerator support.

  Others:
   - Fix potential race condition in padata.
   - Use unbound workqueues in padata"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (311 commits)
  crypto: caam - Cast to long first before pointer conversion
  crypto: ccree - enable CTS support in AES-XTS
  crypto: inside-secure - Probe transform record cache RAM sizes
  crypto: inside-secure - Base RD fetchcount on actual RD FIFO size
  crypto: inside-secure - Base CD fetchcount on actual CD FIFO size
  crypto: inside-secure - Enable extended algorithms on newer HW
  crypto: inside-secure: Corrected configuration of EIP96_TOKEN_CTRL
  crypto: inside-secure - Add EIP97/EIP197 and endianness detection
  padata: remove cpu_index from the parallel_queue
  padata: unbind parallel jobs from specific CPUs
  padata: use separate workqueues for parallel and serial work
  padata, pcrypt: take CPU hotplug lock internally in padata_alloc_possible
  crypto: pcrypt - remove padata cpumask notifier
  padata: make padata_do_parallel find alternate callback CPU
  workqueue: require CPU hotplug read exclusion for apply_workqueue_attrs
  workqueue: unconfine alloc/apply/free_workqueue_attrs()
  padata: allocate workqueue internally
  arm64: dts: imx8mq: Add CAAM node
  random: Use wait_event_freezable() in add_hwgenerator_randomness()
  crypto: ux500 - Fix COMPILE_TEST warnings
  ...

1  2 
MAINTAINERS
arch/arm64/boot/dts/freescale/imx8mq.dtsi
arch/s390/crypto/aes_s390.c
arch/x86/purgatory/Makefile
arch/x86/purgatory/purgatory.c
drivers/char/random.c
drivers/crypto/Kconfig
drivers/crypto/ccp/ccp-dev.c
drivers/crypto/ccp/ccp-ops.c
include/net/net_namespace.h

diff --cc MAINTAINERS
Simple merge
index 3f3594d9485cec30c34730255595c76812621f3f,752d5a61878cbfa61f6e1fada7ba2bb44e6a86fb..04115ca6bfb528c40a7f7cf207c57d2377c1a1ba
                                status = "disabled";
                        };
  
+                       crypto: crypto@30900000 {
+                               compatible = "fsl,sec-v4.0";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               reg = <0x30900000 0x40000>;
+                               ranges = <0 0x30900000 0x40000>;
+                               interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clk IMX8MQ_CLK_AHB>,
+                                        <&clk IMX8MQ_CLK_IPG_ROOT>;
+                               clock-names = "aclk", "ipg";
+                               sec_jr0: jr@1000 {
+                                       compatible = "fsl,sec-v4.0-job-ring";
+                                       reg = <0x1000 0x1000>;
+                                       interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+                               };
+                               sec_jr1: jr@2000 {
+                                       compatible = "fsl,sec-v4.0-job-ring";
+                                       reg = <0x2000 0x1000>;
+                                       interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+                               };
+                               sec_jr2: jr@3000 {
+                                       compatible = "fsl,sec-v4.0-job-ring";
+                                       reg = <0x3000 0x1000>;
+                                       interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
+                               };
+                       };
 +                      dphy: dphy@30a00300 {
 +                              compatible = "fsl,imx8mq-mipi-dphy";
 +                              reg = <0x30a00300 0x100>;
 +                              clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>;
 +                              clock-names = "phy_ref";
 +                              assigned-clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>;
 +                              assigned-clock-parents = <&clk IMX8MQ_VIDEO_PLL1_OUT>;
 +                              assigned-clock-rates = <24000000>;
 +                              #phy-cells = <0>;
 +                              power-domains = <&pgc_mipi>;
 +                              status = "disabled";
 +                      };
 +
                        i2c1: i2c@30a20000 {
                                compatible = "fsl,imx8mq-i2c", "fsl,imx21-i2c";
                                reg = <0x30a20000 0x10000>;
index 6d2dbb5089d5c15651e78b2ed67d4cc55246da09,d4f6fd42a105074168186103b233b66ace477551..9803e96d29247e862f14dff26afbd7b1bb733b74
@@@ -586,10 -586,7 +586,10 @@@ static int xts_aes_encrypt(struct blkci
        struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
        struct blkcipher_walk walk;
  
-       if (unlikely(!xts_ctx->fc))
 +      if (!nbytes)
 +              return -EINVAL;
 +
+       if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0))
                return xts_fallback_encrypt(desc, dst, src, nbytes);
  
        blkcipher_walk_init(&walk, dst, src, nbytes);
@@@ -603,10 -600,7 +603,10 @@@ static int xts_aes_decrypt(struct blkci
        struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
        struct blkcipher_walk walk;
  
-       if (unlikely(!xts_ctx->fc))
 +      if (!nbytes)
 +              return -EINVAL;
 +
+       if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0))
                return xts_fallback_decrypt(desc, dst, src, nbytes);
  
        blkcipher_walk_init(&walk, dst, src, nbytes);
index 10fb42da0007e9d3c914143ec4e427dd1eec42f5,ea86982aba270fe2461b7ab091e4a2a789c7ca9f..527749066d31e7faee3ab0dc5de228b488acba74
@@@ -6,12 -6,11 +6,14 @@@ purgatory-y := purgatory.o stack.o setu
  targets += $(purgatory-y)
  PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))
  
- $(obj)/sha256.o: $(srctree)/lib/sha256.c FORCE
 +$(obj)/string.o: $(srctree)/arch/x86/boot/compressed/string.c FORCE
 +      $(call if_changed_rule,cc_o_c)
 +
+ $(obj)/sha256.o: $(srctree)/lib/crypto/sha256.c FORCE
        $(call if_changed_rule,cc_o_c)
  
+ CFLAGS_sha256.o := -D__DISABLE_EXPORTS
  LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined -nostdlib -z nodefaultlib
  targets += purgatory.ro
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge