Skip to content

Commit 36289a0

Browse files
committed
Merge tag 'v6.3-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu: "API: - Use kmap_local instead of kmap_atomic - Change request callback to take void pointer - Print FIPS status in /proc/crypto (when enabled) Algorithms: - Add rfc4106/gcm support on arm64 - Add ARIA AVX2/512 support on x86 Drivers: - Add TRNG driver for StarFive SoC - Delete ux500/hash driver (subsumed by stm32/hash) - Add zlib support in qat - Add RSA support in aspeed" * tag 'v6.3-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (156 commits) crypto: x86/aria-avx - Do not use avx2 instructions crypto: aspeed - Fix modular aspeed-acry crypto: hisilicon/qm - fix coding style issues crypto: hisilicon/qm - update comments to match function crypto: hisilicon/qm - change function names crypto: hisilicon/qm - use min() instead of min_t() crypto: hisilicon/qm - remove some unused defines crypto: proc - Print fips status crypto: crypto4xx - Call dma_unmap_page when done crypto: octeontx2 - Fix objects shared between several modules crypto: nx - Fix sparse warnings crypto: ecc - Silence sparse warning tls: Pass rec instead of aead_req into tls_encrypt_done crypto: api - Remove completion function scaffolding tls: Remove completion function scaffolding tipc: Remove completion function scaffolding net: ipv6: Remove completion function scaffolding net: ipv4: Remove completion function scaffolding net: macsec: Remove completion function scaffolding dm: Remove completion function scaffolding ...
2 parents 6930840 + 8b84475 commit 36289a0

File tree

186 files changed

+6379
-4053
lines changed

Some content is hidden

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

186 files changed

+6379
-4053
lines changed

Documentation/ABI/testing/sysfs-driver-qat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
What: /sys/bus/pci/devices/<BDF>/qat/state
22
Date: June 2022
3-
KernelVersion: 5.20
3+
KernelVersion: 6.0
44
55
Description: (RW) Reports the current state of the QAT device. Write to
66
the file to start or stop the device.
@@ -18,7 +18,7 @@ Description: (RW) Reports the current state of the QAT device. Write to
1818

1919
What: /sys/bus/pci/devices/<BDF>/qat/cfg_services
2020
Date: June 2022
21-
KernelVersion: 5.20
21+
KernelVersion: 6.0
2222
2323
Description: (RW) Reports the current configuration of the QAT device.
2424
Write to the file to change the configured services.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/bus/aspeed,ast2600-ahbc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ASPEED Advanced High-Performance Bus Controller (AHBC)
8+
9+
maintainers:
10+
- Neal Liu <[email protected]>
11+
- Chia-Wei Wang <[email protected]>
12+
13+
description: |
14+
Advanced High-performance Bus Controller (AHBC) supports plenty of mechanisms
15+
including a priority arbiter, an address decoder and a data multiplexer
16+
to control the overall operations of Advanced High-performance Bus (AHB).
17+
18+
properties:
19+
compatible:
20+
enum:
21+
- aspeed,ast2600-ahbc
22+
23+
reg:
24+
maxItems: 1
25+
26+
required:
27+
- compatible
28+
- reg
29+
30+
additionalProperties: false
31+
32+
examples:
33+
- |
34+
ahbc@1e600000 {
35+
compatible = "aspeed,ast2600-ahbc";
36+
reg = <0x1e600000 0x100>;
37+
};

Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ properties:
1414
enum:
1515
- allwinner,sun8i-h3-crypto
1616
- allwinner,sun8i-r40-crypto
17+
- allwinner,sun20i-d1-crypto
1718
- allwinner,sun50i-a64-crypto
1819
- allwinner,sun50i-h5-crypto
1920
- allwinner,sun50i-h6-crypto
@@ -29,13 +30,15 @@ properties:
2930
- description: Bus clock
3031
- description: Module clock
3132
- description: MBus clock
33+
- description: TRNG clock (RC oscillator)
3234
minItems: 2
3335

3436
clock-names:
3537
items:
3638
- const: bus
3739
- const: mod
3840
- const: ram
41+
- const: trng
3942
minItems: 2
4043

