Skip to contentSkip to conversation

crypto: cmh - add Rambus CryptoManager Hub core driver and AES

PATCH NAK Alex Ousherovitch 4 participants 18 messages Oct 13 – Oct 20

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover crypto: cmh - add Rambus CryptoManager Hub core driver and AES

This is the first of a short, incremental set of submissions adding support for the Rambus CryptoManager Hub (CMH), a hardware cryptographic accelerator accessed through a mailbox-based VCQ (Virtual Command Queue) interface. To keep each posting small and independently reviewable, the driver is submitted in self-contained parts; this first series adds the core platform driver, the shared key/datastore layer and the AES transforms (plus the device-tree binding and the MAINTAINERS entry). AES is the first and least-problematic algorithm family, so the core has a user and the VCQ/DMA/completion data path is reviewable end to end. Later series add the remaining symmetric ciphers (SM4, ChaCha20-Poly1305) and the hwrng, the hashes and MACs, and finally the asymmetric and post-quantum algorithms together with the /dev/cmh_mgmt management interface.

The core driver binds the device, parses its device-tree description, sets up DMA, the mailbox queue interface and the transaction manager, and exposes sysfs/debugfs instrumentation. The key/datastore patch adds the key provisioning and system-object layer that the AES driver in this series, and the algorithm drivers in the following series, build on.

The transaction manager runs as a kthread that packs VCQ entries, maps DMA, and submits to the least-loaded mailbox; completion is handled by per-mailbox threaded IRQs. The data path is asynchronous: requests return -EINPROGRESS and the driver honors CRYPTO_TFM_REQ_MAY_BACKLOG for queue-full backpressure. The CMH eSW is loaded independently by the hardware before probe; the driver loads no firmware.

The CMH is a platform device matched via device tree (compatible "rambus,cmh-v1030"). Following the inside-secure,eip93 binding model and the DT maintainer's guidance, the schema requires a SoC-specific compatible ahead of the IP fallback and therefore carries no example.

Public hardware documentation:
Product brief: https://go.rambus.com/ch-7xx-and-cc-7xx-product-brief
No public datasheets are currently available. The driver was developed against the Rambus CryptoManager Hub Hardware Reference Manual (Rambus Inc. confidential). Detailed hardware reference is available under NDA from Rambus Inc.; contact the maintainers listed in MAINTAINERS for access during review.

Developed against Herbert Xu's cryptodev tree. checkpatch.pl --strict, sparse (C=2) and a W=1 -Werror build are clean, and dtschema's dt-doc-validate accepts the binding. Exercised on riscv64 and arm64 -- QEMU with the CMH hardware model and a Xilinx VMK180 FPGA with the CMH IP -- under lockdep/PROVE_LOCKING, DEBUG_OBJECTS, KASAN/UBSAN/KMEMLEAK/KFENCE and (arm64) KCSAN with no findings; worst-case stack stays under 1 KB.

Alex Ousherovitch (5):
dt-bindings: crypto: add Rambus CryptoManager Hub
crypto: cmh - add core platform driver
crypto: cmh - add key/datastore infrastructure
crypto: cmh - add AES skcipher/aead/cmac
MAINTAINERS: add Rambus CryptoManager Hub (CMH)

 Documentation/ABI/testing/debugfs-driver-cmh  |  171 ++
 Documentation/ABI/testing/sysfs-driver-cmh    |   67 +
 Documentation/crypto/device_drivers/cmh.rst   |  340 +++
 Documentation/crypto/device_drivers/index.rst |    1 +
 .../bindings/crypto/rambus,cmh-v1030.yaml     |  144 ++
 .../devicetree/bindings/vendor-prefixes.yaml  |    2 +
 MAINTAINERS                                   |   13 +
 drivers/crypto/Kconfig                        |    1 +
 drivers/crypto/Makefile                       |    1 +
 drivers/crypto/cmh/Kconfig                    |   62 +
 drivers/crypto/cmh/Makefile                   |   30 +
 drivers/crypto/cmh/cmh_aes.c                  |  755 ++++++
 drivers/crypto/cmh/cmh_aes_aead.c             | 1013 ++++++++
 drivers/crypto/cmh/cmh_aes_cmac.c             |  476 ++++
 drivers/crypto/cmh/cmh_config.c               |  619 +++++
 drivers/crypto/cmh/cmh_debugfs.c              |  307 +++
 drivers/crypto/cmh/cmh_dma.c                  |  482 ++++
 drivers/crypto/cmh/cmh_key.c                  |  119 +
 drivers/crypto/cmh/cmh_main.c                 |  394 +++
 drivers/crypto/cmh/cmh_mqi.c                  |  344 +++
 drivers/crypto/cmh/cmh_rh.c                   | 1211 +++++++++
 drivers/crypto/cmh/cmh_sys.c                  |  376 +++
 drivers/crypto/cmh/cmh_sysfs.c                |  108 +
 drivers/crypto/cmh/cmh_txn.c                  | 2235 +++++++++++++++++
 drivers/crypto/cmh/include/cmh.h              |   24 +
 drivers/crypto/cmh/include/cmh_aes.h          |   24 +
 drivers/crypto/cmh/include/cmh_aes_abi.h      |   98 +
 drivers/crypto/cmh/include/cmh_ccp_abi.h      |  108 +
 drivers/crypto/cmh/include/cmh_config.h       |  105 +
 drivers/crypto/cmh/include/cmh_debugfs.h      |   93 +
 drivers/crypto/cmh/include/cmh_dma.h          |  249 ++
 drivers/crypto/cmh/include/cmh_drbg_abi.h     |   67 +
 drivers/crypto/cmh/include/cmh_eac_abi.h      |   44 +
 drivers/crypto/cmh/include/cmh_hc_abi.h       |  162 ++
 drivers/crypto/cmh/include/cmh_hcq_abi.h      |  222 ++
 drivers/crypto/cmh/include/cmh_key.h          |   73 +
 drivers/crypto/cmh/include/cmh_kic_abi.h      |   77 +
 drivers/crypto/cmh/include/cmh_mqi.h          |   35 +
 drivers/crypto/cmh/include/cmh_pke_abi.h      |  272 ++
 drivers/crypto/cmh/include/cmh_qse_abi.h      |  201 ++
 drivers/crypto/cmh/include/cmh_registers.h    |  161 ++
 drivers/crypto/cmh/include/cmh_rh.h           |   93 +
 drivers/crypto/cmh/include/cmh_sm3_abi.h      |   79 +
 drivers/crypto/cmh/include/cmh_sm4_abi.h      |  101 +
 drivers/crypto/cmh/include/cmh_sys.h          |  111 +
 drivers/crypto/cmh/include/cmh_sys_abi.h      |  148 ++
 drivers/crypto/cmh/include/cmh_sysfs.h        |   14 +
 drivers/crypto/cmh/include/cmh_txn.h          |  493 ++++
 drivers/crypto/cmh/include/cmh_vcq.h          |  288 +++
 49 files changed, 12613 insertions(+)
 create mode 100644 Documentation/ABI/testing/debugfs-driver-cmh
 create mode 100644 Documentation/ABI/testing/sysfs-driver-cmh
 create mode 100644 Documentation/crypto/device_drivers/cmh.rst
 create mode 100644 Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml
 create mode 100644 drivers/crypto/cmh/Kconfig
 create mode 100644 drivers/crypto/cmh/Makefile
 create mode 100644 drivers/crypto/cmh/cmh_aes.c
 create mode 100644 drivers/crypto/cmh/cmh_aes_aead.c
 create mode 100644 drivers/crypto/cmh/cmh_aes_cmac.c
 create mode 100644 drivers/crypto/cmh/cmh_config.c
 create mode 100644 drivers/crypto/cmh/cmh_debugfs.c
 create mode 100644 drivers/crypto/cmh/cmh_dma.c
 create mode 100644 drivers/crypto/cmh/cmh_key.c
 create mode 100644 drivers/crypto/cmh/cmh_main.c
 create mode 100644 drivers/crypto/cmh/cmh_mqi.c
 create mode 100644 drivers/crypto/cmh/cmh_rh.c
 create mode 100644 drivers/crypto/cmh/cmh_sys.c
 create mode 100644 drivers/crypto/cmh/cmh_sysfs.c
 create mode 100644 drivers/crypto/cmh/cmh_txn.c
 create mode 100644 drivers/crypto/cmh/include/cmh.h
 create mode 100644 drivers/crypto/cmh/include/cmh_aes.h
 create mode 100644 drivers/crypto/cmh/include/cmh_aes_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_ccp_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_config.h
 create mode 100644 drivers/crypto/cmh/include/cmh_debugfs.h
 create mode 100644 drivers/crypto/cmh/include/cmh_dma.h
 create mode 100644 drivers/crypto/cmh/include/cmh_drbg_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_eac_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_hc_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_hcq_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_key.h
 create mode 100644 drivers/crypto/cmh/include/cmh_kic_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_mqi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_pke_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_qse_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_registers.h
 create mode 100644 drivers/crypto/cmh/include/cmh_rh.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sm3_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sm4_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sys.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sys_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sysfs.h
 create mode 100644 drivers/crypto/cmh/include/cmh_txn.h
 create mode 100644 drivers/crypto/cmh/include/cmh_vcq.h

