Skip to content

Commit 81e8c10

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: - Introduce crypto_shash_tfm_digest() and use it wherever possible. - Fix use-after-free and race in crypto_spawn_alg. - Add support for parallel and batch requests to crypto_engine. Algorithms: - Update jitter RNG for SP800-90B compliance. - Always use jitter RNG as seed in drbg. Drivers: - Add Arm CryptoCell driver cctrng. - Add support for SEV-ES to the PSP driver in ccp" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (114 commits) crypto: hisilicon - fix driver compatibility issue with different versions of devices crypto: engine - do not requeue in case of fatal error crypto: cavium/nitrox - Fix a typo in a comment crypto: hisilicon/qm - change debugfs file name from qm_regs to regs crypto: hisilicon/qm - add DebugFS for xQC and xQE dump crypto: hisilicon/zip - add debugfs for Hisilicon ZIP crypto: hisilicon/hpre - add debugfs for Hisilicon HPRE crypto: hisilicon/sec2 - add debugfs for Hisilicon SEC crypto: hisilicon/qm - add debugfs to the QM state machine crypto: hisilicon/qm - add debugfs for QM crypto: stm32/crc32 - protect from concurrent accesses crypto: stm32/crc32 - don't sleep in runtime pm crypto: stm32/crc32 - fix multi-instance crypto: stm32/crc32 - fix run-time self test issue. crypto: stm32/crc32 - fix ext4 chksum BUG_ON() crypto: hisilicon/zip - Use temporary sqe when doing work crypto: hisilicon - add device error report through abnormal irq crypto: hisilicon - remove codes of directly report device errors through MSI crypto: hisilicon - QM memory management optimization crypto: hisilicon - unify initial value assignment into QM ...
2 parents 729ea4e + 58ca006 commit 81e8c10

File tree

127 files changed

+5634
-2462
lines changed

Some content is hidden

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

127 files changed

+5634
-2462
lines changed

Documentation/ABI/testing/debugfs-hisi-hpre

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Contact: [email protected]
3333
Description: Dump debug registers from the HPRE.
3434
Only available for PF.
3535

36-
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/qm_regs
36+
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/regs
3737
Date: Sep 2019
3838
3939
Description: Dump debug registers from the QM.
@@ -44,14 +44,97 @@ What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/current_q
4444
Date: Sep 2019
4545
4646
Description: One QM may contain multiple queues. Select specific queue to
47-
show its debug registers in above qm_regs.
47+
show its debug registers in above regs.
4848
Only available for PF.
4949

