Skip to content

Commit 642356c

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "API: - Add library interfaces of certain crypto algorithms for WireGuard - Remove the obsolete ablkcipher and blkcipher interfaces - Move add_early_randomness() out of rng_mutex Algorithms: - Add blake2b shash algorithm - Add blake2s shash algorithm - Add curve25519 kpp algorithm - Implement 4 way interleave in arm64/gcm-ce - Implement ciphertext stealing in powerpc/spe-xts - Add Eric Biggers's scalar accelerated ChaCha code for ARM - Add accelerated 32r2 code from Zinc for MIPS - Add OpenSSL/CRYPTOGRAMS poly1305 implementation for ARM and MIPS Drivers: - Fix entropy reading failures in ks-sa - Add support for sam9x60 in atmel - Add crypto accelerator for amlogic GXL - Add sun8i-ce Crypto Engine - Add sun8i-ss cryptographic offloader - Add a host of algorithms to inside-secure - Add NPCM RNG driver - add HiSilicon HPRE accelerator - Add HiSilicon TRNG driver" * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (285 commits) crypto: vmx - Avoid weird build failures crypto: lib/chacha20poly1305 - use chacha20_crypt() crypto: x86/chacha - only unregister algorithms if registered crypto: chacha_generic - remove unnecessary setkey() functions crypto: amlogic - enable working on big endian kernel crypto: sun8i-ce - enable working on big endian crypto: mips/chacha - select CRYPTO_SKCIPHER, not CRYPTO_BLKCIPHER hwrng: ks-sa - Enable COMPILE_TEST crypto: essiv - remove redundant null pointer check before kfree crypto: atmel-aes - Change data type for "lastc" buffer crypto: atmel-tdes - Set the IV after {en,de}crypt crypto: sun4i-ss - fix big endian issues crypto: sun4i-ss - hide the Invalid keylen message crypto: sun4i-ss - use crypto_ahash_digestsize crypto: sun4i-ss - remove dependency on not 64BIT crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c MAINTAINERS: Add maintainer for HiSilicon SEC V2 driver crypto: hisilicon - add DebugFS for HiSilicon SEC Documentation: add DebugFS doc for HiSilicon SEC crypto: hisilicon - add SRIOV for HiSilicon SEC ...
2 parents f838767 + 4ee812f commit 642356c

File tree

291 files changed

+47109
-11394
lines changed

Some content is hidden

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

291 files changed

