Commit e26f1bea authored by Linus Torvalds's avatar Linus Torvalds

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
parents 0a2a1330 41cdf7a4
...@@ -8,7 +8,6 @@ Required properties: ...@@ -8,7 +8,6 @@ Required properties:
Optional properties: Optional properties:
- clocks: Reference to the crypto engine clock. - clocks: Reference to the crypto engine clock.
- dma-mask: The address mask limitation. Defaults to 64.
Example: Example:
...@@ -24,6 +23,5 @@ Example: ...@@ -24,6 +23,5 @@ Example:
interrupt-names = "mem", "ring0", "ring1", "ring2", "ring3", interrupt-names = "mem", "ring0", "ring1", "ring2", "ring3",
"eip"; "eip";
clocks = <&cpm_syscon0 1 26>; clocks = <&cpm_syscon0 1 26>;
dma-mask = <0xff 0xffffffff>;
status = "disabled"; status = "disabled";
}; };
...@@ -248,6 +248,9 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req, ...@@ -248,6 +248,9 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,
u8 *ihash = ohash + crypto_ahash_digestsize(auth); u8 *ihash = ohash + crypto_ahash_digestsize(auth);
u32 tmp[2]; u32 tmp[2];
if (!authsize)
goto decrypt;
/* Move high-order bits of sequence number back. */ /* Move high-order bits of sequence number back. */
scatterwalk_map_and_copy(tmp, dst, 4, 4, 0); scatterwalk_map_and_copy(tmp, dst, 4, 4, 0);
scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0); 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,6 +259,8 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,
if (crypto_memneq(ihash, ohash, authsize)) if (crypto_memneq(ihash, ohash, authsize))
return -EBADMSG; return -EBADMSG;
decrypt:
sg_init_table(areq_ctx->dst, 2); sg_init_table(areq_ctx->dst, 2);
dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen); dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen);
......
...@@ -655,7 +655,7 @@ source "drivers/crypto/virtio/Kconfig" ...@@ -655,7 +655,7 @@ source "drivers/crypto/virtio/Kconfig"
config CRYPTO_DEV_BCM_SPU config CRYPTO_DEV_BCM_SPU
tristate "Broadcom symmetric crypto/hash acceleration support" tristate "Broadcom symmetric crypto/hash acceleration support"
depends on ARCH_BCM_IPROC depends on ARCH_BCM_IPROC
depends on BCM_PDC_MBOX depends on MAILBOX
default m default m
select CRYPTO_DES select CRYPTO_DES
select CRYPTO_MD5 select CRYPTO_MD5
......
...@@ -302,6 +302,7 @@ spu2_hash_xlate(enum hash_alg hash_alg, enum hash_mode hash_mode, ...@@ -302,6 +302,7 @@ spu2_hash_xlate(enum hash_alg hash_alg, enum hash_mode hash_mode,
break; break;
case HASH_ALG_SHA3_512: case HASH_ALG_SHA3_512:
*spu2_type = SPU2_HASH_TYPE_SHA3_512; *spu2_type = SPU2_HASH_TYPE_SHA3_512;
break;
case HASH_ALG_LAST: case HASH_ALG_LAST:
default: default:
err = -EINVAL; err = -EINVAL;
......
...@@ -18,8 +18,9 @@ ...@@ -18,8 +18,9 @@
#define SE_GROUP 0 #define SE_GROUP 0
#define DRIVER_VERSION "1.0" #define DRIVER_VERSION "1.0"
#define FW_DIR "cavium/"
/* SE microcode */ /* SE microcode */
#define SE_FW "cnn55xx_se.fw" #define SE_FW FW_DIR "cnn55xx_se.fw"
static const char nitrox_driver_name[] = "CNN55XX"; static const char nitrox_driver_name[] = "CNN55XX";
......
...@@ -773,7 +773,6 @@ static int safexcel_probe(struct platform_device *pdev) ...@@ -773,7 +773,6 @@ static int safexcel_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct resource *res; struct resource *res;
struct safexcel_crypto_priv *priv; struct safexcel_crypto_priv *priv;
u64 dma_mask;
int i, ret; int i, ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
...@@ -802,9 +801,7 @@ static int safexcel_probe(struct platform_device *pdev) ...@@ -802,9 +801,7 @@ static int safexcel_probe(struct platform_device *pdev)
return -EPROBE_DEFER; return -EPROBE_DEFER;
} }
if (of_property_read_u64(dev->of_node, "dma-mask", &dma_mask)) ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
dma_mask = DMA_BIT_MASK(64);
ret = dma_set_mask_and_coherent(dev, dma_mask);
if (ret) if (ret)
goto err_clk; goto err_clk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment