projects/linux·commit c8e76996

Merge tag 'v6.9-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

c8e76996 · Linus Torvalds <[email protected]> · 2024-03-15 14:46:54 -07:00

Pull crypto updates from Herbert Xu:
 "API:

   - Avoid unnecessary copying in scomp for trivial SG lists

  Algorithms:

   - Optimise NEON CCM implementation on ARM64

  Drivers:

   - Add queue stop/query debugfs support in hisilicon/qm

   - Intel qat updates and cleanups"

* tag 'v6.9-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (79 commits)
  Revert "crypto: remove CONFIG_CRYPTO_STATS"
  crypto: scomp - remove memcpy if sg_nents is 1 and pages are lowmem
  crypto: tcrypt - add ffdhe2048(dh) test
  crypto: iaa - fix the missing CRYPTO_ALG_ASYNC in cra_flags
  crypto: hisilicon/zip - fix the missing CRYPTO_ALG_ASYNC in cra_flags
  hwrng: hisi - use dev_err_probe
  MAINTAINERS: Remove T Ambarus from few mchp entries
  crypto: iaa - Fix comp/decomp delay statistics
  crypto: iaa - Fix async_disable descriptor leak
  dt-bindings: rng: atmel,at91-trng: add sam9x7 TRNG
  dt-bindings: crypto: add sam9x7 in Atmel TDES
  dt-bindings: crypto: add sam9x7 in Atmel SHA
  dt-bindings: crypto: add sam9x7 in Atmel AES
  crypto: remove CONFIG_CRYPTO_STATS
  crypto: dh - Make public key test FIPS-only
  crypto: rockchip - fix to check return value
  crypto: jitter - fix CRYPTO_JITTERENTROPY help text
  crypto: qat - make ring to service map common for QAT GEN4
  crypto: qat - fix ring to service map for dcc in 420xx
  crypto: qat - fix ring to service map for dcc in 4xxx
  ...
Commit
c8e769961668ef56acabc67f040c58ed769c57e4
Parents
4138f022 · 6a8dbd71

Merge commit. Changes below are compared with the first parent: 4138f022.

Changes

100 files changed · +1446 −1012