+47109
-11394
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
What: /sys/kernel/debug/hisi_hpre/<bdf>/cluster[0-3]/regs
2+
Date: Sep 2019
3+
4+
Description: Dump debug registers from the HPRE cluster.
5+
Only available for PF.
6+
7+
What: /sys/kernel/debug/hisi_hpre/<bdf>/cluster[0-3]/cluster_ctrl
8+
Date: Sep 2019
9+
10+
Description: Write the HPRE core selection in the cluster into this file,
11+
and then we can read the debug information of the core.
12+
Only available for PF.
13+
14+
What: /sys/kernel/debug/hisi_hpre/<bdf>/rdclr_en
15+
Date: Sep 2019
16+
17+
Description: HPRE cores debug registers read clear control. 1 means enable
18+
register read clear, otherwise 0. Writing to this file has no
19+
functional effect, only enable or disable counters clear after
20+
reading of these registers.
21+
Only available for PF.
22+
23+
What: /sys/kernel/debug/hisi_hpre/<bdf>/current_qm
24+
Date: Sep 2019
25+
26+
Description: One HPRE controller has one PF and multiple VFs, each function
27+
has a QM. Select the QM which below qm refers to.
28+
Only available for PF.
29+
30+
What: /sys/kernel/debug/hisi_hpre/<bdf>/regs
31+
Date: Sep 2019
32+
33+
Description: Dump debug registers from the HPRE.
34+
Only available for PF.
35+
36+
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/qm_regs
37+
Date: Sep 2019
38+
39+
Description: Dump debug registers from the QM.
40+
Available for PF and VF in host. VF in guest currently only
41+
has one debug register.
42+
43+
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/current_q
44+
Date: Sep 2019
45+
46+
Description: One QM may contain multiple queues. Select specific queue to
47+
show its debug registers in above qm_regs.
48+
Only available for PF.
49+
50+
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/clear_enable
51+
Date: Sep 2019
52+
53+
Description: QM debug registers(qm_regs) read clear control. 1 means enable
54+
register read clear, otherwise 0.
55+
Writing to this file has no functional effect, only enable or
56+
disable counters clear after reading of these registers.
57+
Only available for PF.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
What: /sys/kernel/debug/hisi_sec/<bdf>/sec_dfx
2+
Date: Oct 2019
3+
4+
Description: Dump the debug registers of SEC cores.
5+
Only available for PF.
6+
7+
What: /sys/kernel/debug/hisi_sec/<bdf>/clear_enable
8+
Date: Oct 2019
9+
10+
Description: Enabling/disabling of clear action after reading
11+
the SEC debug registers.
12+
0: disable, 1: enable.
13+
Only available for PF, and take no other effect on SEC.
14+
15+
What: /sys/kernel/debug/hisi_sec/<bdf>/current_qm
16+
Date: Oct 2019
17+
18+
Description: One SEC controller has one PF and multiple VFs, each function
19+
has a QM. This file can be used to select the QM which below
20+
qm refers to.
21+
Only available for PF.
22+
23+
What: /sys/kernel/debug/hisi_sec/<bdf>/qm/qm_regs
24+
Date: Oct 2019
25+
26+
Description: Dump of QM related debug registers.
27+
Available for PF and VF in host. VF in guest currently only
28+
has one debug register.
29+
30+
What: /sys/kernel/debug/hisi_sec/<bdf>/qm/current_q
31+
Date: Oct 2019
32+
33+
Description: One QM of SEC may contain multiple queues. Select specific
34+
queue to show its debug registers in above 'qm_regs'.
35+
Only available for PF.
36+
37+
What: /sys/kernel/debug/hisi_sec/<bdf>/qm/clear_enable
38+
Date: Oct 2019
39+
40+
Description: Enabling/disabling of clear action after reading
41+
the SEC's QM debug registers.
42+
0: disable, 1: enable.
43+
Only available for PF, and take no other effect on SEC.

Documentation/crypto/api-skcipher.rst

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Block Cipher Algorithm Definitions
55
:doc: Block Cipher Algorithm Definitions
66

77
.. kernel-doc:: include/linux/crypto.h
8-
:functions: crypto_alg ablkcipher_alg blkcipher_alg cipher_alg compress_alg
8+
:functions: crypto_alg cipher_alg compress_alg
99

1010
Symmetric Key Cipher API
1111
------------------------
@@ -33,30 +33,3 @@ Single Block Cipher API
3333

3434
.. kernel-doc:: include/linux/crypto.h
3535
:functions: crypto_alloc_cipher crypto_free_cipher crypto_has_cipher crypto_cipher_blocksize crypto_cipher_setkey crypto_cipher_encrypt_one crypto_cipher_decrypt_one
36-
37-
Asynchronous Block Cipher API - Deprecated
38-
------------------------------------------
39-
40-
.. kernel-doc:: include/linux/crypto.h
41-
:doc: Asynchronous Block Cipher API
42-
43-
.. kernel-doc:: include/linux/crypto.h
44-
:functions: crypto_free_ablkcipher crypto_has_ablkcipher crypto_ablkcipher_ivsize crypto_ablkcipher_blocksize crypto_ablkcipher_setkey crypto_ablkcipher_reqtfm crypto_ablkcipher_encrypt crypto_ablkcipher_decrypt
45-
46-
Asynchronous Cipher Request Handle - Deprecated
47-
-----------------------------------------------
48-
49-
.. kernel-doc:: include/linux/crypto.h
50-
:doc: Asynchronous Cipher Request Handle
51-
52-
.. kernel-doc:: include/linux/crypto.h
53-
:functions: crypto_ablkcipher_reqsize ablkcipher_request_set_tfm ablkcipher_request_alloc ablkcipher_request_free ablkcipher_request_set_callback ablkcipher_request_set_crypt
54-
55-
Synchronous Block Cipher API - Deprecated
56-
-----------------------------------------
57-
58-
.. kernel-doc:: include/linux/crypto.h
59-
:doc: Synchronous Block Cipher API
60-
61-
.. kernel-doc:: include/linux/crypto.h
62-
:functions: crypto_alloc_blkcipher crypto_free_blkcipher crypto_has_blkcipher crypto_blkcipher_name crypto_blkcipher_ivsize crypto_blkcipher_blocksize crypto_blkcipher_setkey crypto_blkcipher_encrypt crypto_blkcipher_encrypt_iv crypto_blkcipher_decrypt crypto_blkcipher_decrypt_iv crypto_blkcipher_set_iv crypto_blkcipher_get_iv