---

The CMH driver was first posted as a single series; it is now
split into smaller, independently reviewable series per maintainer
feedback. Earlier single-series postings:
v1: https://lore.kernel.org/linux-crypto/[email protected]/
v2: https://lore.kernel.org/linux-crypto/[email protected]/
v3: https://lore.kernel.org/linux-crypto/[email protected]/
v4: https://lore.kernel.org/linux-crypto/[email protected]/
v5: https://lore.kernel.org/linux-crypto/[email protected]/
base-commit: 9695df3b1db4ac4534274d38ee16e3b9b0bf910e

Signature · 1 line
2.43.7
#1 lore raw

PATCH 1/5 dt-bindings: crypto: add Rambus CryptoManager Hub

Add device tree binding schema for the Rambus CryptoManager Hub (CMH) hardware crypto accelerator. The binding describes the parent SoC-level node with its SIC register region and one queue@N child node per mailbox the host owns, each carrying a reg (mailbox instance index), an optional interrupt, VCQ ring geometry (rambus,num-slots / rambus,slot-stride-bytes) and a rambus,cores affinity list. Which crypto cores are present is discovered from the SIC CORE_ENABLE register at probe, not described in the device tree.

Register the 'rambus' vendor prefix for Rambus Inc.

---
 .../bindings/crypto/rambus,cmh-v1030.yaml     | 144 ++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 2 files changed, 146 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml
Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml new file +144 -0
new file mode 100644
index 000000000000..fb05cc636df6
@@ -0,0 +1,144 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/crypto/rambus,cmh-v1030.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rambus CryptoManager Hub (CMH) Hardware Crypto Accelerator
+
+maintainers:
+  - Alex Ousherovitch <[email protected]>
+  - Saravanakrishnan Krishnamoorthy <[email protected]>
+  - Joel Wittenauer <[email protected]>
+
+description: |
+  The Rambus CryptoManager Hub (CMH) is a hardware cryptographic accelerator
+  accessed via a mailbox-based VCQ (Virtual Command Queue) interface.  The
+  host writes VCQ command sequences into per-mailbox DMA queue buffers and
+  rings a doorbell; the CMH eSW processes them and signals completion via
+  interrupt.
+
+  The management host statically partitions the hardware mailboxes across
+  the SoC's host interfaces at integration time; the set of mailboxes a
+  given host owns is therefore fixed and not runtime-discoverable (a
+  mailbox locked to a host reads as unavailable in the SIC availability
+  register).  Each owned mailbox is described by a child node.  Which
+  crypto cores are present is a fixed silicon-build property indicated by
+  the SIC CORE_ENABLE register, so cores are not described in the device
+  tree.  Clock and reset are owned by the management host; a node
+  describing a non-management host has no clock or reset provider of its
+  own, so clocks and reset-gpios are optional.
+
+  CMH gates access to a locked mailbox by a hardware HOST ID presented on
+  the bus with every access, permitting only the owning host's ID.  An
+  integration must present a single, stable HOST ID for all accesses to a
+  given mailbox, independent of the issuing CPU (relevant on SMP hosts
+  whose interconnect encodes the issuing CPU in the HOST ID).
+
+properties:
+  compatible:
+    items:
+      - not: {}
+        description: SoC-specific compatible, e.g. vendor,soc-cmh
+      - const: rambus,cmh-v1030
+
+  reg:
+    maxItems: 1
+    description:
+      SIC (System Interface Controller) MMIO region.  The registers of
+      mailbox instance N are at offset N * 0x1000 within this region.
+
+  clocks:
+    minItems: 1
+    maxItems: 3
+    description:
+      The "core" functional clock, and optionally the half-rate "core-div2"
+      clock (present only on configurations with side-channel-protected
+      cores) and/or the "rt" real-time tick clock.  See clock-names for the
+      valid combinations.
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: core
+      - enum: [core-div2, rt]
+      - const: rt
+
+  reset-gpios:
+    maxItems: 1
+    description:
+      Host-controlled reset for the CryptoManager Hub.  The hub has two
+      external, active-low reset inputs -- a power-on reset and a hard
+      reset; where a board routes one of them to a host GPIO, that line is
+      described here.
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^queue@[0-9a-f]+$":
+    type: object
+    description:
+      One node per hardware mailbox (VCQ command queue) this host owns.
+      The set of owned mailboxes is fixed by the management host at
+      integration time and enumerated here.
+    properties:
+      reg:
+        items:
+          - maximum: 63
+        description:
+          0-based mailbox instance index (0..63).  The instance's
+          registers are at reg * 0x1000 within the SIC region.
+
+      interrupts:
+        maxItems: 1
+        description: Completion/error interrupt for this mailbox.
+
+      rambus,num-slots:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192,
+               16384, 32768]
+        default: 64
+        description:
+          Number of VCQ ring slots for this mailbox's command queue in
+          host DMA memory.  This is a per-board, per-mailbox host-memory
+          ring geometry -- boards built around the same SoC (hence the
+          same compatible) may use different ring sizes, so it is
+          described per mailbox rather than derived from the compatible.
+
+      rambus,slot-stride-bytes:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [128, 256, 512, 1024]
+        default: 512
+        description:
+          Stride in bytes between consecutive VCQ ring slots for this
+          mailbox's command queue.  Like rambus,num-slots this is a
+          per-board host-memory ring geometry, not derived from the
+          compatible.
+
+      rambus,cores:
+        $ref: /schemas/types.yaml#/definitions/string-array
+        items:
+          enum: [hc, aes, sm4, sm3, hcq, qse, pke, ccp]
+        description: |
+          Core-affinity list: the crypto cores whose work is dispatched to
+          this mailbox.  A core may appear on at most one mailbox.  Cores
+          not listed on any mailbox are load-balanced across all mailboxes.
+          Optional (default: none -- the mailbox only serves the
+          load-balanced pool).
+
+    required:
+      - reg
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
+additionalProperties: false
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index ba2002969373..364e53c31045 100644
@@ -1397,6 +1397,8 @@ patternProperties:
     description: RaidSonic Technology GmbH
   "^ralink,.*":
     description: Mediatek/Ralink Technology Corp.
+  "^rambus,.*":
+    description: Rambus Inc.
   "^ramtron,.*":
     description: Ramtron International
   "^raspberrypi,.*":
Signature · 1 line
2.43.7
#2 lore raw

Re: [PATCH 1/5] dt-bindings: crypto: add Rambus CryptoManager Hub

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] dt-bindings: impossible 'not: {}' compatible constraint and missing examples --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: impossible 'not: {}' compatible constraint and missing examples --

commit 113cff11f8b766425bbb8e592b3c6da3fc635bbd
Author: Alex Ousherovitch <[email protected]>

dt-bindings: crypto: add Rambus CryptoManager Hub

Add device tree binding schema for the Rambus CryptoManager Hub (CMH) hardware crypto accelerator. The binding describes the parent SoC-level node with its SIC register region and one queue@N child node per mailbox the host owns.

Quoted 6 lines
Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml new file +0 -0
new file mode 100644
index 0000000000000..fb05cc636df66
@@ -0,0 +1,144 @@

[ ... ]

Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml line 42

Quoted 5 lines
Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml new file +5 -0
+properties:
+  compatible:
+    items:
+      - not: {}
+        description: SoC-specific compatible, e.g. vendor,soc-cmh

[Severity: Low]
Will this unconditionally reject all inputs? Since the empty schema {} matches any value, the not: {} constraint under properties:compatible will fail validation for any string.

Usually not: {} is used within a oneOf fallback branch to enforce SoC-specific compatibles, but there are no valid alternatives provided here.

Quoted 1 line

+ - const: rambus,cmh-v1030

[ ... ]

Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml line 144

Quoted 7 lines
Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml new file +7 -0
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
+additionalProperties: false

[Severity: Low]
Is there an examples section missing from the end of this file?

Without an examples section, make dt_binding_check won't instantiate any examples to validate against the schema. This omission avoids checking the schema and seems to hide the fact that the not: {} constraint on the compatible string makes it impossible to validate.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

Re: [PATCH 1/5] dt-bindings: crypto: add Rambus CryptoManager Hub

In reply to Alex Ousherovitch
Quoted 9 lines · Alex Ousherovitch

Add device tree binding schema for the Rambus CryptoManager Hub (CMH) hardware crypto accelerator. The binding describes the parent SoC-level node with its SIC register region and one queue@N child node per mailbox the host owns, each carrying a reg (mailbox instance index), an optional interrupt, VCQ ring geometry (rambus,num-slots / rambus,slot-stride-bytes) and a rambus,cores affinity list. Which crypto cores are present is discovered from the SIC CORE_ENABLE register at probe, not described in the device tree.

