diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-28 15:31:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-28 15:31:49 -0400 |
commit | e26f1bea3b833fb2c16fb5f0a949da1efa219de3 (patch) | |
tree | 5ef2fcc307b354b7c2ceee27ac18346b91b9ba69 | |
parent | 0a2a1330d2621c7f963d9f55bb094811cc1c06b9 (diff) | |
parent | 41cdf7a45389e01991ee31e3301ed83cb3e3f7dc (diff) |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
- remove broken dt bindings in inside-secure
- fix authencesn crash when used with digest_null
- fix cavium/nitrox firmware path
- fix SHA3 failure in brcm
- fix Kconfig dependency for brcm
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: authencesn - Fix digest_null crash
crypto: brcm - remove BCM_PDC_MBOX dependency in Kconfig
Documentation/bindings: crypto: remove the dma-mask property
crypto: inside-secure - do not parse the dma mask from dt
crypto: cavium/nitrox - Change in firmware path.
crypto: brcm - Fix SHA3-512 algorithm failure
-rw-r--r-- | Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt | 2 | ||||
-rw-r--r-- | crypto/authencesn.c | 5 | ||||
-rw-r--r-- | drivers/crypto/Kconfig | 2 | ||||
-rw-r--r-- | drivers/crypto/bcm/spu2.c | 1 | ||||
-rw-r--r-- | drivers/crypto/cavium/nitrox/nitrox_main.c | 3 | ||||
-rw-r--r-- | drivers/crypto/inside-secure/safexcel.c | 5 |
6 files changed, 10 insertions, 8 deletions
diff --git a/Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt b/Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt index f69773f4252b..941bb6a6fb13 100644 --- a/Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt +++ b/Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt | |||
@@ -8,7 +8,6 @@ Required properties: | |||
8 | 8 | ||
9 | Optional properties: | 9 | Optional properties: |
10 | - clocks: Reference to the crypto engine clock. | 10 | - clocks: Reference to the crypto engine clock. |
11 | - dma-mask: The address mask limitation. Defaults to 64. | ||
12 | 11 | ||
13 | Example: | 12 | Example: |
14 | 13 | ||
@@ -24,6 +23,5 @@ Example: | |||
24 | interrupt-names = "mem", "ring0", "ring1", "ring2", "ring3", | 23 | interrupt-names = "mem", "ring0", "ring1", "ring2", "ring3", |
25 | "eip"; | 24 | "eip"; |
26 | clocks = <&cpm_syscon0 1 26>; | 25 | clocks = <&cpm_syscon0 1 26>; |
27 | dma-mask = <0xff 0xffffffff>; | ||
28 | status = "disabled"; | 26 | status = "disabled"; |
29 | }; | 27 | }; |
diff --git a/crypto/authencesn.c b/crypto/authencesn.c index 6f8f6b86bfe2..0cf5fefdb859 100644 --- a/crypto/authencesn.c +++ b/crypto/authencesn.c | |||
@@ -248,6 +248,9 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req, | |||
248 | u8 *ihash = ohash + crypto_ahash_digestsize(auth); | 248 | u8 *ihash = ohash + crypto_ahash_digestsize(auth); |
249 | u32 tmp[2]; | 249 | u32 tmp[2]; |
250 | 250 | ||
251 | if (!authsize) | ||
252 | goto decrypt; | ||
253 | |||
251 | /* Move high-order bits of sequence number back. */ | 254 | /* Move high-order bits of sequence number back. */ |
252 | scatterwalk_map_and_copy(tmp, dst, 4, 4, 0); | 255 | scatterwalk_map_and_copy(tmp, dst, 4, 4, 0); |
253 | scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0); | 256 | scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0); |
@@ -256,6 +259,8 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req, | |||
256 | if (crypto_memneq(ihash, ohash, authsize)) | 259 | if (crypto_memneq(ihash, ohash, authsize)) |
257 | return -EBADMSG; | 260 | return -EBADMSG; |
258 | 261 | ||
262 | decrypt: | ||
263 | |||
259 | sg_init_table(areq_ctx->dst, 2); | 264 | sg_init_table(areq_ctx->dst, 2); |
260 | dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen); | 265 | dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen); |
261 | 266 | ||
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 193204dfbf3a..4b75084fabad 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig | |||
@@ -655,7 +655,7 @@ source "drivers/crypto/virtio/Kconfig" | |||
655 | config CRYPTO_DEV_BCM_SPU | 655 | config CRYPTO_DEV_BCM_SPU |
656 | tristate "Broadcom symmetric crypto/hash acceleration support" | 656 | tristate "Broadcom symmetric crypto/hash acceleration support" |
657 | depends on ARCH_BCM_IPROC | 657 | depends on ARCH_BCM_IPROC |
658 | depends on BCM_PDC_MBOX | 658 | depends on MAILBOX |
659 | default m | 659 | default m |
660 | select CRYPTO_DES | 660 | select CRYPTO_DES |
661 | select CRYPTO_MD5 | 661 | select CRYPTO_MD5 |
diff --git a/drivers/crypto/bcm/spu2.c b/drivers/crypto/bcm/spu2.c index ef04c9748317..bf7ac621c591 100644 --- a/drivers/crypto/bcm/spu2.c +++ b/drivers/crypto/bcm/spu2.c | |||
@@ -302,6 +302,7 @@ spu2_hash_xlate(enum hash_alg hash_alg, enum hash_mode hash_mode, | |||
302 | break; | 302 | break; |
303 | case HASH_ALG_SHA3_512: | 303 | case HASH_ALG_SHA3_512: |
304 | *spu2_type = SPU2_HASH_TYPE_SHA3_512; | 304 | *spu2_type = SPU2_HASH_TYPE_SHA3_512; |
305 | break; | ||
305 | case HASH_ALG_LAST: | 306 | case HASH_ALG_LAST: |
306 | default: | 307 | default: |
307 | err = -EINVAL; | 308 | err = -EINVAL; |
diff --git a/drivers/crypto/cavium/nitrox/nitrox_main.c b/drivers/crypto/cavium/nitrox/nitrox_main.c index ae44a464cd2d..9ccefb9b7232 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_main.c +++ b/drivers/crypto/cavium/nitrox/nitrox_main.c | |||
@@ -18,8 +18,9 @@ | |||
18 | #define SE_GROUP 0 | 18 | #define SE_GROUP 0 |
19 | 19 | ||
20 | #define DRIVER_VERSION "1.0" | 20 | #define DRIVER_VERSION "1.0" |
21 | #define FW_DIR "cavium/" | ||
21 | /* SE microcode */ | 22 | /* SE microcode */ |
22 | #define SE_FW "cnn55xx_se.fw" | 23 | #define SE_FW FW_DIR "cnn55xx_se.fw" |
23 | 24 | ||
24 | static const char nitrox_driver_name[] = "CNN55XX"; | 25 | static const char nitrox_driver_name[] = "CNN55XX"; |
25 | 26 | ||
diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c index e7f87ac12685..1fabd4aee81b 100644 --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c | |||
@@ -773,7 +773,6 @@ static int safexcel_probe(struct platform_device *pdev) | |||
773 | struct device *dev = &pdev->dev; | 773 | struct device *dev = &pdev->dev; |
774 | struct resource *res; | 774 | struct resource *res; |
775 | struct safexcel_crypto_priv *priv; | 775 | struct safexcel_crypto_priv *priv; |
776 | u64 dma_mask; | ||
777 | int i, ret; | 776 | int i, ret; |
778 | 777 | ||
779 | priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); | 778 | priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); |
@@ -802,9 +801,7 @@ static int safexcel_probe(struct platform_device *pdev) | |||
802 | return -EPROBE_DEFER; | 801 | return -EPROBE_DEFER; |
803 | } | 802 | } |
804 | 803 | ||
805 | if (of_property_read_u64(dev->of_node, "dma-mask", &dma_mask)) | 804 | ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)); |
806 | dma_mask = DMA_BIT_MASK(64); | ||
807 | ret = dma_set_mask_and_coherent(dev, dma_mask); | ||
808 | if (ret) | 805 | if (ret) |
809 | goto err_clk; | 806 | goto err_clk; |
810 | 807 | ||