Skip to content

Commit 733f7e9

Browse files
committed
Merge tag 'v6.4-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "API: - Total usage stats now include all that returned errors (instead of just some) - Remove maximum hash statesize limit - Add cloning support for hmac and unkeyed hashes - Demote BUG_ON in crypto_unregister_alg to a WARN_ON Algorithms: - Use RIP-relative addressing on x86 to prepare for PIE build - Add accelerated AES/GCM stitched implementation on powerpc P10 - Add some test vectors for cmac(camellia) - Remove failure case where jent is unavailable outside of FIPS mode in drbg - Add permanent and intermittent health error checks in jitter RNG Drivers: - Add support for 402xx devices in qat - Add support for HiSTB TRNG - Fix hash concurrency issues in stm32 - Add OP-TEE firmware support in caam" * tag 'v6.4-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (139 commits) i2c: designware: Add doorbell support for Mendocino i2c: designware: Use PCI PSP driver for communication powerpc: Move Power10 feature PPC_MODULE_FEATURE_P10 crypto: p10-aes-gcm - Remove POWER10_CPU dependency crypto: testmgr - Add some test vectors for cmac(camellia) crypto: cryptd - Add support for cloning hashes crypto: cryptd - Convert hash to use modern init_tfm/exit_tfm crypto: hmac - Add support for cloning crypto: hash - Add crypto_clone_ahash/shash crypto: api - Add crypto_clone_tfm crypto: api - Add crypto_tfm_get crypto: x86/sha - Use local .L symbols for code crypto: x86/crc32 - Use local .L symbols for code crypto: x86/aesni - Use local .L symbols for code crypto: x86/sha256 - Use RIP-relative addressing crypto: x86/ghash - Use RIP-relative addressing crypto: x86/des3 - Use RIP-relative addressing crypto: x86/crc32c - Use RIP-relative addressing crypto: x86/cast6 - Use RIP-relative addressing crypto: x86/cast5 - Use RIP-relative addressing ...
2 parents 98f99e6 + 482c84e commit 733f7e9

File tree

257 files changed

+6776
-2730
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+6776
-2730
lines changed

Documentation/devicetree/bindings/crypto/qcom-qce.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/crypto/qcom-qce.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm crypto engine driver
8+
9+
maintainers:
10+
- Bhupesh Sharma <[email protected]>
11+
12+
description:
13+
This document defines the binding for the QCE crypto
14+
controller found on Qualcomm parts.
15+
16+
properties:
17+
compatible:
18+
oneOf:
19+
- const: qcom,crypto-v5.1
20+
deprecated: true
21+
description: Kept only for ABI backward compatibility
22+
23+
- const: qcom,crypto-v5.4
24+
deprecated: true
25+
description: Kept only for ABI backward compatibility
26+
27+
- items:
28+
- enum:
29+
- qcom,ipq6018-qce
30+
- qcom,ipq8074-qce
31+
- qcom,msm8996-qce
32+
- qcom,sdm845-qce
33+
- const: qcom,ipq4019-qce
34+
- const: qcom,qce
35+
36+
- items:
37+
- enum:
38+
- qcom,sm8250-qce
39+
- qcom,sm8350-qce
40+
- qcom,sm8450-qce
41+
- qcom,sm8550-qce
42+
- const: qcom,sm8150-qce
43+
- const: qcom,qce
44+
45+
reg:
46+
maxItems: 1
47+
48+
clocks:
49+
items:
50+
- description: iface clocks register interface.
51+
- description: bus clocks data transfer interface.
52+
- description: core clocks rest of the crypto block.
53+
54+
clock-names:
55+
items:
56+
- const: iface
57+
- const: bus
58+
- const: core
59+
60+
iommus:
61+
minItems: 1
62+
maxItems: 8
63+
description:
64+
phandle to apps_smmu node with sid mask.
65+
66+
interconnects:
67+
maxItems: 1
68+
description:
69+
Interconnect path between qce crypto and main memory.
70+
71+
interconnect-names:
72+
const: memory
73+
74+
dmas:
75+
items:
76+
- description: DMA specifiers for rx dma channel.
77+
- description: DMA specifiers for tx dma channel.
78+
79+
dma-names:
80+
items:
81+
- const: rx
82+
- const: tx
83+
84+
allOf:
85+
- if:
86+
properties:
87+
compatible:
88+
contains:
89+
enum:
90+
- qcom,crypto-v5.1
91+
- qcom,crypto-v5.4
92+
- qcom,ipq4019-qce
93+
94+
then:
95+
required:
96+
- clocks
97+
- clock-names
98+
99+
required:
100+
- compatible
101+
- reg
102+
- dmas
103+
- dma-names
104+
105+
additionalProperties: false
106+
107+
examples:
108+
- |
109+
#include <dt-bindings/clock/qcom,gcc-apq8084.h>
110+
crypto-engine@fd45a000 {
111+
compatible = "qcom,ipq6018-qce", "qcom,ipq4019-qce", "qcom,qce";
112+
reg = <0xfd45a000 0x6000>;
113+
clocks = <&gcc GCC_CE2_AHB_CLK>,
114+
<&gcc GCC_CE2_AXI_CLK>,
115+
<&gcc GCC_CE2_CLK>;
116+
clock-names = "iface", "bus", "core";
117+
dmas = <&cryptobam 2>, <&cryptobam 3>;
118+
dma-names = "rx", "tx";
119+
iommus = <&apps_smmu 0x584 0x0011>,
120+
<&apps_smmu 0x586 0x0011>,
121+
<&apps_smmu 0x594 0x0011>,
122+
<&apps_smmu 0x596 0x0011>;
123+
};

