Skip to content

Commit 64e7003

Browse files
committed
Merge tag 'v6.2-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "API: - Optimise away self-test overhead when they are disabled - Support symmetric encryption via keyring keys in af_alg - Flip hwrng default_quality, the default is now maximum entropy Algorithms: - Add library version of aesgcm - CFI fixes for assembly code - Add arm/arm64 accelerated versions of sm3/sm4 Drivers: - Remove assumption on arm64 that kmalloc is DMA-aligned - Fix selftest failures in rockchip - Add support for RK3328/RK3399 in rockchip - Add deflate support in qat - Merge ux500 into stm32 - Add support for TEE for PCI ID 0x14CA in ccp - Add mt7986 support in mtk - Add MaxLinear platform support in inside-secure - Add NPCM8XX support in npcm" * tag 'v6.2-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (184 commits) crypto: ux500/cryp - delete driver crypto: stm32/cryp - enable for use with Ux500 crypto: stm32 - enable drivers to be used on Ux500 dt-bindings: crypto: Let STM32 define Ux500 CRYP hwrng: geode - Fix PCI device refcount leak hwrng: amd - Fix PCI device refcount leak crypto: qce - Set DMA alignment explicitly crypto: octeontx2 - Set DMA alignment explicitly crypto: octeontx - Set DMA alignment explicitly crypto: keembay - Set DMA alignment explicitly crypto: safexcel - Set DMA alignment explicitly crypto: hisilicon/hpre - Set DMA alignment explicitly crypto: chelsio - Set DMA alignment explicitly crypto: ccree - Set DMA alignment explicitly crypto: ccp - Set DMA alignment explicitly crypto: cavium - Set DMA alignment explicitly crypto: img-hash - Fix variable dereferenced before check 'hdev->req' crypto: arm64/ghash-ce - use frame_push/pop macros consistently crypto: arm64/crct10dif - use frame_push/pop macros consistently crypto: arm64/aes-modes - use frame_push/pop macros consistently ...
2 parents 48ea09c + 453de3e commit 64e7003

File tree

255 files changed

+13365
-7088
lines changed

Some content is hidden

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

255 files changed

+13365
-7088
lines changed

Documentation/crypto/devel-algos.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Here are schematics of how these functions are called when operated from
172172
other part of the kernel. Note that the .setkey() call might happen
173173
before or after any of these schematics happen, but must not happen
174174
during any of these are in-flight. Please note that calling .init()
175-
followed immediately by .finish() is also a perfectly valid
175+
followed immediately by .final() is also a perfectly valid
176176
transformation.
177177

178178
::

Documentation/crypto/userspace-if.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ from the kernel crypto API. If the buffer is too small for the message
131131
digest, the flag MSG_TRUNC is set by the kernel.
132132

133133
In order to set a message digest key, the calling application must use
134-
the setsockopt() option of ALG_SET_KEY. If the key is not set the HMAC
135-
operation is performed without the initial HMAC state change caused by
136-
the key.
134+
the setsockopt() option of ALG_SET_KEY or ALG_SET_KEY_BY_KEY_SERIAL. If the
135+
key is not set the HMAC operation is performed without the initial HMAC state
136+
change caused by the key.
137137

138138
Symmetric Cipher API
139139
--------------------
@@ -382,6 +382,15 @@ mentioned optname:
382382

383383
- the RNG cipher type to provide the seed
384384

