Skip to content

Commit e26f1be

Browse files
committed
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
2 parents 0a2a133 + 41cdf7a commit e26f1be

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Required properties:
88

99
Optional properties:
1010
- clocks: Reference to the crypto engine clock.
11-
- dma-mask: The address mask limitation. Defaults to 64.
1211

1312
Example:
1413

@@ -24,6 +23,5 @@ Example:
2423
interrupt-names = "mem", "ring0", "ring1", "ring2", "ring3",
2524
"eip";
2625
clocks = <&cpm_syscon0 1 26>;
27-
dma-mask = <0xff 0xffffffff>;
2826
status = "disabled";
2927
};

crypto/authencesn.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,
248248
u8 *ihash = ohash + crypto_ahash_digestsize(auth);
249249
u32 tmp[2];
250250

251+
if (!authsize)
252+
goto decrypt;
253+
251254
/* Move high-order bits of sequence number back. */
252255
scatterwalk_map_and_copy(tmp, dst, 4, 4, 0);
253256
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,
256259
if (crypto_memneq(ihash, ohash, authsize))
257260
return -EBADMSG;
258261

262+
decrypt:
263+
259264
sg_init_table(areq_ctx->dst, 2);
260265
dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen);
261266

drivers/crypto/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ source "drivers/crypto/virtio/Kconfig"
655655
config CRYPTO_DEV_BCM_SPU
656656
tristate "Broadcom symmetric crypto/hash acceleration support"
657657
depends on ARCH_BCM_IPROC
658-
depends on BCM_PDC_MBOX
658+
depends on MAILBOX
659659
default m
660660
select CRYPTO_DES
661661
select CRYPTO_MD5

drivers/crypto/bcm/spu2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ spu2_hash_xlate(enum hash_alg hash_alg, enum hash_mode hash_mode,
302302
break;
303303
case HASH_ALG_SHA3_512:
304304
*spu2_type = SPU2_HASH_TYPE_SHA3_512;
305+
break;
305306
case HASH_ALG_LAST:
306307
default:
307308
err = -EINVAL;

drivers/crypto/cavium/nitrox/nitrox_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
#define SE_GROUP 0
1919

2020
#define DRIVER_VERSION "1.0"
21+
#define FW_DIR "cavium/"
2122
/* SE microcode */
22-
#define SE_FW "cnn55xx_se.fw"
23+
#define SE_FW FW_DIR "cnn55xx_se.fw"
2324

2425
static const char nitrox_driver_name[] = "CNN55XX";
2526

drivers/crypto/inside-secure/safexcel.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,6 @@ static int safexcel_probe(struct platform_device *pdev)
773773
struct device *dev = &pdev->dev;
774774
struct resource *res;
775775
struct safexcel_crypto_priv *priv;
776-
u64 dma_mask;
777776
int i, ret;
778777

779778
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -802,9 +801,7 @@ static int safexcel_probe(struct platform_device *pdev)
802801
return -EPROBE_DEFER;
803802
}
804803

805-
if (of_property_read_u64(dev->of_node, "dma-mask", &dma_mask))
806-
dma_mask = DMA_BIT_MASK(64);
807-
ret = dma_set_mask_and_coherent(dev, dma_mask);
804+
ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
808805
if (ret)
809806
goto err_clk;
810807

0 commit comments

Comments
 (0)