Skip to content

Commit 85ffc6e

Browse files
committed
Merge tag 'v6.12-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu" "API: - Make self-test asynchronous Algorithms: - Remove MPI functions added for SM3 - Add allocation error checks to remaining MPI functions (introduced for SM3) - Set default Jitter RNG OSR to 3 Drivers: - Add hwrng driver for Rockchip RK3568 SoC - Allow disabling SR-IOV VFs through sysfs in qat - Fix device reset bugs in hisilicon - Fix authenc key parsing by using generic helper in octeontx* Others: - Fix xor benchmarking on parisc" * tag 'v6.12-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (96 commits) crypto: n2 - Set err to EINVAL if snprintf fails for hmac crypto: camm/qi - Use ERR_CAST() to return error-valued pointer crypto: mips/crc32 - Clean up useless assignment operations crypto: qcom-rng - rename *_of_data to *_match_data crypto: qcom-rng - fix support for ACPI-based systems dt-bindings: crypto: qcom,prng: document support for SA8255p crypto: aegis128 - Fix indentation issue in crypto_aegis128_process_crypt() crypto: octeontx* - Select CRYPTO_AUTHENC crypto: testmgr - Hide ENOENT errors crypto: qat - Remove trailing space after \n newline crypto: hisilicon/sec - Remove trailing space after \n newline crypto: algboss - Pass instance creation error up crypto: api - Fix generic algorithm self-test races crypto: hisilicon/qm - inject error before stopping queue crypto: hisilicon/hpre - mask cluster timeout error crypto: hisilicon/qm - reset device before enabling it crypto: hisilicon/trng - modifying the order of header files crypto: hisilicon - add a lock for the qp send operation crypto: hisilicon - fix missed error branch crypto: ccp - do not request interrupt on cmd completion when irqs disabled ...
2 parents 9410645 + ce212d2 commit 85ffc6e

File tree

105 files changed

+1422
-3899
lines changed

Some content is hidden

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

105 files changed

+1422
-3899
lines changed

Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ patternProperties:
137137
- const: fsl,sec-v4.0-rtic
138138

139139
reg:
140-
maxItems: 1
140+
items:
141+
- description: RTIC control and status register space.
142+
- description: RTIC recoverable error indication register space.
143+
minItems: 1
141144

142145
ranges:
143146
maxItems: 1

Documentation/devicetree/bindings/crypto/qcom,prng.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ properties:
1717
- qcom,prng-ee # 8996 and later using EE
1818
- items:
1919
- enum:
20+
- qcom,sa8255p-trng
2021
- qcom,sa8775p-trng
2122
- qcom,sc7280-trng
2223
- qcom,sm8450-trng
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rng/rockchip,rk3568-rng.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Rockchip RK3568 TRNG
8+
9+
description: True Random Number Generator on Rockchip RK3568 SoC
10+
11+
maintainers:
12+
- Aurelien Jarno <[email protected]>
13+
- Daniel Golle <[email protected]>
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- rockchip,rk3568-rng
19+
20+
reg:
21+
maxItems: 1
22+
23+
clocks:
24+
items:
25+
- description: TRNG clock
26+
- description: TRNG AHB clock
27+
28+
clock-names:
29+
items:
30+
- const: core
31+
- const: ahb
32+
33+
resets:
34+
maxItems: 1
35+
36+
required:
37+
- compatible
38+
- reg
39+
- clocks
40+
- clock-names
41+
- resets
42+
43+
additionalProperties: false
44+
45+
examples:
46+
- |
47+
#include <dt-bindings/clock/rk3568-cru.h>
48+
bus {
49+
#address-cells = <2>;
50+
#size-cells = <2>;
51+
52+
rng@fe388000 {
53+
compatible = "rockchip,rk3568-rng";
54+
reg = <0x0 0xfe388000 0x0 0x4000>;
55+
clocks = <&cru CLK_TRNG_NS>, <&cru HCLK_TRNG_NS>;
56+
clock-names = "core", "ahb";
57+
resets = <&cru SRST_TRNG_NS>;
58+
};
59+
};
60+
61+
...

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19807,6 +19807,13 @@ F: Documentation/userspace-api/media/v4l/metafmt-rkisp1.rst
1980719807
F: drivers/media/platform/rockchip/rkisp1
1980819808
F: include/uapi/linux/rkisp1-config.h
1980919809

