Skip to content

Commit bfc484f

Browse files
committed
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "API: - Delay boot-up self-test for built-in algorithms Algorithms: - Remove fallback path on arm64 as SIMD now runs with softirq off Drivers: - Add Keem Bay OCS ECC Driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (61 commits) crypto: testmgr - fix wrong key length for pkcs1pad crypto: pcrypt - Delay write to padata->info crypto: ccp - Make use of the helper macro kthread_run() crypto: sa2ul - Use the defined variable to clean code crypto: s5p-sss - Add error handling in s5p_aes_probe() crypto: keembay-ocs-ecc - Add Keem Bay OCS ECC Driver dt-bindings: crypto: Add Keem Bay ECC bindings crypto: ecc - Export additional helper functions crypto: ecc - Move ecc.h to include/crypto/internal crypto: engine - Add KPP Support to Crypto Engine crypto: api - Do not create test larvals if manager is disabled crypto: tcrypt - fix skcipher multi-buffer tests for 1420B blocks hwrng: s390 - replace snprintf in show functions with sysfs_emit crypto: octeontx2 - set assoclen in aead_do_fallback() crypto: ccp - Fix whitespace in sev_cmd_buffer_len() hwrng: mtk - Force runtime pm ops for sleep ops crypto: testmgr - Only disable migration in crypto_disable_simd_for_test() crypto: qat - share adf_enable_pf2vf_comms() from adf_pf2vf_msg.c crypto: qat - extract send and wait from adf_vf2pf_request_version() crypto: qat - add VF and PF wrappers to common send function ...
2 parents d2fac0a + 39ef085 commit bfc484f

Some content is hidden

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

68 files changed

+2130
-1158
lines changed

Documentation/crypto/crypto_engine.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ the crypto engine via one of:
6969

7070
* crypto_transfer_hash_request_to_engine()
7171

72+
* crypto_transfer_kpp_request_to_engine()
73+
7274
* crypto_transfer_skcipher_request_to_engine()
7375

7476
At the end of the request process, a call to one of the following functions is needed:
@@ -79,4 +81,6 @@ At the end of the request process, a call to one of the following functions is n
7981

8082
* crypto_finalize_hash_request()
8183

84+
* crypto_finalize_kpp_request()
85+
8286
* crypto_finalize_skcipher_request()
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/crypto/intel,keembay-ocs-ecc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Intel Keem Bay OCS ECC Device Tree Bindings
8+
9+
maintainers:
10+
- Daniele Alessandrelli <[email protected]>
11+
- Prabhjot Khurana <[email protected]>
12+
13+
description:
14+
The Intel Keem Bay Offload and Crypto Subsystem (OCS) Elliptic Curve
15+
Cryptography (ECC) device provides hardware acceleration for elliptic curve
16+
cryptography using the NIST P-256 and NIST P-384 elliptic curves.
17+
18+
properties:
19+
compatible:
20+
const: intel,keembay-ocs-ecc
21+
22+
reg:
23+
maxItems: 1
24+
25+
interrupts:
26+
maxItems: 1
27+
28+
clocks:
29+
maxItems: 1
30+
31+
required:
32+
- compatible
33+
- reg
34+
- interrupts
35+
- clocks
36+
37+
additionalProperties: false
38+
39+
examples:
40+
- |
41+
#include <dt-bindings/interrupt-controller/arm-gic.h>
42+
crypto@30001000 {
43+
compatible = "intel,keembay-ocs-ecc";
44+
reg = <0x30001000 0x1000>;
45+
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
46+
clocks = <&scmi_clk 95>;
47+
};

MAINTAINERS

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9556,6 +9556,17 @@ F: drivers/crypto/keembay/keembay-ocs-aes-core.c
95569556
F: drivers/crypto/keembay/ocs-aes.c
95579557
F: drivers/crypto/keembay/ocs-aes.h
95589558

9559+
INTEL KEEM BAY OCS ECC CRYPTO DRIVER
9560+
M: Daniele Alessandrelli <[email protected]>
9561+
M: Prabhjot Khurana <[email protected]>
9562+
M: Mark Gross <[email protected]>
9563+
S: Maintained
9564+
F: Documentation/devicetree/bindings/crypto/intel,keembay-ocs-ecc.yaml
9565+
F: drivers/crypto/keembay/Kconfig
9566+
F: drivers/crypto/keembay/Makefile
9567+
F: drivers/crypto/keembay/keembay-ocs-ecc.c
9568+
F: drivers/crypto/keembay/ocs-ecc-curve-defs.h
9569+
95599570
INTEL KEEM BAY OCS HCU CRYPTO DRIVER
95609571
M: Daniele Alessandrelli <[email protected]>
95619572
M: Declan Murphy <[email protected]>