FileStatusAddDelContent
Documentation/ABI/testing/debugfs-driver-qatmodified+26−0View file
Documentation/ABI/testing/debugfs-hisi-hpremodified+22−0View file
Documentation/ABI/testing/debugfs-hisi-secmodified+22−0View file
Documentation/ABI/testing/debugfs-hisi-zipmodified+22−0View file
Documentation/ABI/testing/sysfs-driver-qatmodified+20−0View file
Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yamlmodified+5−1View file
Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yamlmodified+5−1View file
Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yamlmodified+5−1View file
Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yamlmodified+1−0View file
Documentation/devicetree/bindings/crypto/qcom-qce.yamlmodified+1−0View file
Documentation/devicetree/bindings/rng/atmel,at91-trng.yamlmodified+4−0View file
MAINTAINERSmodified+13−12View file
arch/arm/crypto/sha256_glue.cmodified+5−8View file
arch/arm/crypto/sha512-glue.cmodified+5−7View file
arch/arm64/crypto/Kconfigmodified+1−0View file
arch/arm64/crypto/aes-ce-ccm-core.Smodified+93−172View file
arch/arm64/crypto/aes-ce-ccm-glue.cmodified+105−49View file
arch/arm64/crypto/aes-glue.cmodified+1−0View file
arch/powerpc/crypto/Kconfigmodified+20−0View file
arch/powerpc/crypto/Makefilemodified+18−2View file
drivers/crypto/vmx/aes.c → arch/powerpc/crypto/aes.crenamed+0−0View file
drivers/crypto/vmx/aes_cbc.c → arch/powerpc/crypto/aes_cbc.crenamed+0−0View file
drivers/crypto/vmx/aes_ctr.c → arch/powerpc/crypto/aes_ctr.crenamed+0−0View file
drivers/crypto/vmx/aes_xts.c → arch/powerpc/crypto/aes_xts.crenamed+0−0View file
drivers/crypto/vmx/aesp8-ppc.h → arch/powerpc/crypto/aesp8-ppc.hrenamed+0−0View file
drivers/crypto/vmx/aesp8-ppc.pl → arch/powerpc/crypto/aesp8-ppc.plrenamed+0−0View file
drivers/crypto/vmx/ghash.c → arch/powerpc/crypto/ghash.crenamed+0−0View file
drivers/crypto/vmx/ghashp8-ppc.pl → arch/powerpc/crypto/ghashp8-ppc.plrenamed+0−0View file
drivers/crypto/vmx/vmx.c → arch/powerpc/crypto/vmx.crenamed+0−0View file
crypto/Kconfigmodified+3−2View file
crypto/ahash.cmodified+10−11View file
crypto/asymmetric_keys/verify_pefile.cmodified+2−2View file
crypto/dh.cmodified+29−28View file
crypto/pcbc.cmodified+2−2View file
crypto/rsa.cmodified+32−4View file
crypto/scompress.cmodified+29−7View file
crypto/tcrypt.cmodified+3−0View file
crypto/testmgr.cmodified+0−8View file
drivers/char/hw_random/hisi-rng.cmodified+2−4View file
drivers/crypto/Kconfigmodified+7−7View file
drivers/crypto/Makefilemodified+1−1View file
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.cmodified+1−1View file
drivers/crypto/ccp/platform-access.cmodified+9−2View file
drivers/crypto/ccp/psp-dev.cmodified+7−4View file
drivers/crypto/hisilicon/debugfs.cmodified+58−0View file
drivers/crypto/hisilicon/hpre/hpre_main.cmodified+1−1View file
drivers/crypto/hisilicon/qm.cmodified+124−60View file
drivers/crypto/hisilicon/sec2/sec_crypto.cmodified+12−21View file
drivers/crypto/hisilicon/sec2/sec_main.cmodified+6−1View file
drivers/crypto/hisilicon/zip/zip_crypto.cmodified+1−0View file
drivers/crypto/hisilicon/zip/zip_main.cmodified+1−1View file
drivers/crypto/intel/iaa/iaa_crypto.hmodified+0−25View file
drivers/crypto/intel/iaa/iaa_crypto_comp_fixed.cmodified+0−1View file
drivers/crypto/intel/iaa/iaa_crypto_main.cmodified+15−107View file
drivers/crypto/intel/iaa/iaa_crypto_stats.cmodified+0−30View file
drivers/crypto/intel/iaa/iaa_crypto_stats.hmodified+4−4View file
drivers/crypto/intel/qat/Kconfigmodified+14−0View file
drivers/crypto/intel/qat/qat_420xx/adf_420xx_hw_data.cmodified+16−48View file
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.cmodified+16−48View file
drivers/crypto/intel/qat/qat_common/Makefilemodified+2−0View file
drivers/crypto/intel/qat/qat_common/adf_accel_devices.hmodified+3−0View file
drivers/crypto/intel/qat/qat_common/adf_aer.cmodified+130−8View file
drivers/crypto/intel/qat/qat_common/adf_cfg_strings.hmodified+1−0View file
drivers/crypto/intel/qat/qat_common/adf_clock.cmodified+3−0View file
drivers/crypto/intel/qat/qat_common/adf_cnv_dbgfs.cmodified+0−1View file
drivers/crypto/intel/qat/qat_common/adf_common_drv.hmodified+10−0View file
drivers/crypto/intel/qat/qat_common/adf_dev_mgr.cmodified+2−2View file
drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.cmodified+59−0View file
drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.hmodified+1−0View file
drivers/crypto/intel/qat/qat_common/adf_gen4_ras.cmodified+2−4View file
drivers/crypto/intel/qat/qat_common/adf_heartbeat.cmodified+14−6View file
drivers/crypto/intel/qat/qat_common/adf_heartbeat.hmodified+21−0View file
drivers/crypto/intel/qat/qat_common/adf_heartbeat_dbgfs.cmodified+53−0View file
drivers/crypto/intel/qat/qat_common/adf_heartbeat_inject.cadded+76−0View file
drivers/crypto/intel/qat/qat_common/adf_hw_arbiter.cmodified+25−0View file
drivers/crypto/intel/qat/qat_common/adf_init.cmodified+12−0View file
drivers/crypto/intel/qat/qat_common/adf_isr.cmodified+7−4View file
drivers/crypto/intel/qat/qat_common/adf_pfvf_msg.hmodified+6−1View file
drivers/crypto/intel/qat/qat_common/adf_pfvf_pf_msg.cmodified+63−1View file
drivers/crypto/intel/qat/qat_common/adf_pfvf_pf_msg.hmodified+21−0View file
drivers/crypto/intel/qat/qat_common/adf_pfvf_pf_proto.cmodified+8−0View file
drivers/crypto/intel/qat/qat_common/adf_pfvf_vf_proto.cmodified+6−0View file
drivers/crypto/intel/qat/qat_common/adf_rl.cmodified+19−1View file
drivers/crypto/intel/qat/qat_common/adf_sriov.cmodified+35−3View file
drivers/crypto/intel/qat/qat_common/adf_sysfs.cmodified+37−0View file
drivers/crypto/intel/qat/qat_common/adf_vf_isr.cmodified+0−2View file
drivers/crypto/intel/qat/qat_common/qat_comp_algs.cmodified+0−9View file
drivers/crypto/intel/qat/qat_common/qat_crypto.cmodified+2−2View file
drivers/crypto/rockchip/rk3288_crypto.cmodified+5−0View file
drivers/crypto/virtio/virtio_crypto_akcipher_algs.cmodified+6−6View file
drivers/crypto/virtio/virtio_crypto_core.cmodified+0−2View file
drivers/crypto/vmx/.gitignoredeleted+0−3View before deletion
drivers/crypto/vmx/Kconfigdeleted+0−14View before deletion
drivers/crypto/vmx/Makefiledeleted+0−23View before deletion
drivers/crypto/vmx/ppc-xlate.pldeleted+0−231View before deletion
drivers/crypto/xilinx/zynqmp-aes-gcm.cmodified+3−0View file
include/crypto/internal/hash.hmodified+0−2View file
include/crypto/public_key.hmodified+1−0View file
include/linux/hisi_acc_qm.hmodified+9−1View file
tools/crypto/ccp/test_dbc.pymodified+5−3View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/ABI/testing/debugfs-driver-qat