Hm? You already sent it 5 times, so how this can be v1? Did you just ignore entire feedback you receive? Where is any explanation of that?

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH 1/5] dt-bindings: crypto: add Rambus CryptoManager Hub

In reply to Alex Ousherovitch
Quoted 9 lines · Alex Ousherovitch

Add device tree binding schema for the Rambus CryptoManager Hub (CMH) hardware crypto accelerator. The binding describes the parent SoC-level node with its SIC register region and one queue@N child node per mailbox the host owns, each carrying a reg (mailbox instance index), an optional interrupt, VCQ ring geometry (rambus,num-slots / rambus,slot-stride-bytes) and a rambus,cores affinity list. Which crypto cores are present is discovered from the SIC CORE_ENABLE register at probe, not described in the device tree.

Quoted 5 lines

Register the 'rambus' vendor prefix for Rambus Inc.

So this v6 still has wrong DCO, thus you just ignored feedback you received on v3.

NAK

Best regards,
Krzysztof

#5 lore raw

RE: [PATCH 1/5] dt-bindings: crypto: add Rambus CryptoManager Hub

Quoted 8 lines · Krzysztof Kozlowski
Quoted 3 lines

So this v6 still has wrong DCO, thus you just ignored feedback you received on v3.

NAK

You're right, and sorry -- that slipped. The chain was ordered for Krishnan submitting; I am the one sending these, so my Signed-off-by has to be last. The next revision uses:

On the versioning and changelog you are right as well, and I had acknowledged the same to Conor: I restarted the numbering when I split the single series into smaller ones, which I should not have. The next revision of this chunk is v6 and carries a "since v5" changelog. It is the continuation of the v1-v5 series rather than a new submission, which the cover's lineage links will make explicit.

Thanks,
Alex

#6 lore raw

PATCH 2/5 crypto: cmh - add core platform driver

In reply to Alex Ousherovitch

Add the Rambus CryptoManager Hub (CMH) hardware crypto accelerator core platform driver. This patch provides:

- Platform driver registration and probe/remove lifecycle
- Hardware configuration and core discovery
- Mailbox Queue Interface (MQI) for VCQ command submission
- Transaction manager with async completion and backlog support
- Result handler with threaded-IRQ completion
- DMA buffer management
- Debugfs instrumentation (when CONFIG_CRYPTO_DEV_CMH_DEBUG=y)
- Sysfs attributes (fw_version, hw_version, boot_status, mbx_available, mbx_count)
- Kconfig and Makefile integration

No crypto algorithms are registered yet -- those follow in subsequent patches.

The driver communicates with the hardware via a mailbox-based VCQ (Virtual Command Queue) interface. Each crypto operation is packed into VCQ command entries, submitted to a mailbox, and completed asynchronously via interrupt.

MODULE_IMPORT_NS(CRYPTO_INTERNAL) imports two symbols:

- crypto_cipher_setkey() [crypto/cipher.c, EXPORT_SYMBOL_NS_GPL]
- crypto_cipher_encrypt_one() [crypto/cipher.c, EXPORT_SYMBOL_NS_GPL]

These are the single-block cipher API used for the CCM empty-input tag computation software fallback (2 ECB encryptions + XOR). No public wrapper exists; this is the same pattern used by in-tree crypto/ccm.c.

---
 Documentation/ABI/testing/debugfs-driver-cmh  |  171 ++
 Documentation/ABI/testing/sysfs-driver-cmh    |   67 +
 Documentation/crypto/device_drivers/cmh.rst   |  340 +++
 Documentation/crypto/device_drivers/index.rst |    1 +
 drivers/crypto/Kconfig                        |    1 +
 drivers/crypto/Makefile                       |    1 +
 drivers/crypto/cmh/Kconfig                    |   62 +
 drivers/crypto/cmh/Makefile                   |   25 +
 drivers/crypto/cmh/cmh_config.c               |  619 +++++
 drivers/crypto/cmh/cmh_debugfs.c              |  307 +++
 drivers/crypto/cmh/cmh_dma.c                  |  482 ++++
 drivers/crypto/cmh/cmh_main.c                 |  369 +++
 drivers/crypto/cmh/cmh_mqi.c                  |  344 +++
 drivers/crypto/cmh/cmh_rh.c                   | 1211 +++++++++
 drivers/crypto/cmh/cmh_sysfs.c                |  108 +
 drivers/crypto/cmh/cmh_txn.c                  | 2235 +++++++++++++++++
 drivers/crypto/cmh/include/cmh.h              |   24 +
 drivers/crypto/cmh/include/cmh_aes_abi.h      |   98 +
 drivers/crypto/cmh/include/cmh_ccp_abi.h      |  108 +
 drivers/crypto/cmh/include/cmh_config.h       |  105 +
 drivers/crypto/cmh/include/cmh_debugfs.h      |   93 +
 drivers/crypto/cmh/include/cmh_dma.h          |  249 ++
 drivers/crypto/cmh/include/cmh_drbg_abi.h     |   67 +
 drivers/crypto/cmh/include/cmh_eac_abi.h      |   44 +
 drivers/crypto/cmh/include/cmh_hc_abi.h       |  162 ++
 drivers/crypto/cmh/include/cmh_hcq_abi.h      |  222 ++
 drivers/crypto/cmh/include/cmh_kic_abi.h      |   77 +
 drivers/crypto/cmh/include/cmh_mqi.h          |   35 +
 drivers/crypto/cmh/include/cmh_pke_abi.h      |  272 ++
 drivers/crypto/cmh/include/cmh_qse_abi.h      |  201 ++
 drivers/crypto/cmh/include/cmh_registers.h    |  161 ++
 drivers/crypto/cmh/include/cmh_rh.h           |   93 +
 drivers/crypto/cmh/include/cmh_sm3_abi.h      |   79 +
 drivers/crypto/cmh/include/cmh_sm4_abi.h      |  101 +
 drivers/crypto/cmh/include/cmh_sys_abi.h      |  148 ++
 drivers/crypto/cmh/include/cmh_sysfs.h        |   14 +
 drivers/crypto/cmh/include/cmh_txn.h          |  493 ++++
 drivers/crypto/cmh/include/cmh_vcq.h          |  288 +++
 38 files changed, 9477 insertions(+)
 create mode 100644 Documentation/ABI/testing/debugfs-driver-cmh
 create mode 100644 Documentation/ABI/testing/sysfs-driver-cmh
 create mode 100644 Documentation/crypto/device_drivers/cmh.rst
 create mode 100644 drivers/crypto/cmh/Kconfig
 create mode 100644 drivers/crypto/cmh/Makefile
 create mode 100644 drivers/crypto/cmh/cmh_config.c
 create mode 100644 drivers/crypto/cmh/cmh_debugfs.c
 create mode 100644 drivers/crypto/cmh/cmh_dma.c
 create mode 100644 drivers/crypto/cmh/cmh_main.c
 create mode 100644 drivers/crypto/cmh/cmh_mqi.c
 create mode 100644 drivers/crypto/cmh/cmh_rh.c
 create mode 100644 drivers/crypto/cmh/cmh_sysfs.c
 create mode 100644 drivers/crypto/cmh/cmh_txn.c
 create mode 100644 drivers/crypto/cmh/include/cmh.h
 create mode 100644 drivers/crypto/cmh/include/cmh_aes_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_ccp_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_config.h
 create mode 100644 drivers/crypto/cmh/include/cmh_debugfs.h
 create mode 100644 drivers/crypto/cmh/include/cmh_dma.h
 create mode 100644 drivers/crypto/cmh/include/cmh_drbg_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_eac_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_hc_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_hcq_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_kic_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_mqi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_pke_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_qse_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_registers.h
 create mode 100644 drivers/crypto/cmh/include/cmh_rh.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sm3_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sm4_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sys_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sysfs.h
 create mode 100644 drivers/crypto/cmh/include/cmh_txn.h
 create mode 100644 drivers/crypto/cmh/include/cmh_vcq.h