arch/arm64/crypto/Kconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,12 @@ config CRYPTO_AES_ARM64_CE_BLK
8888
depends on KERNEL_MODE_NEON
8989
select CRYPTO_SKCIPHER
9090
select CRYPTO_AES_ARM64_CE
91-
select CRYPTO_AES_ARM64
92-
select CRYPTO_SIMD
9391

9492
config CRYPTO_AES_ARM64_NEON_BLK
9593
tristate "AES in ECB/CBC/CTR/XTS modes using NEON instructions"
9694
depends on KERNEL_MODE_NEON
9795
select CRYPTO_SKCIPHER
98-
select CRYPTO_AES_ARM64
9996
select CRYPTO_LIB_AES
100-
select CRYPTO_SIMD
10197

10298
config CRYPTO_CHACHA20_NEON
10399
tristate "ChaCha20, XChaCha20, and XChaCha12 stream ciphers using NEON instructions"
@@ -122,8 +118,6 @@ config CRYPTO_AES_ARM64_BS
122118
depends on KERNEL_MODE_NEON
123119
select CRYPTO_SKCIPHER
124120
select CRYPTO_AES_ARM64_NEON_BLK
125-
select CRYPTO_AES_ARM64
126121
select CRYPTO_LIB_AES
127-
select CRYPTO_SIMD
128122

129123
endif

arch/arm64/crypto/aes-ce-ccm-core.S

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,21 @@
1212
.arch armv8-a+crypto
1313

1414
/*
15-
* void ce_aes_ccm_auth_data(u8 mac[], u8 const in[], u32 abytes,
16-
* u32 *macp, u8 const rk[], u32 rounds);
15+
* u32 ce_aes_ccm_auth_data(u8 mac[], u8 const in[], u32 abytes,
16+
* u32 macp, u8 const rk[], u32 rounds);
1717
*/
1818
SYM_FUNC_START(ce_aes_ccm_auth_data)
19-
ldr w8, [x3] /* leftover from prev round? */
2019
ld1 {v0.16b}, [x0] /* load mac */
21-
cbz w8, 1f
22-
sub w8, w8, #16
20+
cbz w3, 1f
21+
sub w3, w3, #16
2322
eor v1.16b, v1.16b, v1.16b
2423
0: ldrb w7, [x1], #1 /* get 1 byte of input */
2524
subs w2, w2, #1
26-
add w8, w8, #1
25+
add w3, w3, #1
2726
ins v1.b[0], w7
2827
ext v1.16b, v1.16b, v1.16b, #1 /* rotate in the input bytes */
2928
beq 8f /* out of input? */
30-
cbnz w8, 0b
29+
cbnz w3, 0b
3130
eor v0.16b, v0.16b, v1.16b
3231
1: ld1 {v3.4s}, [x4] /* load first round key */
3332
prfm pldl1strm, [x1]
@@ -62,7 +61,7 @@ SYM_FUNC_START(ce_aes_ccm_auth_data)
6261
beq 10f
6362
adds w2, w2, #16
6463
beq 10f
65-
mov w8, w2
64+
mov w3, w2
6665
7: ldrb w7, [x1], #1
6766
umov w6, v0.b[0]
6867
eor w6, w6, w7
@@ -71,15 +70,15 @@ SYM_FUNC_START(ce_aes_ccm_auth_data)
7170
beq 10f
7271
ext v0.16b, v0.16b, v0.16b, #1 /* rotate out the mac bytes */
7372
b 7b
74-
8: cbz w8, 91f
75-
mov w7, w8
76-
add w8, w8, #16
73+
8: cbz w3, 91f
74+
mov w7, w3
75+
add w3, w3, #16
7776
9: ext v1.16b, v1.16b, v1.16b, #1
7877
adds w7, w7, #1
7978
bne 9b
8079
91: eor v0.16b, v0.16b, v1.16b
8180
st1 {v0.16b}, [x0]
82-
10: str w8, [x3]
81+
10: mov w0, w3
8382
ret
8483
SYM_FUNC_END(ce_aes_ccm_auth_data)
8584

@@ -124,6 +123,7 @@ SYM_FUNC_START(ce_aes_ccm_final)
124123
SYM_FUNC_END(ce_aes_ccm_final)
125124

126125
.macro aes_ccm_do_crypt,enc
126+
cbz x2, 5f
127127
ldr x8, [x6, #8] /* load lower ctr */
128128
ld1 {v0.16b}, [x5] /* load mac */
129129
CPU_LE( rev x8, x8 ) /* keep swabbed ctr in reg */

0 commit comments

Comments
 (0)