View file
diff --git a/Documentation/ABI/testing/debugfs-driver-qat b/Documentation/ABI/testing/debugfs-driver-qat
index b2db010..bd67937 100644
--- a/Documentation/ABI/testing/debugfs-driver-qat
+++ b/Documentation/ABI/testing/debugfs-driver-qat
@@ -81,3 +81,29 @@ Description: (RO) Read returns, for each Acceleration Engine (AE), the number
<N>: Number of Compress and Verify (CnV) errors and type
of the last CnV error detected by Acceleration
Engine N.
+
+What: /sys/kernel/debug/qat_<device>_<BDF>/heartbeat/inject_error
+Date: March 2024
+KernelVersion: 6.8
+Description: (WO) Write to inject an error that simulates an heartbeat
+ failure. This is to be used for testing purposes.
+
+ After writing this file, the driver stops arbitration on a
+ random engine and disables the fetching of heartbeat counters.
+ If a workload is running on the device, a job submitted to the
+ accelerator might not get a response and a read of the
+ `heartbeat/status` attribute might report -1, i.e. device
+ unresponsive.
+ The error is unrecoverable thus the device must be restarted to
+ restore its functionality.
+
+ This attribute is available only when the kernel is built with
+ CONFIG_CRYPTO_DEV_QAT_ERROR_INJECTION=y.
+
+ A write of 1 enables error injection.
+
+ The following example shows how to enable error injection::
+
+ # cd /sys/kernel/debug/qat_<device>_<BDF>
+ # echo 1 > heartbeat/inject_error

Documentation/ABI/testing/debugfs-hisi-hpre

View file
diff --git a/Documentation/ABI/testing/debugfs-hisi-hpre b/Documentation/ABI/testing/debugfs-hisi-hpre
index 8e8de49..d4e16ef 100644
--- a/Documentation/ABI/testing/debugfs-hisi-hpre
+++ b/Documentation/ABI/testing/debugfs-hisi-hpre
@@ -111,6 +111,28 @@ Description: QM debug registers(regs) read hardware register value. This
node is used to show the change of the qm register values. This
node can be help users to check the change of register values.
+What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/qm_state
+Date: Jan 2024
+Description: Dump the state of the device.
+ 0: busy, 1: idle.
+ Only available for PF, and take no other effect on HPRE.
+
+What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/dev_timeout
+Date: Feb 2024
+Description: Set the wait time when stop queue fails. Available for both PF
+ and VF, and take no other effect on HPRE.
+ 0: not wait(default), others value: wait dev_timeout * 20 microsecond.
+
+What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/dev_state
+Date: Feb 2024
+Description: Dump the stop queue status of the QM. The default value is 0,
+ if dev_timeout is set, when stop queue fails, the dev_state
+ will return non-zero value. Available for both PF and VF,
+ and take no other effect on HPRE.
+
What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/diff_regs
Date: Mar 2022

Documentation/ABI/testing/debugfs-hisi-sec

View file
diff --git a/Documentation/ABI/testing/debugfs-hisi-sec b/Documentation/ABI/testing/debugfs-hisi-sec
index deeefe2..6c6c9a6 100644
--- a/Documentation/ABI/testing/debugfs-hisi-sec
+++ b/Documentation/ABI/testing/debugfs-hisi-sec
@@ -91,6 +91,28 @@ Description: QM debug registers(regs) read hardware register value. This
node is used to show the change of the qm register values. This
node can be help users to check the change of register values.
+What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/qm_state
+Date: Jan 2024
+Description: Dump the state of the device.
+ 0: busy, 1: idle.
+ Only available for PF, and take no other effect on SEC.
+
+What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/dev_timeout
+Date: Feb 2024
+Description: Set the wait time when stop queue fails. Available for both PF
+ and VF, and take no other effect on SEC.
+ 0: not wait(default), others value: wait dev_timeout * 20 microsecond.
+
+What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/dev_state
+Date: Feb 2024
+Description: Dump the stop queue status of the QM. The default value is 0,
+ if dev_timeout is set, when stop queue fails, the dev_state
+ will return non-zero value. Available for both PF and VF,
+ and take no other effect on SEC.
+
What: /sys/kernel/debug/hisi_sec2/<bdf>/sec_dfx/diff_regs
Date: Mar 2022