5050
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/clear_enable
5151
Date: Sep 2019
5252
53-
Description: QM debug registers(qm_regs) read clear control. 1 means enable
53+
Description: QM debug registers(regs) read clear control. 1 means enable
5454
register read clear, otherwise 0.
5555
Writing to this file has no functional effect, only enable or
5656
disable counters clear after reading of these registers.
5757
Only available for PF.
58+
59+
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/err_irq
60+
Date: Apr 2020
61+
62+
Description: Dump the number of invalid interrupts for
63+
QM task completion.
64+
Available for both PF and VF, and take no other effect on HPRE.
65+
66+
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/aeq_irq
67+
Date: Apr 2020
68+
69+
Description: Dump the number of QM async event queue interrupts.
70+
Available for both PF and VF, and take no other effect on HPRE.
71+
72+
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/abnormal_irq
73+
Date: Apr 2020
74+
75+
Description: Dump the number of interrupts for QM abnormal event.
76+
Available for both PF and VF, and take no other effect on HPRE.
77+
78+
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/create_qp_err
79+
Date: Apr 2020
80+
81+
Description: Dump the number of queue allocation errors.
82+
Available for both PF and VF, and take no other effect on HPRE.
83+
84+
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/mb_err
85+
Date: Apr 2020
86+
87+
Description: Dump the number of failed QM mailbox commands.
88+
Available for both PF and VF, and take no other effect on HPRE.
89+
90+
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/status
91+
Date: Apr 2020
92+
93+
Description: Dump the status of the QM.
94+
Four states: initiated, started, stopped and closed.
95+
Available for both PF and VF, and take no other effect on HPRE.
96+
97+
What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/send_cnt
98+
Date: Apr 2020
99+
100+
Description: Dump the total number of sent requests.
101+
Available for both PF and VF, and take no other effect on HPRE.
102+
103+
What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/recv_cnt
104+
Date: Apr 2020
105+
106+
Description: Dump the total number of received requests.
107+
Available for both PF and VF, and take no other effect on HPRE.
108+
109+
What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/send_busy_cnt
110+
Date: Apr 2020
111+
112+
Description: Dump the total number of requests sent
113+
with returning busy.
114+
Available for both PF and VF, and take no other effect on HPRE.
115+
116+
What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/send_fail_cnt
117+
Date: Apr 2020
118+
119+
Description: Dump the total number of completed but error requests.
120+
Available for both PF and VF, and take no other effect on HPRE.
121+
122+
What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/invalid_req_cnt
123+
Date: Apr 2020
124+
125+
Description: Dump the total number of invalid requests being received.
126+
Available for both PF and VF, and take no other effect on HPRE.
127+
128+
What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/overtime_thrhld
129+
Date: Apr 2020
130+
131+
Description: Set the threshold time for counting the request which is
132+
processed longer than the threshold.
133+
0: disable(default), 1: 1 microsecond.
134+
Available for both PF and VF, and take no other effect on HPRE.
135+
136+
What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/over_thrhld_cnt
137+
Date: Apr 2020
138+
139+
Description: Dump the total number of time out requests.
140+
Available for both PF and VF, and take no other effect on HPRE.
Lines changed: 82 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,113 @@
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
1+
What: /sys/kernel/debug/hisi_sec2/<bdf>/clear_enable
82
Date: Oct 2019
93
104
Description: Enabling/disabling of clear action after reading
115
the SEC debug registers.
126
0: disable, 1: enable.
137
Only available for PF, and take no other effect on SEC.
148

15-
What: /sys/kernel/debug/hisi_sec/<bdf>/current_qm
9+
What: /sys/kernel/debug/hisi_sec2/<bdf>/current_qm
1610
Date: Oct 2019
1711
1812
Description: One SEC controller has one PF and multiple VFs, each function
1913
has a QM. This file can be used to select the QM which below
2014
qm refers to.
2115
Only available for PF.
2216

23-
What: /sys/kernel/debug/hisi_sec/<bdf>/qm/qm_regs
17+
What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/qm_regs
2418
Date: Oct 2019
2519
2620
Description: Dump of QM related debug registers.
2721
Available for PF and VF in host. VF in guest currently only
2822
has one debug register.
2923

30-
What: /sys/kernel/debug/hisi_sec/<bdf>/qm/current_q
24+
What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/current_q
3125
Date: Oct 2019
3226
3327
Description: One QM of SEC may contain multiple queues. Select specific
34-
queue to show its debug registers in above 'qm_regs'.
28+
queue to show its debug registers in above 'regs'.
3529
Only available for PF.
3630