Documentation/crypto/architecture.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,6 @@ the aforementioned cipher types:
201201
- CRYPTO_ALG_TYPE_AEAD Authenticated Encryption with Associated Data
202202
(MAC)
203203

204-
- CRYPTO_ALG_TYPE_BLKCIPHER Synchronous multi-block cipher
205-
206-
- CRYPTO_ALG_TYPE_ABLKCIPHER Asynchronous multi-block cipher
207-
208204
- CRYPTO_ALG_TYPE_KPP Key-agreement Protocol Primitive (KPP) such as
209205
an ECDH or DH implementation
210206

Documentation/crypto/crypto_engine.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ request by using:
6363
When your driver receives a crypto_request, you must to transfer it to
6464
the crypto engine via one of:
6565

66-
* crypto_transfer_ablkcipher_request_to_engine()
67-
6866
* crypto_transfer_aead_request_to_engine()
6967

7068
* crypto_transfer_akcipher_request_to_engine()
@@ -75,8 +73,6 @@ the crypto engine via one of:
7573

7674
At the end of the request process, a call to one of the following functions is needed:
7775

78-
* crypto_finalize_ablkcipher_request()
79-
8076
* crypto_finalize_aead_request()
8177

8278
* crypto_finalize_akcipher_request()

Documentation/crypto/devel-algos.rst

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -128,25 +128,20 @@ process requests that are unaligned. This implies, however, additional
128128
overhead as the kernel crypto API needs to perform the realignment of
129129
the data which may imply moving of data.
130130

131-
Cipher Definition With struct blkcipher_alg and ablkcipher_alg
132-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131+
Cipher Definition With struct skcipher_alg
132+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133133

134-
Struct blkcipher_alg defines a synchronous block cipher whereas struct
135-
ablkcipher_alg defines an asynchronous block cipher.
134+
Struct skcipher_alg defines a multi-block cipher, or more generally, a
135+
length-preserving symmetric cipher algorithm.
136136

137-
Please refer to the single block cipher description for schematics of
138-
the block cipher usage.
137+
Scatterlist handling
138+
~~~~~~~~~~~~~~~~~~~~
139139

140-
Specifics Of Asynchronous Multi-Block Cipher
141-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
142-
143-
There are a couple of specifics to the asynchronous interface.
144-
145-
First of all, some of the drivers will want to use the Generic
146-
ScatterWalk in case the hardware needs to be fed separate chunks of the
147-
scatterlist which contains the plaintext and will contain the
148-
ciphertext. Please refer to the ScatterWalk interface offered by the
149-
Linux kernel scatter / gather list implementation.
140+
Some drivers will want to use the Generic ScatterWalk in case the
141+
hardware needs to be fed separate chunks of the scatterlist which
142+
contains the plaintext and will contain the ciphertext. Please refer
143+
to the ScatterWalk interface offered by the Linux kernel scatter /
144+
gather list implementation.
150145