385+
- ALG_SET_KEY_BY_KEY_SERIAL -- Setting the key via keyring key_serial_t.
386+
This operation behaves the same as ALG_SET_KEY. The decrypted
387+
data is copied from a keyring key, and uses that data as the
388+
key for symmetric encryption.
389+
390+
The passed in key_serial_t must have the KEY_(POS|USR|GRP|OTH)_SEARCH
391+
permission set, otherwise -EPERM is returned. Supports key types: user,
392+
logon, encrypted, and trusted.
393+
385394
- ALG_SET_AEAD_AUTHSIZE -- Setting the authentication tag size for
386395
AEAD ciphers. For a encryption operation, the authentication tag of
387396
the given size will be generated. For a decryption operation, the
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/crypto/rockchip,rk3288-crypto.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Rockchip Electronics Security Accelerator
8+
9+
maintainers:
10+
- Heiko Stuebner <[email protected]>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- rockchip,rk3288-crypto
16+
- rockchip,rk3328-crypto
17+
- rockchip,rk3399-crypto
18+
19+
reg:
20+
maxItems: 1
21+
22+
interrupts:
23+
maxItems: 1
24+
25+
clocks:
26+
minItems: 3
27+
maxItems: 4
28+
29+
clock-names:
30+
minItems: 3
31+
maxItems: 4
32+
33+
resets:
34+
minItems: 1
35+
maxItems: 3
36+
37+
reset-names:
38+
minItems: 1
39+
maxItems: 3
40+
41+
allOf:
42+
- if:
43+
properties:
44+
compatible:
45+
contains:
46+
const: rockchip,rk3288-crypto
47+
then:
48+
properties:
49+
clocks:
50+
minItems: 4
51+
clock-names:
52+
items:
53+
- const: aclk
54+
- const: hclk
55+
- const: sclk
56+
- const: apb_pclk
57+
resets:
58+
maxItems: 1
59+
reset-names:
60+
items:
61+
- const: crypto-rst
62+
- if:
63+
properties:
64+
compatible:
65+
contains:
66+
const: rockchip,rk3328-crypto
67+
then:
68+
properties:
69+
clocks:
70+
maxItems: 3
71+
clock-names:
72+
items:
73+
- const: hclk_master
74+
- const: hclk_slave
75+
- const: sclk
76+
resets:
77+
maxItems: 1
78+
reset-names:
79+
items:
80+
- const: crypto-rst
81+
- if:
82+
properties:
83+
compatible:
84+
contains:
85+
const: rockchip,rk3399-crypto
86+
then:
87+
properties:
88+
clocks:
89+
maxItems: 3
90+
clock-names:
91+
items:
92+
- const: hclk_master
93+
- const: hclk_slave
94+
- const: sclk
95+
resets:
96+
minItems: 3
97+
reset-names:
98+
items:
99+
- const: master
100+
- const: slave
101+
- const: crypto-rst
102+
103+
required:
104+
- compatible
105+
- reg
106+
- interrupts
107+
- clocks
108+
- clock-names
109+
- resets
110+
- reset-names
111+
112+
additionalProperties: false
113+
114+
examples:
115+
- |
116+
#include <dt-bindings/interrupt-controller/arm-gic.h>
117+
#include <dt-bindings/clock/rk3288-cru.h>
118+
crypto@ff8a0000 {
119+
compatible = "rockchip,rk3288-crypto";
120+
reg = <0xff8a0000 0x4000>;
121+
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
122+
clocks = <&cru ACLK_CRYPTO>, <&cru HCLK_CRYPTO>,
123+
<&cru SCLK_CRYPTO>, <&cru ACLK_DMAC1>;
124+
clock-names = "aclk", "hclk", "sclk", "apb_pclk";
125+
resets = <&cru SRST_CRYPTO>;
126+
reset-names = "crypto-rst";
127+
};

Documentation/devicetree/bindings/crypto/rockchip-crypto.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,18 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
66

77
title: STMicroelectronics STM32 CRYP bindings
88

9+
description: The STM32 CRYP block is built on the CRYP block found in
10+
the STn8820 SoC introduced in 2007, and subsequently used in the U8500
11+
SoC in 2010.
12+
913
maintainers:
1014
- Lionel Debieve <[email protected]>
1115

1216
properties:
1317
compatible:
1418
enum:
19+
- st,stn8820-cryp
20+
- stericsson,ux500-cryp
1521
- st,stm32f756-cryp
1622
- st,stm32mp1-cryp
1723

@@ -27,6 +33,19 @@ properties:
2733
resets:
2834
maxItems: 1
2935

36+
dmas:
37+
items:
38+
- description: mem2cryp DMA channel
39+
- description: cryp2mem DMA channel
40+
41+
dma-names:
42+
items:
43+
- const: mem2cryp
44+
- const: cryp2mem
45+
46+
power-domains:
47+
maxItems: 1
48+
3049
required:
3150
- compatible
3251
- reg

Documentation/devicetree/bindings/rng/nuvoton,npcm-rng.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ maintainers:
1616

1717
properties:
1818
compatible:
19-
const: nuvoton,npcm750-rng
19+
enum:
20+
- nuvoton,npcm750-rng
21+
- nuvoton,npcm845-rng
2022

2123
reg:
2224
maxItems: 1

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17941,6 +17941,13 @@ F: Documentation/ABI/*/sysfs-driver-hid-roccat*
1794117941
F: drivers/hid/hid-roccat*
1794217942
F: include/linux/hid-roccat*
1794317943

17944+
ROCKCHIP CRYPTO DRIVERS
17945+
M: Corentin Labbe <[email protected]>
17946+
17947+
S: Maintained
17948+
F: Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml
17949+
F: drivers/crypto/rockchip/
17950+
1794417951
ROCKCHIP I2S TDM DRIVER
1794517952
M: Nicolas Frattaroli <[email protected]>
1794617953

arch/arm/crypto/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ config CRYPTO_GHASH_ARM_CE
1818
depends on KERNEL_MODE_NEON
1919
select CRYPTO_HASH
2020
select CRYPTO_CRYPTD
21-
select CRYPTO_GF128MUL
21+
select CRYPTO_LIB_GF128MUL
2222
help
2323
GCM GHASH function (NIST SP800-38D)
2424

arch/arm/crypto/aes-cipher-glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
#include <crypto/aes.h>
10-
#include <linux/crypto.h>
10+
#include <crypto/algapi.h>
1111
#include <linux/module.h>
1212

1313
asmlinkage void __aes_arm_encrypt(u32 *rk, int rounds, const u8 *in, u8 *out);

arch/arm/crypto/nh-neon-core.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
/*
7171
* void nh_neon(const u32 *key, const u8 *message, size_t message_len,
72-
* u8 hash[NH_HASH_BYTES])
72+
* __le64 hash[NH_NUM_PASSES])
7373
*
7474
* It's guaranteed that message_len % 16 == 0.
7575
*/

0 commit comments

Comments
 (0)