MAINTAINERS

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,7 @@ F: arch/arm/boot/dts/intel-ixp*
22692269
F: arch/arm/mach-ixp4xx/
22702270
F: drivers/bus/intel-ixp4xx-eb.c
22712271
F: drivers/clocksource/timer-ixp4xx.c
2272-
F: drivers/crypto/ixp4xx_crypto.c
2272+
F: drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c
22732273
F: drivers/gpio/gpio-ixp4xx.c
22742274
F: drivers/irqchip/irq-ixp4xx.c
22752275

@@ -10391,7 +10391,7 @@ INTEL IXP4XX CRYPTO SUPPORT
1039110391
M: Corentin Labbe <[email protected]>
1039210392
1039310393
S: Maintained
10394-
F: drivers/crypto/ixp4xx_crypto.c
10394+
F: drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c
1039510395

1039610396
INTEL ISHTP ECLITE DRIVER
1039710397
M: Sumesh K Naduvalath <[email protected]>
@@ -10426,32 +10426,32 @@ INTEL KEEM BAY OCS AES/SM4 CRYPTO DRIVER
1042610426
M: Daniele Alessandrelli <[email protected]>
1042710427
S: Maintained
1042810428
F: Documentation/devicetree/bindings/crypto/intel,keembay-ocs-aes.yaml
10429-
F: drivers/crypto/keembay/Kconfig
10430-
F: drivers/crypto/keembay/Makefile
10431-
F: drivers/crypto/keembay/keembay-ocs-aes-core.c
10432-
F: drivers/crypto/keembay/ocs-aes.c
10433-
F: drivers/crypto/keembay/ocs-aes.h
10429+
F: drivers/crypto/intel/keembay/Kconfig
10430+
F: drivers/crypto/intel/keembay/Makefile
10431+
F: drivers/crypto/intel/keembay/keembay-ocs-aes-core.c
10432+
F: drivers/crypto/intel/keembay/ocs-aes.c
10433+
F: drivers/crypto/intel/keembay/ocs-aes.h
1043410434