Documentation/ABI/testing/debugfs-hisi-zip

View file
diff --git a/Documentation/ABI/testing/debugfs-hisi-zip b/Documentation/ABI/testing/debugfs-hisi-zip
index 593714a..a22dd69 100644
--- a/Documentation/ABI/testing/debugfs-hisi-zip
+++ b/Documentation/ABI/testing/debugfs-hisi-zip
@@ -104,6 +104,28 @@ Description: QM debug registers(regs) read hardware register value. This
node is used to show the change of the qm registers value. This
node can be help users to check the change of register values.
+What: /sys/kernel/debug/hisi_zip/<bdf>/qm/qm_state
+Date: Jan 2024
+Description: Dump the state of the device.
+ 0: busy, 1: idle.
+ Only available for PF, and take no other effect on ZIP.
+
+What: /sys/kernel/debug/hisi_zip/<bdf>/qm/dev_timeout
+Date: Feb 2024
+Description: Set the wait time when stop queue fails. Available for both PF
+ and VF, and take no other effect on ZIP.
+ 0: not wait(default), others value: wait dev_timeout * 20 microsecond.
+
+What: /sys/kernel/debug/hisi_zip/<bdf>/qm/dev_state
+Date: Feb 2024
+Description: Dump the stop queue status of the QM. The default value is 0,
+ if dev_timeout is set, when stop queue fails, the dev_state
+ will return non-zero value. Available for both PF and VF,
+ and take no other effect on ZIP.
+
What: /sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/diff_regs
Date: Mar 2022

Documentation/ABI/testing/sysfs-driver-qat

View file
diff --git a/Documentation/ABI/testing/sysfs-driver-qat b/Documentation/ABI/testing/sysfs-driver-qat
index bbf329c..96020fb 100644
--- a/Documentation/ABI/testing/sysfs-driver-qat
+++ b/Documentation/ABI/testing/sysfs-driver-qat
@@ -141,3 +141,23 @@ Description:
64
This attribute is only available for qat_4xxx devices.
+
+What: /sys/bus/pci/devices/<BDF>/qat/auto_reset
+Date: March 2024
+KernelVersion: 6.8
+Description: (RW) Reports the current state of the autoreset feature
+ for a QAT device
+
+ Write to the attribute to enable or disable device auto reset.
+
+ Device auto reset is disabled by default.
+
+ The values are:
+
+ * 1/Yy/on: auto reset enabled. If the device encounters an
+ unrecoverable error, it will be reset automatically.
+ * 0/Nn/off: auto reset disabled. If the device encounters an
+ unrecoverable error, it will not be reset.
+
+ This attribute is only available for qat_4xxx devices.

Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml

View file
diff --git a/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml
index 0b7383b..7dc0748 100644
--- a/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml
+++ b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml
@@ -12,7 +12,11 @@ maintainers:
properties:
compatible:
- const: atmel,at91sam9g46-aes
+ oneOf:
+ - const: atmel,at91sam9g46-aes
+ - items:
+ - const: microchip,sam9x7-aes
+ - const: atmel,at91sam9g46-aes
reg:
maxItems: 1

Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml

View file
diff --git a/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml
index ee2ffb0..d378c53 100644
--- a/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml
+++ b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml
@@ -12,7 +12,11 @@ maintainers:
properties:
compatible:
- const: atmel,at91sam9g46-sha
+ oneOf:
+ - const: atmel,at91sam9g46-sha
+ - items:
+ - const: microchip,sam9x7-sha
+ - const: atmel,at91sam9g46-sha
reg:
maxItems: 1

Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml

View file
diff --git a/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml
index 3d6ed24..6a441f7 100644
--- a/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml
+++ b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml
@@ -12,7 +12,11 @@ maintainers:
properties:
compatible:
- const: atmel,at91sam9g46-tdes
+ oneOf:
+ - const: atmel,at91sam9g46-tdes
+ - items:
+ - const: microchip,sam9x7-tdes
+ - const: atmel,at91sam9g46-tdes
reg:
maxItems: 1

Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml

View file
diff --git a/Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml b/Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml
index 09e4315..e91bc7d 100644
--- a/Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml
@@ -14,6 +14,7 @@ properties:
items:
- enum:
- qcom,sa8775p-inline-crypto-engine
+ - qcom,sc7180-inline-crypto-engine
- qcom,sm8450-inline-crypto-engine
- qcom,sm8550-inline-crypto-engine
- qcom,sm8650-inline-crypto-engine

Documentation/devicetree/bindings/crypto/qcom-qce.yaml