4144
resets:
@@ -44,19 +47,33 @@ properties:
4447
if:
4548
properties:
4649
compatible:
47-
const: allwinner,sun50i-h6-crypto
50+
enum:
51+
- allwinner,sun20i-d1-crypto
4852
then:
4953
properties:
5054
clocks:
51-
minItems: 3
55+
minItems: 4
5256
clock-names:
53-
minItems: 3
57+
minItems: 4
5458
else:
55-
properties:
56-
clocks:
57-
maxItems: 2
58-
clock-names:
59-
maxItems: 2
59+
if:
60+
properties:
61+
compatible:
62+
const: allwinner,sun50i-h6-crypto
63+
then:
64+
properties:
65+
clocks:
66+
minItems: 3
67+
maxItems: 3
68+
clock-names:
69+
minItems: 3
70+
maxItems: 3
71+
else:
72+
properties:
73+
clocks:
74+
maxItems: 2
75+
clock-names:
76+
maxItems: 2
6077

6178
required:
6279
- compatible
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/crypto/aspeed,ast2600-acry.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ASPEED ACRY ECDSA/RSA Hardware Accelerator Engines
8+
9+
maintainers:
10+
- Neal Liu <[email protected]>
11+
12+
description:
13+
The ACRY ECDSA/RSA engines is designed to accelerate the throughput
14+
of ECDSA/RSA signature and verification. Basically, ACRY can be
15+
divided into two independent engines - ECC Engine and RSA Engine.
16+
17+
properties:
18+
compatible:
19+
enum:
20+
- aspeed,ast2600-acry
21+
22+
reg:
23+
items:
24+
- description: acry base address & size
25+
- description: acry sram base address & size
26+
27+
clocks:
28+
maxItems: 1
29+
30+
interrupts:
31+
maxItems: 1
32+
33+
required:
34+
- compatible
35+
- reg
36+
- clocks
37+
- interrupts
38+
39+
additionalProperties: false
40+
41+
examples:
42+
- |
43+
#include <dt-bindings/clock/ast2600-clock.h>
44+
acry: crypto@1e6fa000 {
45+
compatible = "aspeed,ast2600-acry";
46+
reg = <0x1e6fa000 0x400>, <0x1e710000 0x1800>;
47+
interrupts = <160>;
48+
clocks = <&syscon ASPEED_CLK_GATE_RSACLK>;
49+
};

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

Lines changed: 22 additions & 1 deletion
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 HASH
88

9+
description: The STM32 HASH block is built on the HASH 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-hash
20+
- stericsson,ux500-hash
1521
- st,stm32f456-hash
1622
- st,stm32f756-hash
1723

@@ -41,11 +47,26 @@ properties:
4147
maximum: 2
4248
default: 0
4349

50+
power-domains:
51+
maxItems: 1
52+
4453
required:
4554
- compatible
4655
- reg
4756
- clocks
48-
- interrupts
57+
58+
allOf:
59+
- if:
60+
properties:
61+
compatible:
62+
items:
63+
const: stericsson,ux500-hash
64+
then:
65+
properties:
66+
interrupts: false
67+
else:
68+
required:
69+
- interrupts
4970

5071
additionalProperties: false
5172

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rng/starfive,jh7110-trng.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: StarFive SoC TRNG Module
8+
9+
maintainers:
10+
- Jia Jie Ho <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: starfive,jh7110-trng
15+
16+
reg:
17+
maxItems: 1
18+
19+
clocks:
20+
items:
21+
- description: Hardware reference clock
22+
- description: AHB reference clock
23+
24+
clock-names:
25+
items:
26+
- const: hclk
27+
- const: ahb
28+
29+
resets:
30+
maxItems: 1
31+
32+
interrupts:
33+
maxItems: 1
34+
35+
required:
36+
- compatible
37+
- reg
38+
- clocks
39+
- clock-names
40+
- resets
41+
- interrupts
42+
43+
additionalProperties: false
44+
45+
examples:
46+
- |
47+
rng: rng@1600C000 {
48+
compatible = "starfive,jh7110-trng";
49+
reg = <0x1600C000 0x4000>;
50+
clocks = <&clk 15>, <&clk 16>;
51+
clock-names = "hclk", "ahb";
52+
resets = <&reset 3>;
53+
interrupts = <30>;
54+
};
55+
...