1043510435
INTEL KEEM BAY OCS ECC CRYPTO DRIVER
1043610436
M: Daniele Alessandrelli <[email protected]>
1043710437
M: Prabhjot Khurana <[email protected]>
1043810438
M: Mark Gross <[email protected]>
1043910439
S: Maintained
1044010440
F: Documentation/devicetree/bindings/crypto/intel,keembay-ocs-ecc.yaml
10441-
F: drivers/crypto/keembay/Kconfig
10442-
F: drivers/crypto/keembay/Makefile
10443-
F: drivers/crypto/keembay/keembay-ocs-ecc.c
10441+
F: drivers/crypto/intel/keembay/Kconfig
10442+
F: drivers/crypto/intel/keembay/Makefile
10443+
F: drivers/crypto/intel/keembay/keembay-ocs-ecc.c
1044410444

1044510445
INTEL KEEM BAY OCS HCU CRYPTO DRIVER
1044610446
M: Daniele Alessandrelli <[email protected]>
1044710447
M: Declan Murphy <[email protected]>
1044810448
S: Maintained
1044910449
F: Documentation/devicetree/bindings/crypto/intel,keembay-ocs-hcu.yaml
10450-
F: drivers/crypto/keembay/Kconfig
10451-
F: drivers/crypto/keembay/Makefile
10452-
F: drivers/crypto/keembay/keembay-ocs-hcu-core.c
10453-
F: drivers/crypto/keembay/ocs-hcu.c
10454-
F: drivers/crypto/keembay/ocs-hcu.h
10450+
F: drivers/crypto/intel/keembay/Kconfig
10451+
F: drivers/crypto/intel/keembay/Makefile
10452+
F: drivers/crypto/intel/keembay/keembay-ocs-hcu-core.c
10453+
F: drivers/crypto/intel/keembay/ocs-hcu.c
10454+
F: drivers/crypto/intel/keembay/ocs-hcu.h
1045510455

1045610456
INTEL THUNDER BAY EMMC PHY DRIVER
1045710457
M: Nandhini Srikandan <[email protected]>
@@ -17027,7 +17027,7 @@ QAT DRIVER
1702717027
M: Giovanni Cabiddu <[email protected]>
1702817028
1702917029
S: Supported
17030-
F: drivers/crypto/qat/
17030+
F: drivers/crypto/intel/qat/
1703117031

1703217032
QCOM AUDIO (ASoC) DRIVERS
1703317033
M: Srinivas Kandagatla <[email protected]>
@@ -17295,6 +17295,7 @@ M: Thara Gopinath <[email protected]>
1729517295
1729617296
1729717297
S: Maintained
17298+
F: Documentation/devicetree/bindings/crypto/qcom-qce.yaml
1729817299
F: drivers/crypto/qce/
1729917300

1730017301
QUALCOMM EMAC GIGABIT ETHERNET DRIVER

arch/arm64/boot/dts/qcom/sm8550.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,7 @@
18501850
};
18511851