View file
diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
index a48bd38..e285e38 100644
--- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
@@ -45,6 +45,7 @@ properties:
- items:
- enum:
- qcom,sc7280-qce
+ - qcom,sm6350-qce
- qcom,sm8250-qce
- qcom,sm8350-qce
- qcom,sm8450-qce

Documentation/devicetree/bindings/rng/atmel,at91-trng.yaml

View file
diff --git a/Documentation/devicetree/bindings/rng/atmel,at91-trng.yaml b/Documentation/devicetree/bindings/rng/atmel,at91-trng.yaml
index 3ce4545..b38f825 100644
--- a/Documentation/devicetree/bindings/rng/atmel,at91-trng.yaml
+++ b/Documentation/devicetree/bindings/rng/atmel,at91-trng.yaml
@@ -21,6 +21,10 @@ properties:
- enum:
- microchip,sama7g5-trng
- const: atmel,at91sam9g45-trng
+ - items:
+ - enum:
+ - microchip,sam9x7-trng
+ - const: microchip,sam9x60-trng
clocks:
maxItems: 1

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index a8ea865..40489f0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10377,12 +10377,17 @@ M: Nayna Jain <[email protected]>
M: Paulo Flabiano Smorigo <[email protected]>
S: Supported
-F: drivers/crypto/vmx/Kconfig
-F: drivers/crypto/vmx/Makefile
-F: drivers/crypto/vmx/aes*
-F: drivers/crypto/vmx/ghash*
-F: drivers/crypto/vmx/ppc-xlate.pl
-F: drivers/crypto/vmx/vmx.c
+F: arch/powerpc/crypto/Kconfig
+F: arch/powerpc/crypto/Makefile
+F: arch/powerpc/crypto/aes.c
+F: arch/powerpc/crypto/aes_cbc.c
+F: arch/powerpc/crypto/aes_ctr.c
+F: arch/powerpc/crypto/aes_xts.c
+F: arch/powerpc/crypto/aesp8-ppc.*
+F: arch/powerpc/crypto/ghash.c
+F: arch/powerpc/crypto/ghashp8-ppc.pl
+F: arch/powerpc/crypto/ppc-xlate.pl
+F: arch/powerpc/crypto/vmx.c
IBM ServeRAID RAID DRIVER
S: Orphan
@@ -12456,7 +12461,6 @@ F: drivers/*/*/*pasemi*
F: drivers/*/*pasemi*
F: drivers/char/tpm/tpm_ibmvtpm*
F: drivers/crypto/nx/
-F: drivers/crypto/vmx/
F: drivers/i2c/busses/i2c-opal.c
F: drivers/net/ethernet/ibm/ibmveth.*
F: drivers/net/ethernet/ibm/ibmvnic.*
@@ -14304,7 +14308,6 @@ F: drivers/misc/xilinx_tmr_manager.c
MICROCHIP AT91 DMA DRIVERS
M: Ludovic Desroches <[email protected]>
-M: Tudor Ambarus <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Supported
@@ -14353,9 +14356,8 @@ F: Documentation/devicetree/bindings/media/microchip,csi2dc.yaml
F: drivers/media/platform/microchip/microchip-csi2dc.c
MICROCHIP ECC DRIVER
-M: Tudor Ambarus <[email protected]>
-S: Maintained
+S: Orphan
F: drivers/crypto/atmel-ecc.*
MICROCHIP EIC DRIVER
@@ -14460,9 +14462,8 @@ S: Maintained
F: drivers/mmc/host/atmel-mci.c
MICROCHIP NAND DRIVER
-M: Tudor Ambarus <[email protected]>
-S: Supported
+S: Orphan
F: Documentation/devicetree/bindings/mtd/atmel-nand.txt
F: drivers/mtd/nand/raw/atmel/*

arch/arm/crypto/sha256_glue.c

View file
diff --git a/arch/arm/crypto/sha256_glue.c b/arch/arm/crypto/sha256_glue.c
index 433ee4d..f85933f 100644
--- a/arch/arm/crypto/sha256_glue.c
+++ b/arch/arm/crypto/sha256_glue.c
@@ -24,8 +24,8 @@
#include "sha256_glue.h"
-asmlinkage void sha256_block_data_order(u32 *digest, const void *data,
- unsigned int num_blks);
+asmlinkage void sha256_block_data_order(struct sha256_state *state,
+ const u8 *data, int num_blks);
int crypto_sha256_arm_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
@@ -33,23 +33,20 @@ int crypto_sha256_arm_update(struct shash_desc *desc, const u8 *data,
/* make sure casting to sha256_block_fn() is safe */
BUILD_BUG_ON(offsetof(struct sha256_state, state) != 0);
- return sha256_base_do_update(desc, data, len,
- (sha256_block_fn *)sha256_block_data_order);
+ return sha256_base_do_update(desc, data, len, sha256_block_data_order);
}
EXPORT_SYMBOL(crypto_sha256_arm_update);
static int crypto_sha256_arm_final(struct shash_desc *desc, u8 *out)
{
- sha256_base_do_finalize(desc,
- (sha256_block_fn *)sha256_block_data_order);
+ sha256_base_do_finalize(desc, sha256_block_data_order);
return sha256_base_finish(desc, out);
}
int crypto_sha256_arm_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{
- sha256_base_do_update(desc, data, len,
- (sha256_block_fn *)sha256_block_data_order);
+ sha256_base_do_update(desc, data, len, sha256_block_data_order);
return crypto_sha256_arm_final(desc, out);
}
EXPORT_SYMBOL(crypto_sha256_arm_finup);