151146
Hashing [HASH]
152147
--------------
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/crypto/allwinner,sun8i-ss.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Allwinner Security System v2 driver
8+
9+
maintainers:
10+
- Corentin Labbe <[email protected]>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- allwinner,sun8i-a83t-crypto
16+
- allwinner,sun9i-a80-crypto
17+
18+
reg:
19+
maxItems: 1
20+
21+
interrupts:
22+
maxItems: 1
23+
24+
clocks:
25+
items:
26+
- description: Bus clock
27+
- description: Module clock
28+
29+
clock-names:
30+
items:
31+
- const: bus
32+
- const: mod
33+
34+
resets:
35+
maxItems: 1
36+
37+
required:
38+
- compatible
39+
- reg
40+
- interrupts
41+
- clocks
42+
- clock-names
43+
- resets
44+
45+
additionalProperties: false
46+
47+
examples:
48+
- |
49+
#include <dt-bindings/interrupt-controller/arm-gic.h>
50+
#include <dt-bindings/clock/sun8i-a83t-ccu.h>
51+
#include <dt-bindings/reset/sun8i-a83t-ccu.h>
52+
53+
crypto: crypto@1c15000 {
54+
compatible = "allwinner,sun8i-a83t-crypto";
55+
reg = <0x01c15000 0x1000>;
56+
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
57+
resets = <&ccu RST_BUS_SS>;
58+
clocks = <&ccu CLK_BUS_SS>, <&ccu CLK_SS>;
59+
clock-names = "bus", "mod";
60+
};
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/crypto/amlogic,gxl-crypto.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Amlogic GXL Cryptographic Offloader
8+
9+
maintainers:
10+
- Corentin Labbe <[email protected]>
11+
12+
properties:
13+
compatible:
14+
items:
15+
- const: amlogic,gxl-crypto
16+
17+
reg:
18+
maxItems: 1
19+
20+
interrupts:
21+
items:
22+
- description: "Interrupt for flow 0"
23+
- description: "Interrupt for flow 1"
24+
25+
clocks:
26+
maxItems: 1
27+
28+
clock-names:
29+
const: blkmv
30+
31+
required:
32+
- compatible
33+
- reg
34+
- interrupts
35+
- clocks
36+
- clock-names
37+
38+
additionalProperties: false
39+
40+
examples:
41+
- |
42+
#include <dt-bindings/interrupt-controller/irq.h>
43+
#include <dt-bindings/interrupt-controller/arm-gic.h>
44+
#include <dt-bindings/clock/gxbb-clkc.h>
45+
46+
crypto: crypto-engine@c883e000 {
47+
compatible = "amlogic,gxl-crypto";
48+
reg = <0x0 0xc883e000 0x0 0x36>;
49+
interrupts = <GIC_SPI 188 IRQ_TYPE_EDGE_RISING>, <GIC_SPI 189 IRQ_TYPE_EDGE_RISING>;
50+
clocks = <&clkc CLKID_BLKMV>;
51+
clock-names = "blkmv";
52+
};

Documentation/devicetree/bindings/rng/atmel-trng.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Atmel TRNG (True Random Number Generator) block
22

33
Required properties:
4-
- compatible : Should be "atmel,at91sam9g45-trng"
4+
- compatible : Should be "atmel,at91sam9g45-trng" or "microchip,sam9x60-trng"
55
- reg : Offset and length of the register set of this block
66
- interrupts : the interrupt number for the TRNG block
77
- clocks: should contain the TRNG clk source
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
NPCM SoC Random Number Generator
2+
3+
Required properties:
4+
- compatible : "nuvoton,npcm750-rng" for the NPCM7XX BMC.
5+
- reg : Specifies physical base address and size of the registers.
6+
7+
Example:
8+
9+
rng: rng@f000b000 {
10+
compatible = "nuvoton,npcm750-rng";
11+
reg = <0xf000b000 0x8>;
12+
};

0 commit comments

Comments
 (0)