Documentation/ABI/testing/debugfs-driver-cmh new file +171 -0
new file mode 100644
index 000000000000..21c2d0fbb171
@@ -0,0 +1,171 @@
+What:		/sys/kernel/debug/cmh/mbx<N>/vcqs_submitted
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RO) Total number of VCQ command entries submitted to
+		mailbox N since the driver was loaded.
+
+What:		/sys/kernel/debug/cmh/mbx<N>/vcqs_completed
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RO) Total number of VCQ command completions received
+		from mailbox N.
+
+What:		/sys/kernel/debug/cmh/mbx<N>/vcqs_errors
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RO) Total number of error completions received from
+		mailbox N.
+
+What:		/sys/kernel/debug/cmh/mbx<N>/queue_full_count
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RO) Number of times the transaction manager skipped
+		mailbox N because its in-flight queue was full.
+
+What:		/sys/kernel/debug/cmh/mbx<N>/max_queue_depth
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RO) High-water mark of in-flight transactions on
+		mailbox N.
+
+What:		/sys/kernel/debug/cmh/mbx<N>/inject_abort
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(WO) Write any value to inject an MBX_COMMAND_ABORT on
+		mailbox N.  The abort triggers error-IRQ handling that
+		completes all in-flight transactions with -EIO and then
+		issues MBX_COMMAND_RESTART to resume the mailbox.
+		Only available when CONFIG_CRYPTO_DEV_CMH_DEBUG is enabled.
+
+What:		/sys/kernel/debug/cmh/mbx<N>/force_drain
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(WO) Write any value to unconditionally FLUSH and drain
+		all pending transactions on mailbox N, completing each
+		with -ECANCELED, and reset all recovery bookkeeping
+		(including the wedged flag).  The mailbox is re-enabled
+		for new work immediately; no hardware health verification
+		is performed.  Use as a last-resort recovery when the eSW
+		is unresponsive and normal ABORT/RESTART escalation has
+		not recovered the mailbox.
+		Only available when CONFIG_CRYPTO_DEV_CMH_DEBUG is enabled.
+
+What:		/sys/kernel/debug/cmh/tm/cmq_posts
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RO) Total number of cmh_tm_post_command() calls (one
+		per crypto request submitted to the transaction manager).
+
+What:		/sys/kernel/debug/cmh/tm/cmq_depth_max
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RO) High-water mark of the command queue length.
+
+What:		/sys/kernel/debug/cmh/tm/cmq_eagain_count
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RO) Number of times the command queue was full and
+		returned -EAGAIN to the caller.
+
+What:		/sys/kernel/debug/cmh/tm/backoff_count
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RO) Number of times the transaction manager backed off
+		because all mailbox queues were full.
+
+What:		/sys/kernel/debug/cmh/tm/async_timeout_count
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RO) Number of async crypto requests that timed out
+		waiting for hardware completion.
+
+What:		/sys/kernel/debug/cmh/config/async_timeout_ms
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RW) Async request timeout in milliseconds.  On timeout
+		the driver issues MBX_COMMAND_ABORT; if the eSW is
+		unresponsive, the watchdog escalates through RESTART,
+		FLUSH, and force-drain to bound D-state duration.
+
+What:		/sys/kernel/debug/cmh/config/vcq_timeout_ms
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RW) VCQ command timeout in milliseconds.
+
+What:		/sys/kernel/debug/cmh/config/slow_op_timeout_ms
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RW) Slow-operation timeout in milliseconds.  Used for
+		operations known to take longer (e.g. RSA key generation,
+		PQC key generation).
+
+What:		/sys/kernel/debug/cmh/config/drain_timeout_ms
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RW) Drain timeout in milliseconds.  Maximum time to wait
+		for all in-flight transactions to complete during driver
+		removal or suspend.
+
+What:		/sys/kernel/debug/cmh/config/watchdog_ms
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RW) Result-handler watchdog interval in milliseconds.
+		Detects missed IRQs, stuck mailboxes, and abort-stall
+		conditions.  Clamped to a 10 ms minimum.
+
+What:		/sys/kernel/debug/cmh/config/drbg_timeout_ms
+Date:		June 2026
+KernelVersion:	7.1
+Contact:	[email protected]
+Description:
+		(RW) DRBG self-seed timeout in milliseconds.
+
+What:		/sys/kernel/debug/cmh/config/cmq_max_depth
+Date:		August 2026
+KernelVersion:	7.2
+Contact:	[email protected]
+Description:
+		(RW) Maximum number of pending commands in the central
+		Command Message Queue.
+
+What:		/sys/kernel/debug/cmh/config/backlog_max_depth
+Date:		August 2026
+KernelVersion:	7.2
+Contact:	[email protected]
+Description:
+		(RW) Maximum depth of the backlog queue for
+		CRYPTO_TFM_REQ_MAY_BACKLOG requests (0 disables backlog).
Documentation/ABI/testing/sysfs-driver-cmh new file +67 -0

67 lines not on this page · raw message

Documentation/crypto/device_drivers/cmh.rst new file +340 -0

340 lines not on this page · raw message

Documentation/crypto/device_drivers/index.rst +1 -0
index c81d311ac61b..c0247fc97bf8 100644
@@ -6,4 +6,5 @@ Hardware Device Driver Specific Documentation
 .. toctree::
    :maxdepth: 1
 
+   cmh
    octeontx2
drivers/crypto/Kconfig +1 -0
index 0189dfdcbbe1..9716b85b8e4b 100644
@@ -831,4 +831,5 @@ source "drivers/crypto/starfive/Kconfig"
 source "drivers/crypto/inside-secure/eip93/Kconfig"
 source "drivers/crypto/ti/Kconfig"
 
+source "drivers/crypto/cmh/Kconfig"
 endif # CRYPTO_HW
drivers/crypto/Makefile +1 -0
index 2c33b83f3cfa..dae0d5f0500d 100644
@@ -46,3 +46,4 @@ obj-y += intel/
 obj-y += starfive/
 obj-y += cavium/
 obj-y += ti/
+obj-$(CONFIG_CRYPTO_DEV_CMH) += cmh/
drivers/crypto/cmh/Kconfig new file +62 -0

62 lines not on this page · raw message

drivers/crypto/cmh/Makefile new file +25 -0
new file mode 100644
index 000000000000..742e65e3917e
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the Rambus CryptoManager Hub (CMH) hardware crypto accelerator driver.
+#
+
+obj-$(CONFIG_CRYPTO_DEV_CMH) += cmh.o
+
+cmh-y := \
+	cmh_main.o \
+	cmh_config.o \
+	cmh_mqi.o \
+	cmh_txn.o \
+	cmh_rh.o \
+	cmh_dma.o \
+	cmh_sysfs.o
+
+ccflags-y += -I$(src)/include
+
+# Suppress -Woverride-init for the [0 ... N] = -1 range-initializer pattern
+# (standard kernel idiom for sparse lookup tables with a default value).
+CFLAGS_cmh_config.o += -Wno-override-init
+
+# Debug instrumentation: per-mailbox debugfs counters.
+# cmh_debugfs.o is linked into the composite cmh.o (same tristate).
+cmh-$(CONFIG_CRYPTO_DEV_CMH_DEBUG) += cmh_debugfs.o
drivers/crypto/cmh/cmh_config.c new file +619 -0

619 lines not on this page · raw message

drivers/crypto/cmh/cmh_debugfs.c new file +307 -0

307 lines not on this page · raw message

drivers/crypto/cmh/cmh_dma.c new file +482 -0

482 lines not on this page · raw message

drivers/crypto/cmh/cmh_main.c new file +369 -0

369 lines not on this page · raw message

drivers/crypto/cmh/cmh_mqi.c new file +344 -0

344 lines not on this page · raw message

drivers/crypto/cmh/cmh_rh.c new file +1211 -0

200 lines not on this page · raw message

drivers/crypto/cmh/cmh_sysfs.c new file +108 -0

108 lines not on this page · raw message

drivers/crypto/cmh/cmh_txn.c new file +2235 -0

2,235 lines not on this page · raw message

drivers/crypto/cmh/include/cmh.h new file +24 -0
new file mode 100644
index 000000000000..97a7bc764d9b

Lines of this file are not shown. View the raw message.

drivers/crypto/cmh/include/cmh_aes_abi.h new file +98 -0

98 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_ccp_abi.h new file +108 -0

108 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_config.h new file +105 -0

105 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_debugfs.h new file +93 -0

93 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_dma.h new file +249 -0

249 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_drbg_abi.h new file +67 -0

67 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_eac_abi.h new file +44 -0

44 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_hc_abi.h new file +162 -0

162 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_hcq_abi.h new file +222 -0

222 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_kic_abi.h new file +77 -0

77 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_mqi.h new file +35 -0
new file mode 100644
index 000000000000..202d52b86fb8

Lines of this file are not shown. View the raw message.

drivers/crypto/cmh/include/cmh_pke_abi.h new file +272 -0

272 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_qse_abi.h new file +201 -0

201 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_registers.h new file +161 -0

161 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_rh.h new file +93 -0

93 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_sm3_abi.h new file +79 -0

79 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_sm4_abi.h new file +101 -0

101 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_sys_abi.h new file +148 -0

148 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_sysfs.h new file +14 -0
new file mode 100644
index 000000000000..864cf1c8fa00

Lines of this file are not shown. View the raw message.

drivers/crypto/cmh/include/cmh_txn.h new file +493 -0

493 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_vcq.h new file +288 -0

288 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.43.7

Part of the diff is not shown here. View the raw message.

#7 lore raw

Re: [PATCH 2/5] crypto: cmh - add core platform driver

Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider: - [Critical] cmh: Race between asynchronous MBX_COMMAND_FLUSH and new TM submissions - [Critical] cmh…

Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider:
- [Critical] cmh: Race between asynchronous MBX_COMMAND_FLUSH and new TM submissions
- [Critical] cmh: TOCTOU race in sync timeout skips MBX_COMMAND_ABORT causing DMA corruption
- [High] cmh: Missing timeout_jiffies init for sync submissions permanently wedges mailbox
- [High] dma: Memory corruption risk when orphan tracking allocation fails
- [Medium] cmh: Missing R_MBX_HOST_INFO write during MBX initialization
--