arch/arm/crypto/sha512-glue.c

View file
diff --git a/arch/arm/crypto/sha512-glue.c b/arch/arm/crypto/sha512-glue.c
index 0635a65..1be5bd4 100644
--- a/arch/arm/crypto/sha512-glue.c
+++ b/arch/arm/crypto/sha512-glue.c
@@ -25,27 +25,25 @@ MODULE_ALIAS_CRYPTO("sha512");
MODULE_ALIAS_CRYPTO("sha384-arm");
MODULE_ALIAS_CRYPTO("sha512-arm");
-asmlinkage void sha512_block_data_order(u64 *state, u8 const *src, int blocks);
+asmlinkage void sha512_block_data_order(struct sha512_state *state,
+ u8 const *src, int blocks);
int sha512_arm_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
{
- return sha512_base_do_update(desc, data, len,
- (sha512_block_fn *)sha512_block_data_order);
+ return sha512_base_do_update(desc, data, len, sha512_block_data_order);
}
static int sha512_arm_final(struct shash_desc *desc, u8 *out)
{
- sha512_base_do_finalize(desc,
- (sha512_block_fn *)sha512_block_data_order);
+ sha512_base_do_finalize(desc, sha512_block_data_order);
return sha512_base_finish(desc, out);
}
int sha512_arm_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{
- sha512_base_do_update(desc, data, len,
- (sha512_block_fn *)sha512_block_data_order);
+ sha512_base_do_update(desc, data, len, sha512_block_data_order);
return sha512_arm_final(desc, out);
}

arch/arm64/crypto/Kconfig

View file
diff --git a/arch/arm64/crypto/Kconfig b/arch/arm64/crypto/Kconfig
index eb7b423..e7d9bd8 100644
--- a/arch/arm64/crypto/Kconfig
+++ b/arch/arm64/crypto/Kconfig
@@ -268,6 +268,7 @@ config CRYPTO_AES_ARM64_CE_CCM
depends on ARM64 && KERNEL_MODE_NEON
select CRYPTO_ALGAPI
select CRYPTO_AES_ARM64_CE
+ select CRYPTO_AES_ARM64_CE_BLK
select CRYPTO_AEAD
select CRYPTO_LIB_AES
help

arch/arm64/crypto/aes-ce-ccm-core.S