37-
What: /sys/kernel/debug/hisi_sec/<bdf>/qm/clear_enable
31+
What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/clear_enable
3832
Date: Oct 2019
3933
4034
Description: Enabling/disabling of clear action after reading
4135
the SEC's QM debug registers.
4236
0: disable, 1: enable.
4337
Only available for PF, and take no other effect on SEC.
38+
39+
What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/err_irq
40+
Date: Apr 2020
41+
42+
Description: Dump the number of invalid interrupts for
43+
QM task completion.
44+
Available for both PF and VF, and take no other effect on SEC.
45+
46+
What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/aeq_irq
47+
Date: Apr 2020
48+
49+
Description: Dump the number of QM async event queue interrupts.
50+
Available for both PF and VF, and take no other effect on SEC.
51+
52+
What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/abnormal_irq
53+
Date: Apr 2020
54+
55+
Description: Dump the number of interrupts for QM abnormal event.
56+
Available for both PF and VF, and take no other effect on SEC.
57+
58+
What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/create_qp_err
59+
Date: Apr 2020
60+
61+
Description: Dump the number of queue allocation errors.
62+
Available for both PF and VF, and take no other effect on SEC.
63+
64+
What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/mb_err
65+
Date: Apr 2020
66+
67+
Description: Dump the number of failed QM mailbox commands.
68+
Available for both PF and VF, and take no other effect on SEC.
69+
70+
What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/status
71+
Date: Apr 2020
72+
73+
Description: Dump the status of the QM.
74+
Four states: initiated, started, stopped and closed.
75+
Available for both PF and VF, and take no other effect on SEC.
76+
77+
What: /sys/kernel/debug/hisi_sec2/<bdf>/sec_dfx/send_cnt
78+
Date: Apr 2020
79+
80+
Description: Dump the total number of sent requests.
81+
Available for both PF and VF, and take no other effect on SEC.
82+
83+
What: /sys/kernel/debug/hisi_sec2/<bdf>/sec_dfx/recv_cnt
84+
Date: Apr 2020
85+
86+
Description: Dump the total number of received requests.
87+
Available for both PF and VF, and take no other effect on SEC.
88+
89+
What: /sys/kernel/debug/hisi_sec2/<bdf>/sec_dfx/send_busy_cnt
90+
Date: Apr 2020
91+
92+
Description: Dump the total number of requests sent with returning busy.
93+
Available for both PF and VF, and take no other effect on SEC.
94+
95+
What: /sys/kernel/debug/hisi_sec2/<bdf>/sec_dfx/err_bd_cnt
96+
Date: Apr 2020
97+
98+
Description: Dump the total number of BD type error requests
99+
to be received.
100+
Available for both PF and VF, and take no other effect on SEC.
101+
102+
What: /sys/kernel/debug/hisi_sec2/<bdf>/sec_dfx/invalid_req_cnt
103+
Date: Apr 2020
104+
105+
Description: Dump the total number of invalid requests being received.
106+
Available for both PF and VF, and take no other effect on SEC.
107+
108+
What: /sys/kernel/debug/hisi_sec2/<bdf>/sec_dfx/done_flag_cnt
109+
Date: Apr 2020
110+
111+
Description: Dump the total number of completed but marked error requests
112+
to be received.
113+
Available for both PF and VF, and take no other effect on SEC.

Documentation/ABI/testing/debugfs-hisi-zip

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Description: One ZIP controller has one PF and multiple VFs, each function
2626
has a QM. Select the QM which below qm refers to.
2727
Only available for PF.
2828

29-
What: /sys/kernel/debug/hisi_zip/<bdf>/qm/qm_regs
29+
What: /sys/kernel/debug/hisi_zip/<bdf>/qm/regs
3030
Date: Nov 2018
3131
3232
Description: Dump of QM related debug registers.
@@ -37,14 +37,78 @@ What: /sys/kernel/debug/hisi_zip/<bdf>/qm/current_q
3737
Date: Nov 2018
3838
3939
Description: One QM may contain multiple queues. Select specific queue to
40-
show its debug registers in above qm_regs.
40+
show its debug registers in above regs.
4141
Only available for PF.
4242