commit c7930298939b6ced18687e375218ef4b78b1e3fe
Author: Alex Ousherovitch <[email protected]>

crypto: cmh - add core platform driver

Add the Rambus CryptoManager Hub (CMH) hardware crypto accelerator core platform driver. The driver manages hardware configuration, VCQ command submission, and asynchronous completions.

Quoted 3 lines
drivers/crypto/cmh/cmh_dma.c +0 -0

[ ... ]

drivers/crypto/cmh/cmh_dma.c

Quoted 8 lines
drivers/crypto/cmh/cmh_dma.c +0 -0
@@ -424,4 +424,4 @@ void cmh_dma_free_out(void *buf, dma_addr_t dma, size_t len,
 		/* Rare: cannot park without a descriptor -- best-effort free. */
 		dev_warn_ratelimited(cmh_dev(),
 				     "dma: park alloc failed, freeing output buffer\n");
 	}
drivers/crypto/cmh/cmh_dma.c +0 -0
 	cmh_dma_unmap_single(dma, len, dir);
 	kfree_sensitive(buf);

[Severity: High]
Does this fallback path risk a DMA memory corruption regression if the allocation fails?

Because the hardware lacks a DMA-stop primitive, it may still be actively writing to this physical address. Freeing the memory back to the slab allocator could allow it to be reassigned to other kernel structures while the hardware is still writing to it. Is it safer to intentionally leak the memory here to prevent corruption?

Quoted 3 lines
drivers/crypto/cmh/cmh_mqi.c +0 -0

[ ... ]

drivers/crypto/cmh/cmh_mqi.c

Quoted 9 lines
drivers/crypto/cmh/cmh_mqi.c +0 -0
@@ -201,4 +201,4 @@ static int cmh_mbx_setup_one(struct cmh_mbx_config *mbx)
 	/*
 	 * Step 6: Readback verify critical registers.
 	 * HOST_INFO is deliberately deferred to after verification -- writing
 	 * it tells the CMH eSW "MBX is ready" and the CMH eSW may inspect
drivers/crypto/cmh/cmh_mqi.c +0 -0
 	 * (and clear) the queue registers immediately.
 	 */
 	ret = cmh_verify_reg(base, R_MBX_QUEUE_LO, addr_lo,
 			     "QUEUE_LO", mbx->instance);

[Severity: Medium]
The comment mentions writing to the HOST_INFO register to signal to the embedded software that the mailbox is ready. However, it looks like the driver never actually performs the write to this register after the verification steps, and only writes MBX_COMMAND_RUN.

Will this leave the embedded software unaware that the mailbox is active, causing a regression on hardware configurations that depend on this signal?

Quoted 3 lines
drivers/crypto/cmh/cmh_rh.c +0 -0

[ ... ]

drivers/crypto/cmh/cmh_rh.c