19810+
ROCKCHIP RK3568 RANDOM NUMBER GENERATOR SUPPORT
19811+
M: Daniel Golle <[email protected]>
19812+
M: Aurelien Jarno <[email protected]>
19813+
S: Maintained
19814+
F: Documentation/devicetree/bindings/rng/rockchip,rk3568-rng.yaml
19815+
F: drivers/char/hw_random/rockchip-rng.c
19816+
1981019817
ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
1981119818
M: Jacob Chen <[email protected]>
1981219819
M: Ezequiel Garcia <[email protected]>

arch/arm/crypto/Kconfig

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,9 @@ config CRYPTO_AES_ARM
166166
config CRYPTO_AES_ARM_BS
167167
tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (bit-sliced NEON)"
168168
depends on KERNEL_MODE_NEON
169+
select CRYPTO_AES_ARM
169170
select CRYPTO_SKCIPHER
170171
select CRYPTO_LIB_AES
171-
select CRYPTO_AES
172-
select CRYPTO_CBC
173172
select CRYPTO_SIMD
174173
help
175174
Length-preserving ciphers: AES cipher algorithms (FIPS-197)
@@ -183,8 +182,15 @@ config CRYPTO_AES_ARM_BS
183182
Bit sliced AES gives around 45% speedup on Cortex-A15 for CTR mode
184183
and for XTS mode encryption, CBC and XTS mode decryption speedup is
185184
around 25%. (CBC encryption speed is not affected by this driver.)
186-
This implementation does not rely on any lookup tables so it is
187-
believed to be invulnerable to cache timing attacks.
185+
186+
The bit sliced AES code does not use lookup tables, so it is believed
187+
to be invulnerable to cache timing attacks. However, since the bit
188+
sliced AES code cannot process single blocks efficiently, in certain
189+
cases table-based code with some countermeasures against cache timing
190+
attacks will still be used as a fallback method; specifically CBC
191+
encryption (not CBC decryption), the encryption of XTS tweaks, XTS
192+
ciphertext stealing when the message isn't a multiple of 16 bytes, and
193+
CTR when invoked in a context in which NEON instructions are unusable.
188194

189195
config CRYPTO_AES_ARM_CE
190196
tristate "Ciphers: AES, modes: ECB/CBC/CTS/CTR/XTS (ARMv8 Crypto Extensions)"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ static int __init aes_init(void)
711711
algname = aes_algs[i].base.cra_name + 2;
712712
drvname = aes_algs[i].base.cra_driver_name + 2;
713713
basename = aes_algs[i].base.cra_driver_name;
714-
simd = simd_skcipher_create_compat(algname, drvname, basename);
714+
simd = simd_skcipher_create_compat(aes_algs + i, algname, drvname, basename);
715715
err = PTR_ERR(simd);
716716
if (IS_ERR(simd))
717717
goto unregister_simds;

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
#include <crypto/aes.h>
1010
#include <crypto/algapi.h>
1111
#include <linux/module.h>
12+
#include "aes-cipher.h"
1213

13-
asmlinkage void __aes_arm_encrypt(u32 *rk, int rounds, const u8 *in, u8 *out);
14-
asmlinkage void __aes_arm_decrypt(u32 *rk, int rounds, const u8 *in, u8 *out);
14+
EXPORT_SYMBOL_GPL(__aes_arm_encrypt);
15+
EXPORT_SYMBOL_GPL(__aes_arm_decrypt);
1516

1617
static void aes_arm_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
1718
{

arch/arm/crypto/aes-cipher.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
#ifndef ARM_CRYPTO_AES_CIPHER_H
3+
#define ARM_CRYPTO_AES_CIPHER_H
4+
5+
#include <linux/linkage.h>
6+
#include <linux/types.h>
7+
8+
asmlinkage void __aes_arm_encrypt(const u32 rk[], int rounds,
9+
const u8 *in, u8 *out);
10+
asmlinkage void __aes_arm_decrypt(const u32 rk[], int rounds,
11+
const u8 *in, u8 *out);
12+
13+
#endif /* ARM_CRYPTO_AES_CIPHER_H */

0 commit comments

Comments
 (0)