4343
What: /sys/kernel/debug/hisi_zip/<bdf>/qm/clear_enable
4444
Date: Nov 2018
4545
46-
Description: QM debug registers(qm_regs) read clear control. 1 means enable
46+
Description: QM debug registers(regs) read clear control. 1 means enable
4747
register read clear, otherwise 0.
4848
Writing to this file has no functional effect, only enable or
4949
disable counters clear after reading of these registers.
5050
Only available for PF.
51+
52+
What: /sys/kernel/debug/hisi_zip/<bdf>/qm/err_irq
53+
Date: Apr 2020
54+
55+
Description: Dump the number of invalid interrupts for
56+
QM task completion.
57+
Available for both PF and VF, and take no other effect on ZIP.
58+
59+
What: /sys/kernel/debug/hisi_zip/<bdf>/qm/aeq_irq
60+
Date: Apr 2020
61+
62+
Description: Dump the number of QM async event queue interrupts.
63+
Available for both PF and VF, and take no other effect on ZIP.
64+
65+
What: /sys/kernel/debug/hisi_zip/<bdf>/qm/abnormal_irq
66+
Date: Apr 2020
67+
68+
Description: Dump the number of interrupts for QM abnormal event.
69+
Available for both PF and VF, and take no other effect on ZIP.
70+
71+
What: /sys/kernel/debug/hisi_zip/<bdf>/qm/create_qp_err
72+
Date: Apr 2020
73+
74+
Description: Dump the number of queue allocation errors.
75+
Available for both PF and VF, and take no other effect on ZIP.
76+
77+
What: /sys/kernel/debug/hisi_zip/<bdf>/qm/mb_err
78+
Date: Apr 2020
79+
80+
Description: Dump the number of failed QM mailbox commands.
81+
Available for both PF and VF, and take no other effect on ZIP.
82+
83+
What: /sys/kernel/debug/hisi_zip/<bdf>/qm/status
84+
Date: Apr 2020
85+
86+
Description: Dump the status of the QM.
87+
Four states: initiated, started, stopped and closed.
88+
Available for both PF and VF, and take no other effect on ZIP.
89+
90+
What: /sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/send_cnt
91+
Date: Apr 2020
92+
93+
Description: Dump the total number of sent requests.
94+
Available for both PF and VF, and take no other effect on ZIP.
95+
96+
What: /sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/recv_cnt
97+
Date: Apr 2020
98+
99+
Description: Dump the total number of received requests.
100+
Available for both PF and VF, and take no other effect on ZIP.
101+
102+
What: /sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/send_busy_cnt
103+
Date: Apr 2020
104+
105+
Description: Dump the total number of requests received
106+
with returning busy.
107+
Available for both PF and VF, and take no other effect on ZIP.
108+
109+
What: /sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/err_bd_cnt
110+
Date: Apr 2020
111+
112+
Description: Dump the total number of BD type error requests
113+
to be received.
114+
Available for both PF and VF, and take no other effect on ZIP.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rng/arm-cctrng.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Arm TrustZone CryptoCell TRNG engine
8+
9+
maintainers:
10+
- Hadar Gat <[email protected]>
11+
12+
description: |+
13+
Arm TrustZone CryptoCell TRNG (True Random Number Generator) engine.
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- arm,cryptocell-713-trng
19+
- arm,cryptocell-703-trng
20+
21+
interrupts:
22+
maxItems: 1
23+
24+
reg:
25+
maxItems: 1
26+
27+
arm,rosc-ratio:
28+
description:
29+
Arm TrustZone CryptoCell TRNG engine has 4 ring oscillators.
30+
Sampling ratio values for these 4 ring oscillators. (from calibration)
31+
allOf:
32+
- $ref: /schemas/types.yaml#/definitions/uint32-array
33+
- items:
34+
maxItems: 4
35+
36+
clocks:
37+
maxItems: 1
38+
39+
required:
40+
- compatible
41+
- interrupts
42+
- reg
43+
- arm,rosc-ratio
44+
45+
additionalProperties: false
46+
47+
examples:
48+
- |
49+
arm_cctrng: rng@60000000 {
50+
compatible = "arm,cryptocell-713-trng";
51+
interrupts = <0 29 4>;
52+
reg = <0x60000000 0x10000>;
53+
arm,rosc-ratio = <5000 1000 500 0>;
54+
};

Documentation/security/siphash.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SipHash - a short input PRF
77
SipHash is a cryptographically secure PRF -- a keyed hash function -- that
88
performs very well for short inputs, hence the name. It was designed by
99
cryptographers Daniel J. Bernstein and Jean-Philippe Aumasson. It is intended
10-
as a replacement for some uses of: `jhash`, `md5_transform`, `sha_transform`,
10+
as a replacement for some uses of: `jhash`, `md5_transform`, `sha1_transform`,
1111
and so forth.
1212

1313
SipHash takes a secret key filled with randomly generated numbers and either

0 commit comments

Comments
 (0)