Quoted 12 lines
drivers/crypto/cmh/cmh_rh.c +0 -0
@@ -429,4 +429,4 @@ static void cmh_rh_process_mbx(u32 mbx_idx, u32 new_head, u32 irq_bits)
 		if (txn && txn->first_vcq_id != txn->last_vcq_id) {
 			dev_warn_ratelimited(cmh_dev(),
 					     "rh: mbx[%u] multi-VCQ error vcq=%u..%u -- FLUSH+drain\n",
 					     mbx_idx, txn->first_vcq_id,
drivers/crypto/cmh/cmh_rh.c +0 -0
 					     txn->last_vcq_id);
 			cmh_rh_stat_inc_errors(mbx_idx);
 			cmh_reg_write32(MBX_IRQ_MASK, base, R_MBX_INTERRUPT);
 			cmh_reg_write32(MBX_COMMAND_FLUSH, base, R_MBX_COMMAND);
 			cmh_rh_poke_tail(base);
 			cmh_rh_drain_mbx(mbx_idx, error);
 			return;

[Severity: High]
Does this sequence introduce a regression involving a race condition with the transaction manager?

The hardware flush command appears to be processed asynchronously by the embedded software, but the software queue is drained immediately without waiting for the flush to complete or marking the mailbox as offline.

Could the transaction manager thread concurrently acquire the dispatch lock, write a new transaction into the ring, and advance the hardware tail doorbell? If so, when the embedded software eventually processes the flush, it might discard the new queue state. The response handler could then interpret the advanced head pointer as a successful execution, completing discarded transactions with no error.

This same pattern also occurs in cmh_rh_watchdog_fn() and cmh_tm_flush_mbx().

Quoted 3 lines
drivers/crypto/cmh/cmh_txn.c +0 -0

[ ... ]

drivers/crypto/cmh/cmh_txn.c

Quoted 10 lines
drivers/crypto/cmh/cmh_txn.c +0 -0
@@ -1500,4 +1500,4 @@ int cmh_tm_submit_sync_tmo(struct vcq_cmd *vcq_cmds, u32 vcq_count,
 	msg->command_id = vcq_cmds[1].id;  /* first real command's ID */
 	msg->vcq_count  = vcq_count;
 	msg->num_vcqs   = num_vcqs;
 	msg->target_mbx = target_mbx;
drivers/crypto/cmh/cmh_txn.c +0 -0
 	msg->actual_mbx = -1;
 	msg->first_vcq_id = U32_MAX;
 	msg->complete   = cmh_sync_complete;
 	msg->completion_data = sync;
 	refcount_set(&msg->refs, 2);       /* waiter + TM subsystem */

[Severity: High]
Is the timeout_jiffies field intentionally left uninitialized for synchronous submissions?

Since the command_msg is allocated with kzalloc_obj, msg->timeout_jiffies remains zero. The transaction manager thread skips arming the timeout timer when this field is zero.

Because the watchdog's abort-stall detector explicitly relies on a transaction reaching the TXN_TIMED_OUT state, which is only set by the timer callback, could a stalled synchronous request remain in the TXN_INFLIGHT state indefinitely and permanently stall the mailbox if the hardware wedges?

[ ... ]

Quoted 31 lines
drivers/crypto/cmh/cmh_txn.c +0 -0
@@ -1546,4 +1546,4 @@ int cmh_tm_submit_sync_tmo(struct vcq_cmd *vcq_cmds, u32 vcq_count,
 			 * cmh_rh_abort_mbx() serialises the write under
 			 * rh_process_lock, preventing clobber of a
 			 * concurrent RESTART/FLUSH from the watchdog.
 			 */
drivers/crypto/cmh/cmh_txn.c +0 -0
 			s32 abrt_mbx = READ_ONCE(msg->actual_mbx);
 
 			/*
 			 * Only ABORT if our VCQ is the one currently at the
 			 * mailbox HEAD.  ABORT stops whatever executes at
 			 * HEAD, so aborting while a different (older,
 			 * possibly long-running) transaction is at HEAD would
 			 * kill an unrelated request.  If ours is queued behind
 			 * it, the HW has not started ours yet -- leave it to
 			 * the completion wait / watchdog rather than abort
 			 * someone else.
 			 */
 			if (abrt_mbx >= 0 &&
 			    (u32)abrt_mbx < tm.cfg->mbx_count) {
 				void __iomem *abase =
 					tm.cfg->mailboxes[abrt_mbx].reg_base;
 				u32 head = cmh_reg_read32(abase,
 							  R_MBX_QUEUE_HEAD);
 
 				if (READ_ONCE(msg->first_vcq_id) == head) {
 					dev_warn(cmh_dev(),
 						 "tm: aborting mbx[%d] cmd=0x%08x\n",
 						 abrt_mbx, msg->command_id);
 					cmh_rh_abort_mbx((u32)abrt_mbx);
 				}
 			}

drivers/crypto/cmh/cmh_txn.c

Quoted 10 lines
drivers/crypto/cmh/cmh_txn.c +0 -0
 
 			/*
 			 * Wait for the RH completion (ABORT triggers
 			 * MBX_ERROR_IRQ within microseconds).  Fixed
 			 * 5 s ceiling -- not configurable because if
 			 * ABORT doesn't complete in this window the
 			 * HW is wedged and more waiting won't help.
 			 */
 			left = wait_for_completion_timeout(&sync->done,
 							   5 * HZ);

[Severity: High]
Does reading msg->actual_mbx here create a race condition with the transaction manager?

If the transaction manager thread has dequeued the message but is preempted before setting msg->actual_mbx and submitting it to the hardware, the cancellation attempt will fail because the message is no longer on the list. The waiting thread will then read the transient -1 value for actual_mbx.

Could this cause the waiter to completely skip issuing the abort command and proceed to free its DMA buffers after the 5-second wait? If the transaction manager thread later wakes up and submits the request to the hardware, the hardware might write crypto output directly into the freed DMA buffers, causing a memory corruption regression.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#8 lore raw

Re: [PATCH 2/5] crypto: cmh - add core platform driver

In reply to Alex Ousherovitch
Quoted 14 lines · Alex Ousherovitch

Add the Rambus CryptoManager Hub (CMH) hardware crypto accelerator core platform driver. This patch provides:

- Platform driver registration and probe/remove lifecycle
- Hardware configuration and core discovery
- Mailbox Queue Interface (MQI) for VCQ command submission
- Transaction manager with async completion and backlog support
- Result handler with threaded-IRQ completion
- DMA buffer management
- Debugfs instrumentation (when CONFIG_CRYPTO_DEV_CMH_DEBUG=y)
- Sysfs attributes (fw_version, hw_version, boot_status, mbx_available, mbx_count)
- Kconfig and Makefile integration

Quoted 3 lines

No crypto algorithms are registered yet -- those follow in subsequent patches.

Implement feedback you already received on v1, v2, v3, v4 and v5.

Best regards,
Krzysztof

#9 lore raw

PATCH 3/5 crypto: cmh - add key/datastore infrastructure

In reply to Alex Ousherovitch

Add the CMH key and datastore (system object) layer shared by the algorithm drivers. cmh_sys.c manages CMH system objects (allocate and free datastore slots); cmh_key.c stages a raw key into a per-transform context and DMA-maps it for the lifetime of the transform.

These are used by the symmetric, hash/MAC and asymmetric algorithm drivers that follow, and by the /dev/cmh_mgmt ioctl device. No crypto API algorithm is registered by this patch.

---
 drivers/crypto/cmh/Makefile          |   4 +-
 drivers/crypto/cmh/cmh_key.c         | 119 +++++++++
 drivers/crypto/cmh/cmh_sys.c         | 376 +++++++++++++++++++++++++++
 drivers/crypto/cmh/include/cmh_key.h |  73 ++++++
 drivers/crypto/cmh/include/cmh_sys.h | 111 ++++++++
 5 files changed, 682 insertions(+), 1 deletion(-)
 create mode 100644 drivers/crypto/cmh/cmh_key.c
 create mode 100644 drivers/crypto/cmh/cmh_sys.c
 create mode 100644 drivers/crypto/cmh/include/cmh_key.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sys.h
drivers/crypto/cmh/Makefile +3 -1
index 742e65e3917e..485247405cb2 100644
@@ -12,7 +12,9 @@ cmh-y := \
 	cmh_txn.o \
 	cmh_rh.o \
 	cmh_dma.o \
-	cmh_sysfs.o
+	cmh_sysfs.o \
+	cmh_sys.o \
+	cmh_key.o
 
 ccflags-y += -I$(src)/include
 
drivers/crypto/cmh/cmh_key.c new file +119 -0

119 lines not on this page · raw message

drivers/crypto/cmh/cmh_sys.c new file +376 -0

376 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_key.h new file +73 -0

73 lines not on this page · raw message

drivers/crypto/cmh/include/cmh_sys.h new file +111 -0

111 lines not on this page · raw message

Signature · 1 line
2.43.7
#10 lore raw

Re: [PATCH 3/5] crypto: cmh - add key/datastore infrastructure

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] crypto: cmh: missing implementation for QSE and HCQ VCQ builders --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] crypto: cmh: missing implementation for QSE and HCQ VCQ builders
--

commit edeafa889ed6c19c029045fbf5064008f9e6f3d7
Author: Alex Ousherovitch <[email protected]>

crypto: cmh - add key/datastore infrastructure

This commit adds the CMH key and datastore system object layer shared by the algorithm drivers. It implements context staging, DMA mapping, and VCQ builder functions.

Quoted 5 lines
drivers/crypto/cmh/include/cmh_sys.h new file +0 -0
new file mode 100644
index 0000000000000..47c19e2f72a93

[ ... ]

drivers/crypto/cmh/include/cmh_sys.h line 51

Quoted 2 lines
drivers/crypto/cmh/include/cmh_sys.h new file +2 -0
+/* QSE core VCQ builders */
+void vcq_add_qse_flush(struct vcq_cmd *slot, u32 core_id);

[Severity: Low]
Are the implementations for the QSE and HCQ VCQ builders missing? They are declared here in the header, but they do not appear to be implemented in cmh_sys.c or used anywhere in the current tree.

Since these prototypes constitute dead code right now, should their declarations be deferred until the patches that introduce the QSE and HCQ drivers?

Quoted 3 lines
drivers/crypto/cmh/include/cmh_sys.h new file +3 -0
+void vcq_add_qse_ml_kem_keygen(struct vcq_cmd *slot, u32 core_id, u32 k, u32 flags,
+			       u64 seed, u64 z, u64 ek, u64 dk, u32 dk_type,
+			       bool masked);

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
#11 lore raw

PATCH 4/5 crypto: cmh - add AES skcipher/aead/cmac

In reply to Alex Ousherovitch

Register AES algorithms using the CMH AES core (core ID 0x03):
- skcipher: AES-ECB, AES-CBC, AES-CTR, AES-XTS, AES-CFB
- aead: AES-GCM, AES-CCM
- ahash: AES-CMAC

Supports 128, 192, and 256-bit keys. AEAD algorithms handle associated data, payload, and authentication tag with correct encrypt/decrypt separation.

AES-CMAC hardware-accelerates the one-shot .digest() only; the incremental and virtual-address (CRYPTO_AHASH_REQ_VIRT) paths are forwarded to a generic cmac(aes) transform the driver allocates in .init_tfm(). This is the one algorithm here that sets
CRYPTO_ALG_NO_FALLBACK: crypto/cmac.c implements only descsize (no export_core/import_core), so the core marks it NO_EXPORT_CORE and crypto_ahash_init_tfm() cannot install it as the automatic crypto_ahash_fb() fallback. ahash_prepare_alg() then forces NEED_FALLBACK unless NO_FALLBACK is set, so the flag is required to instantiate an async digest-only CMAC at all; the driver allocates the generic transform itself to serve the non-digest paths. This is the same narrow use of NO_FALLBACK as s390; the hashes and HMAC in a later series use the core's crypto_ahash_fb() and do not set it.

---
 drivers/crypto/cmh/Makefile          |    5 +-
 drivers/crypto/cmh/cmh_aes.c         |  755 +++++++++++++++++++
 drivers/crypto/cmh/cmh_aes_aead.c    | 1013 ++++++++++++++++++++++++++
 drivers/crypto/cmh/cmh_aes_cmac.c    |  476 ++++++++++++
 drivers/crypto/cmh/cmh_main.c        |   25 +
 drivers/crypto/cmh/include/cmh_aes.h |   24 +
 6 files changed, 2297 insertions(+), 1 deletion(-)
 create mode 100644 drivers/crypto/cmh/cmh_aes.c
 create mode 100644 drivers/crypto/cmh/cmh_aes_aead.c
 create mode 100644 drivers/crypto/cmh/cmh_aes_cmac.c
 create mode 100644 drivers/crypto/cmh/include/cmh_aes.h
drivers/crypto/cmh/Makefile +4 -1
index 485247405cb2..6f47afd004f1 100644
@@ -14,7 +14,10 @@ cmh-y := \
 	cmh_dma.o \
 	cmh_sysfs.o \
 	cmh_sys.o \
-	cmh_key.o
+	cmh_key.o \
+	cmh_aes.o \
+	cmh_aes_aead.o \
+	cmh_aes_cmac.o
 
 ccflags-y += -I$(src)/include
 
drivers/crypto/cmh/cmh_aes.c new file +755 -0

755 lines not on this page · raw message

drivers/crypto/cmh/cmh_aes_aead.c new file +1013 -0

1,013 lines not on this page · raw message

drivers/crypto/cmh/cmh_aes_cmac.c new file +476 -0

476 lines not on this page · raw message

drivers/crypto/cmh/cmh_main.c +25 -0
index 16e80a7f403f..6dc0a1eb0d50 100644
@@ -32,6 +32,7 @@
 #include "cmh_mqi.h"
 #include "cmh_txn.h"
 #include "cmh_rh.h"
+#include "cmh_aes.h"
 #include "cmh_registers.h"
 #include "cmh_debugfs.h"
 #include "cmh_sysfs.h"
@@ -227,10 +228,31 @@ static int cmh_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_rh_init;
 
+	/* Register AES skcipher algorithms */
+	ret = cmh_aes_register();
+	if (ret)
+		goto err_aes_register;
+
+	/* Register AES AEAD algorithms (GCM, CCM) */
+	ret = cmh_aes_aead_register();
+	if (ret)
+		goto err_aes_aead_register;
+
+	/* Register AES CMAC algorithm */
+	ret = cmh_aes_cmac_register();
+	if (ret)
+		goto err_aes_cmac_register;
+
 	platform_set_drvdata(pdev, dev);
 
 	return 0;
 
+err_aes_cmac_register:
+	cmh_aes_aead_unregister();
+err_aes_aead_register:
+	cmh_aes_unregister();
+err_aes_register:
+	cmh_rh_cleanup(cfg);
 err_rh_init:
 	cmh_tm_cleanup();
 err_tm_init:
@@ -255,6 +277,9 @@ static void cmh_remove(struct platform_device *pdev)
 
 	cfg = &dev->config;
 
+	cmh_aes_cmac_unregister();
+	cmh_aes_aead_unregister();
+	cmh_aes_unregister();
 	cmh_rh_cleanup(cfg);
 	cmh_tm_cleanup();
 	cmh_mqi_cleanup(cfg);
drivers/crypto/cmh/include/cmh_aes.h new file +24 -0
new file mode 100644
index 000000000000..591afaa36f85
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2026 Cryptography Research, Inc. (CRI).
+ * CMH LKM -- AES Crypto API Drivers
+ *
+ * Registers AES algorithms with the Linux crypto subsystem:
+ *   skcipher: ecb/cbc/ctr/cfb/xts(aes)
+ *   aead:     gcm/ccm(aes)
+ *   shash:    cmac(aes)
+ */
+
+#ifndef CMH_AES_H
+#define CMH_AES_H
+
+int  cmh_aes_register(void);
+void cmh_aes_unregister(void);
+
+int  cmh_aes_aead_register(void);
+void cmh_aes_aead_unregister(void);
+
+int  cmh_aes_cmac_register(void);
+void cmh_aes_cmac_unregister(void);
+
+#endif /* CMH_AES_H */
Signature · 1 line
2.43.7
#12 lore raw

Re: [PATCH 4/5] crypto: cmh - add AES skcipher/aead/cmac

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] mm: spurious ENOMEM on crypto requests due to high-order kmalloc --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] mm: spurious ENOMEM on crypto requests due to high-order kmalloc --

