Skip to content

Commit 31caf8b

Browse files
committed
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto update from Herbert Xu: "API: - Restrict crypto_cipher to internal API users only. Algorithms: - Add x86 aesni acceleration for cts. - Improve x86 aesni acceleration for xts. - Remove x86 acceleration of some uncommon algorithms. - Remove RIPE-MD, Tiger and Salsa20. - Remove tnepres. - Add ARM acceleration for BLAKE2s and BLAKE2b. Drivers: - Add Keem Bay OCS HCU driver. - Add Marvell OcteonTX2 CPT PF driver. - Remove PicoXcell driver. - Remove mediatek driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (154 commits) hwrng: timeriomem - Use device-managed registration API crypto: hisilicon/qm - fix printing format issue crypto: hisilicon/qm - do not reset hardware when CE happens crypto: hisilicon/qm - update irqflag crypto: hisilicon/qm - fix the value of 'QM_SQC_VFT_BASE_MASK_V2' crypto: hisilicon/qm - fix request missing error crypto: hisilicon/qm - removing driver after reset crypto: octeontx2 - fix -Wpointer-bool-conversion warning crypto: hisilicon/hpre - enable Elliptic curve cryptography crypto: hisilicon - PASID fixed on Kunpeng 930 crypto: hisilicon/qm - fix use of 'dma_map_single' crypto: hisilicon/hpre - tiny fix crypto: hisilicon/hpre - adapt the number of clusters crypto: cpt - remove casting dma_alloc_coherent crypto: keembay-ocs-aes - Fix 'q' assignment during CCM B0 generation crypto: xor - Fix typo of optimization hwrng: optee - Use device-managed registration API crypto: arm64/crc-t10dif - move NEON yield to C code crypto: arm64/aes-ce-mac - simplify NEON yield crypto: arm64/aes-neonbs - remove NEON yield calls ...
2 parents a2b095e + 0de9dc8 commit 31caf8b

File tree

207 files changed

+13961
-15312
lines changed

Some content is hidden

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

207 files changed

+13961
-15312
lines changed

.mailmap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ Juha Yrjola <at solidboot.com>
174174
Juha Yrjola <[email protected]>
175175
Juha Yrjola <[email protected]>
176176
177-
178177
Kay Sievers <[email protected]>
179178
180179

Documentation/admin-guide/device-mapper/dm-integrity.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ recalculate
143143
journal_crypt:algorithm(:key) (the key is optional)
144144
Encrypt the journal using given algorithm to make sure that the
145145
attacker can't read the journal. You can use a block cipher here
146-
(such as "cbc(aes)") or a stream cipher (for example "chacha20",
147-
"salsa20" or "ctr(aes)").
146+
(such as "cbc(aes)") or a stream cipher (for example "chacha20"
147+
or "ctr(aes)").
148148

149149
The journal contains history of last writes to the block device,
150150
an attacker reading the journal could see the last sector numbers

Documentation/crypto/api-skcipher.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Symmetric Key Cipher Request Handle
2828
Single Block Cipher API
2929
-----------------------
3030

31-
.. kernel-doc:: include/linux/crypto.h
31+
.. kernel-doc:: include/crypto/internal/cipher.h
3232
:doc: Single Block Cipher API
3333

34-
.. kernel-doc:: include/linux/crypto.h
34+
.. kernel-doc:: include/crypto/internal/cipher.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
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/crypto/intel,keembay-ocs-hcu.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Intel Keem Bay OCS HCU Device Tree Bindings
8+
9+
maintainers:
10+
- Declan Murphy <[email protected]>
11+
- Daniele Alessandrelli <[email protected]>
12+
13+
description:
14+
The Intel Keem Bay Offload and Crypto Subsystem (OCS) Hash Control Unit (HCU)
15+
provides hardware-accelerated hashing and HMAC.
16+
17+
properties:
18+
compatible:
19+
const: intel,keembay-ocs-hcu
20+
21+
reg:
22+
maxItems: 1
23+
24+
interrupts:
25+
maxItems: 1
26+
27+
clocks:
28+
maxItems: 1
29+
30+
required:
31+
- compatible
32+
- reg
33+
- interrupts
34+
- clocks
35+
36+
additionalProperties: false
37+
38+
examples:
39+
- |
40+
#include <dt-bindings/interrupt-controller/arm-gic.h>
41+
crypto@3000b000 {
42+
compatible = "intel,keembay-ocs-hcu";
43+
reg = <0x3000b000 0x1000>;
44+
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
45+
clocks = <&scmi_clk 94>;
46+
};

Documentation/devicetree/bindings/crypto/samsung-slimsss.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ title: Samsung Exynos SoC SlimSSS (Slim Security SubSystem) module
88

99
maintainers:
1010
- Krzysztof Kozlowski <[email protected]>
11-
- Kamil Konieczny <[email protected]>
1211

1312
description: |+
1413
The SlimSSS module in Exynos5433 SoC supports the following:

Documentation/devicetree/bindings/crypto/samsung-sss.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ title: Samsung Exynos SoC SSS (Security SubSystem) module
88

99
maintainers:
1010
- Krzysztof Kozlowski <[email protected]>
11-
- Kamil Konieczny <[email protected]>
1211

1312
description: |+
1413
The SSS module in S5PV210 SoC supports the following:

MAINTAINERS

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9032,6 +9032,17 @@ F: drivers/crypto/keembay/keembay-ocs-aes-core.c
90329032
F: drivers/crypto/keembay/ocs-aes.c
90339033
F: drivers/crypto/keembay/ocs-aes.h
90349034

9035+
INTEL KEEM BAY OCS HCU CRYPTO DRIVER
9036+
M: Daniele Alessandrelli <[email protected]>
9037+
M: Declan Murphy <[email protected]>
9038+
S: Maintained
9039+
F: Documentation/devicetree/bindings/crypto/intel,keembay-ocs-hcu.yaml
9040+
F: drivers/crypto/keembay/Kconfig
9041+
F: drivers/crypto/keembay/Makefile
9042+
F: drivers/crypto/keembay/keembay-ocs-hcu-core.c
9043+
F: drivers/crypto/keembay/ocs-hcu.c
9044+
F: drivers/crypto/keembay/ocs-hcu.h
9045+
90359046
INTEL MANAGEMENT ENGINE (mei)
90369047
M: Tomas Winkler <[email protected]>
90379048
@@ -15683,7 +15694,6 @@ F: drivers/media/i2c/s5k5baf.c
1568315694
SAMSUNG S5P Security SubSystem (SSS) DRIVER
1568415695
M: Krzysztof Kozlowski <[email protected]>
1568515696
M: Vladimir Zapolskiy <[email protected]>
15686-
M: Kamil Konieczny <[email protected]>
1568715697
1568815698
1568915699
S: Maintained

arch/arm/crypto/Kconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,25 @@ config CRYPTO_SHA512_ARM
6262
SHA-512 secure hash standard (DFIPS 180-2) implemented
6363
using optimized ARM assembler and NEON, when available.
6464

65+
config CRYPTO_BLAKE2S_ARM
66+
tristate "BLAKE2s digest algorithm (ARM)"
67+
select CRYPTO_ARCH_HAVE_LIB_BLAKE2S
68+
help
69+
BLAKE2s digest algorithm optimized with ARM scalar instructions. This
70+
is faster than the generic implementations of BLAKE2s and BLAKE2b, but
71+
slower than the NEON implementation of BLAKE2b. (There is no NEON
72+
implementation of BLAKE2s, since NEON doesn't really help with it.)
73+
74+
config CRYPTO_BLAKE2B_NEON
75+
tristate "BLAKE2b digest algorithm (ARM NEON)"
76+
depends on KERNEL_MODE_NEON
77+
select CRYPTO_BLAKE2B
78+
help
79+
BLAKE2b digest algorithm optimized with ARM NEON instructions.
80+
On ARM processors that have NEON support but not the ARMv8
81+
Crypto Extensions, typically this BLAKE2b implementation is
82+
much faster than SHA-2 and slightly faster than SHA-1.
83+
6584
config CRYPTO_AES_ARM
6685
tristate "Scalar AES cipher for ARM"
6786
select CRYPTO_ALGAPI

arch/arm/crypto/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ obj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o
99
obj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o
1010
obj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o
1111
obj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o
12+
obj-$(CONFIG_CRYPTO_BLAKE2S_ARM) += blake2s-arm.o
13+
obj-$(CONFIG_CRYPTO_BLAKE2B_NEON) += blake2b-neon.o
1214
obj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha-neon.o
1315
obj-$(CONFIG_CRYPTO_POLY1305_ARM) += poly1305-arm.o
1416
obj-$(CONFIG_CRYPTO_NHPOLY1305_NEON) += nhpoly1305-neon.o
@@ -29,6 +31,8 @@ sha256-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha256_neon_glue.o
2931
sha256-arm-y := sha256-core.o sha256_glue.o $(sha256-arm-neon-y)
3032
sha512-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha512-neon-glue.o
3133
sha512-arm-y := sha512-core.o sha512-glue.o $(sha512-arm-neon-y)
34+
blake2s-arm-y := blake2s-core.o blake2s-glue.o
35+
blake2b-neon-y := blake2b-neon-core.o blake2b-neon-glue.o
3236
sha1-arm-ce-y := sha1-ce-core.o sha1-ce-glue.o
3337
sha2-arm-ce-y := sha2-ce-core.o sha2-ce-glue.o
3438
aes-arm-ce-y := aes-ce-core.o aes-ce-glue.o

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <asm/simd.h>
1010
#include <crypto/aes.h>
1111
#include <crypto/ctr.h>
12+
#include <crypto/internal/cipher.h>
1213
#include <crypto/internal/simd.h>
1314
#include <crypto/internal/skcipher.h>
1415
#include <crypto/scatterwalk.h>
@@ -23,6 +24,8 @@ MODULE_ALIAS_CRYPTO("cbc(aes)-all");
2324
MODULE_ALIAS_CRYPTO("ctr(aes)");
2425
MODULE_ALIAS_CRYPTO("xts(aes)");
2526

27+
MODULE_IMPORT_NS(CRYPTO_INTERNAL);
28+
2629
asmlinkage void aesbs_convert_key(u8 out[], u32 const rk[], int rounds);
2730

2831
asmlinkage void aesbs_ecb_encrypt(u8 out[], u8 const in[], u8 const rk[],

0 commit comments

Comments
 (0)