MAINTAINERS

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3149,7 +3149,7 @@ ASPEED CRYPTO DRIVER
31493149
M: Neal Liu <[email protected]>
31503150
L: [email protected] (moderated for non-subscribers)
31513151
S: Maintained
3152-
F: Documentation/devicetree/bindings/crypto/aspeed,ast2500-hace.yaml
3152+
F: Documentation/devicetree/bindings/crypto/aspeed,*
31533153
F: drivers/crypto/aspeed/
31543154

31553155
ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS
@@ -19769,6 +19769,12 @@ F: Documentation/devicetree/bindings/reset/starfive,jh7100-reset.yaml
1976919769
F: drivers/reset/reset-starfive-jh7100.c
1977019770
F: include/dt-bindings/reset/starfive-jh7100.h
1977119771

19772+
STARFIVE TRNG DRIVER
19773+
M: Jia Jie Ho <[email protected]>
19774+
S: Supported
19775+
F: Documentation/devicetree/bindings/rng/starfive*
19776+
F: drivers/char/hw_random/jh7110-trng.c
19777+
1977219778
STATIC BRANCH/CALL
1977319779
M: Peter Zijlstra <[email protected]>
1977419780
M: Josh Poimboeuf <[email protected]>

arch/arm/boot/dts/aspeed-g6.dtsi

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@
9898
<0x40466000 0x2000>;
9999
};
100100

101+
ahbc: bus@1e600000 {
102+
compatible = "aspeed,ast2600-ahbc", "syscon";
103+
reg = <0x1e600000 0x100>;
104+
};
105+
101106
fmc: spi@1e620000 {
102107
reg = <0x1e620000 0xc4>, <0x20000000 0x10000000>;
103108
#address-cells = <1>;
@@ -431,6 +436,14 @@
431436
reg = <0x1e6f2000 0x1000>;
432437
};
433438

439+
acry: crypto@1e6fa000 {
440+
compatible = "aspeed,ast2600-acry";
441+
reg = <0x1e6fa000 0x400>, <0x1e710000 0x1800>;
442+
interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
443+
clocks = <&syscon ASPEED_CLK_GATE_RSACLK>;
444+
aspeed,ahbc = <&ahbc>;
445+
};
446+
434447
video: video@1e700000 {
435448
compatible = "aspeed,ast2600-video-engine";
436449
reg = <0x1e700000 0x1000>;

arch/arm/crypto/sha1_glue.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,29 @@
2121

2222
#include "sha1.h"
2323

24-
asmlinkage void sha1_block_data_order(u32 *digest,
25-
const unsigned char *data, unsigned int rounds);
24+
asmlinkage void sha1_block_data_order(struct sha1_state *digest,
25+
const u8 *data, int rounds);
2626

2727
int sha1_update_arm(struct shash_desc *desc, const u8 *data,
2828
unsigned int len)
2929
{
30-
/* make sure casting to sha1_block_fn() is safe */
30+
/* make sure signature matches sha1_block_fn() */
3131
BUILD_BUG_ON(offsetof(struct sha1_state, state) != 0);
3232

33-
return sha1_base_do_update(desc, data, len,
34-
(sha1_block_fn *)sha1_block_data_order);
33+
return sha1_base_do_update(desc, data, len, sha1_block_data_order);
3534
}
3635
EXPORT_SYMBOL_GPL(sha1_update_arm);
3736

3837
static int sha1_final(struct shash_desc *desc, u8 *out)
3938
{
40-
sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_block_data_order);
39+
sha1_base_do_finalize(desc, sha1_block_data_order);
4140
return sha1_base_finish(desc, out);
4241
}
4342

4443
int sha1_finup_arm(struct shash_desc *desc, const u8 *data,
4544
unsigned int len, u8 *out)
4645
{
47-
sha1_base_do_update(desc, data, len,
48-
(sha1_block_fn *)sha1_block_data_order);
46+
sha1_base_do_update(desc, data, len, sha1_block_data_order);
4947
return sha1_final(desc, out);
5048
}
5149
EXPORT_SYMBOL_GPL(sha1_finup_arm);

0 commit comments

Comments
 (0)