commit 6acd06ca4d876414812511190b70a583e7f5687b
Author: Alex Ousherovitch <[email protected]>

crypto: cmh - add AES skcipher/aead/cmac

This commit registers AES algorithms using the CMH AES core for skcipher, aead, and ahash. It supports 128, 192, and 256-bit keys, and routes operations through hardware acceleration.

Quoted 5 lines
drivers/crypto/cmh/cmh_aes.c new file +0 -0
new file mode 100644
index 0000000000000..d4352caf771f6

[ ... ]

Quoted 16 lines
drivers/crypto/cmh/cmh_aes.c new file +15 -0
@@ -371,19 +474,16 @@ static int cmh_aes_crypt(struct skcipher_request *req, u32 aes_op)
+	/*
+	 * Linearise input from scatterlist.  cryptlen is user-controlled up
+	 * to CMH_AES_MAX_CRYPTLEN (well above KMALLOC_MAX_SIZE), so use
+	 * __GFP_NOWARN: an oversized request fails cleanly with -ENOMEM
+	 * instead of splatting the page allocator.
+	 */
+	rctx->in_buf = kmalloc(req->cryptlen, gfp | __GFP_NOWARN);
+	if (!rctx->in_buf)
+		return -ENOMEM;
+
+	scatterwalk_map_and_copy(rctx->in_buf, req->src, 0, req->cryptlen, 0);
+
+	rctx->in_dma = cmh_dma_map_single(rctx->in_buf, req->cryptlen,
+					  DMA_TO_DEVICE);
+	if (cmh_dma_map_error(rctx->in_dma)) {

drivers/crypto/cmh/cmh_aes.c static int cmh_aes_crypt(struct skcipher_request *req, u32 aes_op) · line 492

Quoted 10 lines
drivers/crypto/cmh/cmh_aes.c new file +10 -0
+		ret = -ENOMEM;
+		goto out_free_in;
+	}
+
+	/* Allocate and map output buffer */
+	rctx->out_buf = kmalloc(req->cryptlen, gfp | __GFP_NOWARN);
+	if (!rctx->out_buf) {
+		ret = -ENOMEM;
+		goto out_unmap_in;
+	}

[Severity: High]
Will this contiguous allocation fail under normal system memory fragmentation?

The skcipher cryptlen can be up to CMH_AES_MAX_CRYPTLEN (32MB), but kmalloc() has a hard limit of KMALLOC_MAX_SIZE (typically 4-8MB) and will deterministically fail for larger sizes. Even for moderately large sizes (e.g. 64KB - 1MB), kmalloc() is highly prone to failing when system physical memory fragments.

Because the crypto framework does not automatically retry with a software fallback when the hardware driver returns -ENOMEM, valid requests (such as those from dm-crypt or IPsec) might unexpectedly fail and break caller functionality. Could this be changed to support scatter-gather directly or use a fallback allocation strategy if the hardware supports it?

Quoted 5 lines
drivers/crypto/cmh/cmh_aes_aead.c new file +0 -0
new file mode 100644
index 0000000000000..ed2a0b9449bc0

[ ... ]

drivers/crypto/cmh/cmh_aes_aead.c static int cmh_aes_aead_crypt(struct aead_request *req, u32 aes_op) · line 746