18521852
crypto: crypto@1de0000 {
1853-
compatible = "qcom,sm8550-qce";
1853+
compatible = "qcom,sm8550-qce", "qcom,sm8150-qce", "qcom,qce";
18541854
reg = <0x0 0x01dfa000 0x0 0x6000>;
18551855
dmas = <&cryptobam 4>, <&cryptobam 5>;
18561856
dma-names = "rx", "tx";

arch/arm64/crypto/aes-neonbs-core.S

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include <linux/linkage.h>
18+
#include <linux/cfi_types.h>
1819
#include <asm/assembler.h>
1920

2021
.text
@@ -620,12 +621,12 @@ SYM_FUNC_END(aesbs_decrypt8)
620621
.endm
621622

622623
.align 4
623-
SYM_FUNC_START(aesbs_ecb_encrypt)
624+
SYM_TYPED_FUNC_START(aesbs_ecb_encrypt)
624625
__ecb_crypt aesbs_encrypt8, v0, v1, v4, v6, v3, v7, v2, v5
625626
SYM_FUNC_END(aesbs_ecb_encrypt)
626627

627628
.align 4
628-
SYM_FUNC_START(aesbs_ecb_decrypt)
629+
SYM_TYPED_FUNC_START(aesbs_ecb_decrypt)
629630
__ecb_crypt aesbs_decrypt8, v0, v1, v6, v4, v2, v7, v3, v5
630631
SYM_FUNC_END(aesbs_ecb_decrypt)
631632

@@ -799,11 +800,11 @@ SYM_FUNC_END(__xts_crypt8)
799800
ret
800801
.endm
801802

802-
SYM_FUNC_START(aesbs_xts_encrypt)
803+
SYM_TYPED_FUNC_START(aesbs_xts_encrypt)
803804
__xts_crypt aesbs_encrypt8, v0, v1, v4, v6, v3, v7, v2, v5
804805
SYM_FUNC_END(aesbs_xts_encrypt)
805806

806-
SYM_FUNC_START(aesbs_xts_decrypt)
807+
SYM_TYPED_FUNC_START(aesbs_xts_decrypt)
807808
__xts_crypt aesbs_decrypt8, v0, v1, v6, v4, v2, v7, v3, v5
808809
SYM_FUNC_END(aesbs_xts_decrypt)
809810

arch/powerpc/crypto/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,21 @@ config CRYPTO_AES_PPC_SPE
9494
architecture specific assembler implementations that work on 1KB
9595
tables or 256 bytes S-boxes.
9696

97+
config CRYPTO_AES_GCM_P10
98+
tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)"
99+
depends on PPC64 && CPU_LITTLE_ENDIAN
100+
select CRYPTO_LIB_AES
101+
select CRYPTO_ALGAPI
102+
select CRYPTO_AEAD
103+
default m
104+
help
105+
AEAD cipher: AES cipher algorithms (FIPS-197)
106+
GCM (Galois/Counter Mode) authenticated encryption mode (NIST SP800-38D)
107+
Architecture: powerpc64 using:
108+
- little-endian
109+
- Power10 or later features
110+
111+
Support for cryptographic acceleration instructions on Power10 or
112+
later CPU. This module supports stitched acceleration for AES/GCM.
113+
97114
endmenu

arch/powerpc/crypto/Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ obj-$(CONFIG_CRYPTO_SHA256_PPC_SPE) += sha256-ppc-spe.o
1313
obj-$(CONFIG_CRYPTO_CRC32C_VPMSUM) += crc32c-vpmsum.o
1414
obj-$(CONFIG_CRYPTO_CRCT10DIF_VPMSUM) += crct10dif-vpmsum.o
1515
obj-$(CONFIG_CRYPTO_VPMSUM_TESTER) += crc-vpmsum_test.o
16+
obj-$(CONFIG_CRYPTO_AES_GCM_P10) += aes-gcm-p10-crypto.o
1617

1718
aes-ppc-spe-y := aes-spe-core.o aes-spe-keys.o aes-tab-4k.o aes-spe-modes.o aes-spe-glue.o
1819
md5-ppc-y := md5-asm.o md5-glue.o
@@ -21,3 +22,15 @@ sha1-ppc-spe-y := sha1-spe-asm.o sha1-spe-glue.o
2122
sha256-ppc-spe-y := sha256-spe-asm.o sha256-spe-glue.o
2223
crc32c-vpmsum-y := crc32c-vpmsum_asm.o crc32c-vpmsum_glue.o
2324
crct10dif-vpmsum-y := crct10dif-vpmsum_asm.o crct10dif-vpmsum_glue.o
25+
aes-gcm-p10-crypto-y := aes-gcm-p10-glue.o aes-gcm-p10.o ghashp8-ppc.o aesp8-ppc.o
26+
27+
quiet_cmd_perl = PERL $@
28+
cmd_perl = $(PERL) $< $(if $(CONFIG_CPU_LITTLE_ENDIAN), linux-ppc64le, linux-ppc64) > $@
29+
30+
targets += aesp8-ppc.S ghashp8-ppc.S
31+
32+
$(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S: $(obj)/%.S: $(src)/%.pl FORCE
33+
$(call if_changed,perl)
34+
35+
OBJECT_FILES_NON_STANDARD_aesp8-ppc.o := y
36+
OBJECT_FILES_NON_STANDARD_ghashp8-ppc.o := y

0 commit comments

Comments
 (0)