View file
diff --git a/arch/arm64/crypto/aes-ce-ccm-core.S b/arch/arm64/crypto/aes-ce-ccm-core.S
index b03f7f7..f262423 100644
--- a/arch/arm64/crypto/aes-ce-ccm-core.S
+++ b/arch/arm64/crypto/aes-ce-ccm-core.S
@@ -1,8 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
- * aesce-ccm-core.S - AES-CCM transform for ARMv8 with Crypto Extensions
+ * aes-ce-ccm-core.S - AES-CCM transform for ARMv8 with Crypto Extensions
*
- * Copyright (C) 2013 - 2017 Linaro Ltd <[email protected]>
+ * Copyright (C) 2013 - 2017 Linaro Ltd.
+ * Copyright (C) 2024 Google LLC
+ *
+ * Author: Ard Biesheuvel <[email protected]>
*/
#include <linux/linkage.h>
@@ -11,211 +14,129 @@
.text
.arch armv8-a+crypto
- /*
- * u32 ce_aes_ccm_auth_data(u8 mac[], u8 const in[], u32 abytes,
- * u32 macp, u8 const rk[], u32 rounds);
- */
-SYM_FUNC_START(ce_aes_ccm_auth_data)
- ld1 {v0.16b}, [x0] /* load mac */
- cbz w3, 1f
- sub w3, w3, #16
- eor v1.16b, v1.16b, v1.16b
-0: ldrb w7, [x1], #1 /* get 1 byte of input */
- subs w2, w2, #1
- add w3, w3, #1
- ins v1.b[0], w7
- ext v1.16b, v1.16b, v1.16b, #1 /* rotate in the input bytes */
- beq 8f /* out of input? */
- cbnz w3, 0b
- eor v0.16b, v0.16b, v1.16b
-1: ld1 {v3.4s}, [x4] /* load first round key */
- prfm pldl1strm, [x1]
- cmp w5, #12 /* which key size? */
- add x6, x4, #16
- sub w7, w5, #2 /* modified # of rounds */
- bmi 2f
- bne 5f
- mov v5.16b, v3.16b
- b 4f
-2: mov v4.16b, v3.16b
- ld1 {v5.4s}, [x6], #16 /* load 2nd round key */
-3: aese v0.16b, v4.16b
- aesmc v0.16b, v0.16b
-4: ld1 {v3.4s}, [x6], #16 /* load next round key */
- aese v0.16b, v5.16b
- aesmc v0.16b, v0.16b
-5: ld1 {v4.4s}, [x6], #16 /* load next round key */
- subs w7, w7, #3
- aese v0.16b, v3.16b
- aesmc v0.16b, v0.16b
- ld1 {v5.4s}, [x6], #16 /* load next round key */
- bpl 3b
- aese v0.16b, v4.16b
- subs w2, w2, #16 /* last data? */
- eor v0.16b, v0.16b, v5.16b /* final round */
- bmi 6f
- ld1 {v1.16b}, [x1], #16 /* load next input block */
- eor v0.16b, v0.16b, v1.16b /* xor with mac */
- bne 1b
-6: st1 {v0.16b}, [x0] /* store mac */
- beq 10f
- adds w2, w2, #16
- beq 10f
- mov w3, w2
-7: ldrb w7, [x1], #1
- umov w6, v0.b[0]
- eor w6, w6, w7
- strb w6, [x0], #1
- subs w2, w2, #1
- beq 10f
- ext v0.16b, v0.16b, v0.16b, #1 /* rotate out the mac bytes */
- b 7b
-8: cbz w3, 91f
- mov w7, w3
- add w3, w3, #16
-9: ext v1.16b, v1.16b, v1.16b, #1
- adds w7, w7, #1
- bne 9b
-91: eor v0.16b, v0.16b, v1.16b
- st1 {v0.16b}, [x0]
-10: mov w0, w3
- ret
-SYM_FUNC_END(ce_aes_ccm_auth_data)
+ .macro load_round_keys, rk, nr, tmp
+ sub w\tmp, \nr, #10
+ add \tmp, \rk, w\tmp, sxtw #4
+ ld1 {v10.4s-v13.4s}, [\rk]
+ ld1 {v14.4s-v17.4s}, [\tmp], #64
+ ld1 {v18.4s-v21.4s}, [\tmp], #64
+ ld1 {v3.4s-v5.4s}, [\tmp]
+ .endm
- /*
- * void ce_aes_ccm_final(u8 mac[], u8 const ctr[], u8 const rk[],
- * u32 rounds);
- */
-SYM_FUNC_START(ce_aes_ccm_final)
- ld1 {v3.4s}, [x2], #16 /* load first round key */
- ld1 {v0.16b}, [x0] /* load mac */
- cmp w3, #12 /* which key size? */
- sub w3, w3, #2 /* modified # of rounds */
- ld1 {v1.16b}, [x1] /* load 1st ctriv */
- bmi 0f
- bne 3f
- mov v5.16b, v3.16b
- b 2f
-0: mov v4.16b, v3.16b
-1: ld1 {v5.4s}, [x2], #16 /* load next round key */
- aese v0.16b, v4.16b
- aesmc v0.16b, v0.16b
- aese v1.16b, v4.16b
- aesmc v1.16b, v1.16b
-2: ld1 {v3.4s}, [x2], #16 /* load next round key */
- aese v0.16b, v5.16b
- aesmc v0.16b, v0.16b
- aese v1.16b, v5.16b
- aesmc v1.16b, v1.16b
-3: ld1 {v4.4s}, [x2], #16 /* load next round key */
- subs w3, w3, #3
- aese v0.16b, v3.16b
- aesmc v0.16b, v0.16b
- aese v1.16b, v3.16b
- aesmc v1.16b, v1.16b
- bpl 1b
- aese v0.16b, v4.16b
- aese v1.16b, v4.16b
- /* final round key cancels out */
- eor v0.16b, v0.16b, v1.16b /* en-/decrypt the mac */
- st1 {v0.16b}, [x0] /* store result */
- ret
-SYM_FUNC_END(ce_aes_ccm_final)
+ .macro dround, va, vb, vk
+ aese \va\().16b, \vk\().16b
+ aesmc \va\().16b, \va\().16b
+ aese \vb\().16b, \vk\().16b
+ aesmc \vb\().16b, \vb\().16b
+ .endm
+
+ .macro aes_encrypt, va, vb, nr
+ tbz \nr, #2, .L\@
+ dround \va, \vb, v10
+ dround \va, \vb, v11
+ tbz \nr, #1, .L\@
+ dround \va, \vb, v12
+ dround \va, \vb, v13
+.L\@: .irp v, v14, v15, v16, v17, v18, v19, v20, v21, v3
+ dround \va, \vb, \v
+ .endr
+ aese \va\().16b, v4.16b
+ aese \vb\().16b, v4.16b
+ .endm
.macro aes_ccm_do_crypt,enc
- cbz x2, 5f
- ldr x8, [x6, #8] /* load lower ctr */
+ load_round_keys x3, w4, x10
+
ld1 {v0.16b}, [x5] /* load mac */
+ cbz x2, ce_aes_ccm_final
+ ldr x8, [x6, #8] /* load lower ctr */
CPU_LE( rev x8, x8 ) /* keep swabbed ctr in reg */
0: /* outer loop */
ld1 {v1.8b}, [x6] /* load upper ctr */
prfm pldl1strm, [x1]
add x8, x8, #1
rev x9, x8
- cmp w4, #12 /* which key size? */
- sub w7, w4, #2 /* get modified # of rounds */
ins v1.d[1], x9 /* no carry in lower ctr */
- ld1 {v3.4s}, [x3] /* load first round key */
- add x10, x3, #16
- bmi 1f
- bne 4f
- mov v5.16b, v3.16b
- b 3f
-1: mov v4.16b, v3.16b
- ld1 {v5.4s}, [x10], #16 /* load 2nd round key */
-2: /* inner loop: 3 rounds, 2x interleaved */
- aese v0.16b, v4.16b
- aesmc v0.16b, v0.16b
- aese v1.16b, v4.16b
- aesmc v1.16b, v1.16b
-3: ld1 {v3.4s}, [x10], #16 /* load next round key */

This diff is incomplete. Download the complete patch.

arch/arm64/crypto/aes-ce-ccm-glue.c

View file

This diff is incomplete. Download the complete patch.

arch/arm64/crypto/aes-glue.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/aes.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/aes_cbc.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/aes_ctr.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/aes_xts.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/aesp8-ppc.h

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/aesp8-ppc.pl

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/ghash.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/ghashp8-ppc.pl

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/crypto/vmx.c

View file

This diff is incomplete. Download the complete patch.

crypto/Kconfig

View file

This diff is incomplete. Download the complete patch.

crypto/ahash.c

View file

This diff is incomplete. Download the complete patch.

crypto/asymmetric_keys/verify_pefile.c

View file

This diff is incomplete. Download the complete patch.

crypto/dh.c

View file

This diff is incomplete. Download the complete patch.

crypto/pcbc.c

View file

This diff is incomplete. Download the complete patch.

crypto/rsa.c

View file

This diff is incomplete. Download the complete patch.

crypto/scompress.c

View file

This diff is incomplete. Download the complete patch.

crypto/tcrypt.c

View file

This diff is incomplete. Download the complete patch.

crypto/testmgr.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/hw_random/hisi-rng.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/ccp/platform-access.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/ccp/psp-dev.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/hisilicon/debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/hisilicon/hpre/hpre_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/hisilicon/qm.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/hisilicon/sec2/sec_crypto.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/hisilicon/sec2/sec_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/hisilicon/zip/zip_crypto.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/hisilicon/zip/zip_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/iaa/iaa_crypto.h

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/iaa/iaa_crypto_comp_fixed.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/iaa/iaa_crypto_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/iaa/iaa_crypto_stats.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/iaa/iaa_crypto_stats.h

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_420xx/adf_420xx_hw_data.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_accel_devices.h

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_aer.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_cfg_strings.h

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_clock.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_cnv_dbgfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_common_drv.h

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.h

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_heartbeat.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_heartbeat.h

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_heartbeat_dbgfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_heartbeat_inject.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_hw_arbiter.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_init.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_isr.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_pfvf_msg.h

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_pfvf_pf_msg.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_pfvf_pf_msg.h

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_pfvf_pf_proto.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_pfvf_vf_proto.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_rl.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_sriov.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/adf_vf_isr.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/qat_comp_algs.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/intel/qat/qat_common/qat_crypto.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/rockchip/rk3288_crypto.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/virtio/virtio_crypto_akcipher_algs.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/virtio/virtio_crypto_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/crypto/vmx/.gitignore

View before deletion

This diff is incomplete. Download the complete patch.

drivers/crypto/vmx/Kconfig

View before deletion

This diff is incomplete. Download the complete patch.

drivers/crypto/vmx/Makefile

View before deletion

This diff is incomplete. Download the complete patch.

drivers/crypto/vmx/ppc-xlate.pl

View before deletion

This diff is incomplete. Download the complete patch.

drivers/crypto/xilinx/zynqmp-aes-gcm.c

View file

This diff is incomplete. Download the complete patch.

include/crypto/internal/hash.h

View file

This diff is incomplete. Download the complete patch.

include/crypto/public_key.h

View file

This diff is incomplete. Download the complete patch.

include/linux/hisi_acc_qm.h

View file

This diff is incomplete. Download the complete patch.

tools/crypto/ccp/test_dbc.py

View file

This diff is incomplete. Download the complete patch.