Quoted 8 lines
drivers/crypto/cmh/cmh_aes_aead.c new file +7 -0
@@ -622,15 +740,11 @@ static int cmh_aes_aead_crypt(struct aead_request *req, u32 aes_op)
+	/* Linearise input */
+	if (cryptlen > 0) {
+		rctx->in_buf = kmalloc(cryptlen, gfp | __GFP_NOWARN);
+		if (!rctx->in_buf) {
+			ret = -ENOMEM;
+			goto out_unmap_aad;
+		}

[Severity: High]
Similarly here in cmh_aes_aead_crypt(), the driver attempts to allocate up to 1MB of contiguous memory using kmalloc(). Does this run the same risk of failing due to memory fragmentation and propagating spurious -ENOMEM errors to the AEAD callers?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
#13 lore raw

PATCH 5/5 MAINTAINERS: add Rambus CryptoManager Hub (CMH)

In reply to Alex Ousherovitch

Add MAINTAINERS entry for the Rambus CryptoManager Hub (CMH) hardware crypto accelerator driver under drivers/crypto/cmh/.

---
 MAINTAINERS | 13 +++++++++++++
 1 file changed, 13 insertions(+)
MAINTAINERS +13 -0
index c3bcdcaa9b92..a803cd2a3c9a 100644
@@ -22760,6 +22760,19 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/net/wireless/ralink/
 
+RAMBUS CRYPTOMANAGER HUB (CMH) HARDWARE CRYPTO ACCELERATOR
+M:	Alex Ousherovitch <[email protected]>
+M:	Saravanakrishnan Krishnamoorthy <[email protected]>
+R:	Joel Wittenauer <[email protected]>
+R:	Thi Nguyen <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/ABI/testing/debugfs-driver-cmh
+F:	Documentation/ABI/testing/sysfs-driver-cmh
+F:	Documentation/crypto/device_drivers/cmh.rst
+F:	Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml
+F:	drivers/crypto/cmh/
+
 RAMDISK RAM BLOCK DEVICE DRIVER
 M:	Jens Axboe <[email protected]>
 S:	Maintained
Signature · 1 line
2.43.7
#14 lore raw
In reply to Alex Ousherovitch
Quoted 1 line · Alex Ousherovitch

This is the first of a short, incremental set of submissions adding

Maybe you're breaking stuff down, but this is v6, not v1, and shopuld contain a changelog.

Thanks,
Conor.

Quoted 165 lines

support for the Rambus CryptoManager Hub (CMH), a hardware cryptographic accelerator accessed through a mailbox-based VCQ (Virtual Command Queue) interface. To keep each posting small and independently reviewable, the driver is submitted in self-contained parts; this first series adds the core platform driver, the shared key/datastore layer and the AES transforms (plus the device-tree binding and the MAINTAINERS entry). AES is the first and least-problematic algorithm family, so the core has a user and the VCQ/DMA/completion data path is reviewable end to end. Later series add the remaining symmetric ciphers (SM4, ChaCha20-Poly1305) and the hwrng, the hashes and MACs, and finally the asymmetric and post-quantum algorithms together with the /dev/cmh_mgmt management interface.

The core driver binds the device, parses its device-tree description, sets up DMA, the mailbox queue interface and the transaction manager, and exposes sysfs/debugfs instrumentation. The key/datastore patch adds the key provisioning and system-object layer that the AES driver in this series, and the algorithm drivers in the following series, build on.

The transaction manager runs as a kthread that packs VCQ entries, maps DMA, and submits to the least-loaded mailbox; completion is handled by per-mailbox threaded IRQs. The data path is asynchronous: requests return -EINPROGRESS and the driver honors CRYPTO_TFM_REQ_MAY_BACKLOG for queue-full backpressure. The CMH eSW is loaded independently by the hardware before probe; the driver loads no firmware.

The CMH is a platform device matched via device tree (compatible "rambus,cmh-v1030"). Following the inside-secure,eip93 binding model and the DT maintainer's guidance, the schema requires a SoC-specific compatible ahead of the IP fallback and therefore carries no example.

Public hardware documentation:
Product brief: https://go.rambus.com/ch-7xx-and-cc-7xx-product-brief
No public datasheets are currently available. The driver was developed against the Rambus CryptoManager Hub Hardware Reference Manual (Rambus Inc. confidential). Detailed hardware reference is available under NDA from Rambus Inc.; contact the maintainers listed in MAINTAINERS for access during review.

Developed against Herbert Xu's cryptodev tree. checkpatch.pl --strict, sparse (C=2) and a W=1 -Werror build are clean, and dtschema's dt-doc-validate accepts the binding. Exercised on riscv64 and arm64 -- QEMU with the CMH hardware model and a Xilinx VMK180 FPGA with the CMH IP -- under lockdep/PROVE_LOCKING, DEBUG_OBJECTS, KASAN/UBSAN/KMEMLEAK/KFENCE and (arm64) KCSAN with no findings; worst-case stack stays under 1 KB.

Alex Ousherovitch (5):
dt-bindings: crypto: add Rambus CryptoManager Hub
crypto: cmh - add core platform driver
crypto: cmh - add key/datastore infrastructure
crypto: cmh - add AES skcipher/aead/cmac
MAINTAINERS: add Rambus CryptoManager Hub (CMH)

 Documentation/ABI/testing/debugfs-driver-cmh  |  171 ++
 Documentation/ABI/testing/sysfs-driver-cmh    |   67 +
 Documentation/crypto/device_drivers/cmh.rst   |  340 +++
 Documentation/crypto/device_drivers/index.rst |    1 +
 .../bindings/crypto/rambus,cmh-v1030.yaml     |  144 ++
 .../devicetree/bindings/vendor-prefixes.yaml  |    2 +
 MAINTAINERS                                   |   13 +
 drivers/crypto/Kconfig                        |    1 +
 drivers/crypto/Makefile                       |    1 +
 drivers/crypto/cmh/Kconfig                    |   62 +
 drivers/crypto/cmh/Makefile                   |   30 +
 drivers/crypto/cmh/cmh_aes.c                  |  755 ++++++
 drivers/crypto/cmh/cmh_aes_aead.c             | 1013 ++++++++
 drivers/crypto/cmh/cmh_aes_cmac.c             |  476 ++++
 drivers/crypto/cmh/cmh_config.c               |  619 +++++
 drivers/crypto/cmh/cmh_debugfs.c              |  307 +++
 drivers/crypto/cmh/cmh_dma.c                  |  482 ++++
 drivers/crypto/cmh/cmh_key.c                  |  119 +
 drivers/crypto/cmh/cmh_main.c                 |  394 +++
 drivers/crypto/cmh/cmh_mqi.c                  |  344 +++
 drivers/crypto/cmh/cmh_rh.c                   | 1211 +++++++++
 drivers/crypto/cmh/cmh_sys.c                  |  376 +++
 drivers/crypto/cmh/cmh_sysfs.c                |  108 +
 drivers/crypto/cmh/cmh_txn.c                  | 2235 +++++++++++++++++
 drivers/crypto/cmh/include/cmh.h              |   24 +
 drivers/crypto/cmh/include/cmh_aes.h          |   24 +
 drivers/crypto/cmh/include/cmh_aes_abi.h      |   98 +
 drivers/crypto/cmh/include/cmh_ccp_abi.h      |  108 +
 drivers/crypto/cmh/include/cmh_config.h       |  105 +
 drivers/crypto/cmh/include/cmh_debugfs.h      |   93 +
 drivers/crypto/cmh/include/cmh_dma.h          |  249 ++
 drivers/crypto/cmh/include/cmh_drbg_abi.h     |   67 +
 drivers/crypto/cmh/include/cmh_eac_abi.h      |   44 +
 drivers/crypto/cmh/include/cmh_hc_abi.h       |  162 ++
 drivers/crypto/cmh/include/cmh_hcq_abi.h      |  222 ++
 drivers/crypto/cmh/include/cmh_key.h          |   73 +
 drivers/crypto/cmh/include/cmh_kic_abi.h      |   77 +
 drivers/crypto/cmh/include/cmh_mqi.h          |   35 +
 drivers/crypto/cmh/include/cmh_pke_abi.h      |  272 ++
 drivers/crypto/cmh/include/cmh_qse_abi.h      |  201 ++
 drivers/crypto/cmh/include/cmh_registers.h    |  161 ++
 drivers/crypto/cmh/include/cmh_rh.h           |   93 +
 drivers/crypto/cmh/include/cmh_sm3_abi.h      |   79 +
 drivers/crypto/cmh/include/cmh_sm4_abi.h      |  101 +
 drivers/crypto/cmh/include/cmh_sys.h          |  111 +
 drivers/crypto/cmh/include/cmh_sys_abi.h      |  148 ++
 drivers/crypto/cmh/include/cmh_sysfs.h        |   14 +
 drivers/crypto/cmh/include/cmh_txn.h          |  493 ++++
 drivers/crypto/cmh/include/cmh_vcq.h          |  288 +++
 49 files changed, 12613 insertions(+)
 create mode 100644 Documentation/ABI/testing/debugfs-driver-cmh
 create mode 100644 Documentation/ABI/testing/sysfs-driver-cmh
 create mode 100644 Documentation/crypto/device_drivers/cmh.rst
 create mode 100644 Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml
 create mode 100644 drivers/crypto/cmh/Kconfig
 create mode 100644 drivers/crypto/cmh/Makefile
 create mode 100644 drivers/crypto/cmh/cmh_aes.c
 create mode 100644 drivers/crypto/cmh/cmh_aes_aead.c
 create mode 100644 drivers/crypto/cmh/cmh_aes_cmac.c
 create mode 100644 drivers/crypto/cmh/cmh_config.c
 create mode 100644 drivers/crypto/cmh/cmh_debugfs.c
 create mode 100644 drivers/crypto/cmh/cmh_dma.c
 create mode 100644 drivers/crypto/cmh/cmh_key.c
 create mode 100644 drivers/crypto/cmh/cmh_main.c
 create mode 100644 drivers/crypto/cmh/cmh_mqi.c
 create mode 100644 drivers/crypto/cmh/cmh_rh.c
 create mode 100644 drivers/crypto/cmh/cmh_sys.c
 create mode 100644 drivers/crypto/cmh/cmh_sysfs.c
 create mode 100644 drivers/crypto/cmh/cmh_txn.c
 create mode 100644 drivers/crypto/cmh/include/cmh.h
 create mode 100644 drivers/crypto/cmh/include/cmh_aes.h
 create mode 100644 drivers/crypto/cmh/include/cmh_aes_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_ccp_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_config.h
 create mode 100644 drivers/crypto/cmh/include/cmh_debugfs.h
 create mode 100644 drivers/crypto/cmh/include/cmh_dma.h
 create mode 100644 drivers/crypto/cmh/include/cmh_drbg_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_eac_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_hc_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_hcq_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_key.h
 create mode 100644 drivers/crypto/cmh/include/cmh_kic_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_mqi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_pke_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_qse_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_registers.h
 create mode 100644 drivers/crypto/cmh/include/cmh_rh.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sm3_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sm4_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sys.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sys_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sysfs.h
 create mode 100644 drivers/crypto/cmh/include/cmh_txn.h
 create mode 100644 drivers/crypto/cmh/include/cmh_vcq.h

---

The CMH driver was first posted as a single series; it is now
split into smaller, independently reviewable series per maintainer
feedback. Earlier single-series postings:
v1: https://lore.kernel.org/linux-crypto/[email protected]/
v2: https://lore.kernel.org/linux-crypto/[email protected]/
v3: https://lore.kernel.org/linux-crypto/[email protected]/
v4: https://lore.kernel.org/linux-crypto/[email protected]/
v5: https://lore.kernel.org/linux-crypto/[email protected]/
base-commit: 9695df3b1db4ac4534274d38ee16e3b9b0bf910e

Signature · 1 line
2.43.7
#15 lore raw
Quoted 2 lines · Conor Dooley

Maybe you're breaking stuff down, but this is v6, not v1, and should contain a changelog.

You're right, apologies -- I restarted the numbering when splitting the series into smaller chunks, which I shouldn't have. The next revision of this chunk will be v6 and carry a "since v5" changelog.

Thanks,
Alex

#16 lore raw
Quoted 2 lines · Alex Ousherovitch

The next revision of this chunk will be v6 and carry a "since v5" changelog.

Correction: the untagged [PATCH 0/5] posting was itself the sixth revision -- the v6 Conor and Krzysztof pointed to -- so the corrected re-spin is v7, not v6. It carries a per-revision changelog (v1..v7) and the fixed Signed-off-by ordering.

#17 lore raw
In reply to Alex Ousherovitch
Quoted 1 line · Alex Ousherovitch

This is the first of a short, incremental set of submissions adding

Obviously not true. You sent already five versions of this. Where is changelog? Where is proper versioning or even explanation of any changes?

Best regards,
Krzysztof