Skip to content

crypto: allwinner: add xRNG and hashes

Corentin Labbe linux-arm-kernel linux-crypto lkml 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest17 patches 1 replyIn review
  2. v618 patches 4 repliesSuperseded
  3. v518 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v417 patches5 repliesSuperseded
v314 patches0 repliesSuperseded
v214 patches7 repliesSuperseded

Changes in v7 from the cover letter

- fix sparse error in sun8i-ce-cipher.c

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17crypto: sun8i-ss: Add SS_START definedrivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h+3 -10 replies
2/17crypto: sun8i-ss: Add support for the PRNGdrivers/crypto/allwinner/Kconfig drivers/crypto/allwinner/sun8i-ss/Makefile drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c +2 more+246 -00 replies
3/17crypto: sun8i-ss: support hash algorithmsdrivers/crypto/allwinner/Kconfig drivers/crypto/allwinner/sun8i-ss/Makefile drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c +2 more+667 -00 replies
4/17crypto: sun8i-ss: fix a trivial typodrivers/crypto/allwinner/sun8i-ss/sun8i-ss.h+1 -10 replies
5/17crypto: sun8i-ss: Add more comment on some structuresdrivers/crypto/allwinner/sun8i-ss/sun8i-ss.h+2 -00 replies
6/17crypto: sun8i-ss: better debug printingdrivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c+3 -30 replies
7/17crypto: sun8i-ce: handle endianness of t_common_ctldrivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c+4 -10 replies
8/17crypto: sun8i-ce: move iv data to request contextdrivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h+19 -180 replies
9/17crypto: sun8i-ce: split into prepare/run/unpreparedrivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h+79 -200 replies
10/17crypto: sun8i-ce: handle different error registersdrivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h+62 -80 replies
11/17crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytesdrivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h+4 -40 replies
12/17crypto: sun8i-ce: support hash algorithmsdrivers/crypto/allwinner/Kconfig drivers/crypto/allwinner/sun8i-ce/Makefile drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c +2 more+711 -00 replies
13/17crypto: sun8i-ce: Add stat_bytes debugfsdrivers/crypto/allwinner/sun8i-ce/sun8i-ce.h+2 -00 replies
14/17crypto: sun8i-ce: Add support for the PRNGdrivers/crypto/allwinner/Kconfig drivers/crypto/allwinner/sun8i-ce/Makefile drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c +2 more+261 -10 replies
15/17crypto: sun8i-ce: Add support for the TRNGdrivers/crypto/allwinner/Kconfig drivers/crypto/allwinner/sun8i-ce/Makefile drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c +2 more+172 -00 replies
16/17crypto: sun8i-ce: fix comparison of integer expressions of different signednessdrivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c+4 -30 replies
17/17crypto: sun8i-ss: fix comparison of integer expressions of different signednessdrivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c+4 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v7 yet.

Read the v7 thread

Cover letter [PATCH v7 00/17] crypto: allwinner: add xRNG and hashes

Hello

The main goal of this serie is to add support for TRNG, PRNG and hashes to the sun8i-ss/sun8i-ce driver.
The whole serie is tested with CRYPTO_EXTRA_TESTS enabled and loading tcrypt.
The PRNG and TRNG are tested with rngtest.
Both LE and BE kernel are tested.

This serie was tested on:
- sun50i-a64-pine64
- sun8i-a83t-bananapi-m3
- sun8i-r40-bananapi-m2-ultra
- sun50i-h5-libretech-all-h3-cc
- sun8i-h3-orangepi-pc

Regards

Change since v1:
- removed _crypto_rng_cast patch

Change since v2:
- cleaned unused variables from sun8i-ce-prng
- added some missing memzero_explicit

Change since v3:
- rebased on latest next
- removed useless cpu_to_le32() in sun8i-ss
- added 2 last patches
- add handle endianness of t_common_ctl patch

Change since v4:
- added a style issue patch

Changes since v5:
- handle failure pattern of pm_runtime_get_sync
- Add missing linux/dma-mapping.h

Changes since v6:
- fix sparse error in sun8i-ce-cipher.c

Corentin Labbe (17):
crypto: sun8i-ss: Add SS_START define
crypto: sun8i-ss: Add support for the PRNG
crypto: sun8i-ss: support hash algorithms
crypto: sun8i-ss: fix a trivial typo
crypto: sun8i-ss: Add more comment on some structures
crypto: sun8i-ss: better debug printing
crypto: sun8i-ce: handle endianness of t_common_ctl
crypto: sun8i-ce: move iv data to request context
crypto: sun8i-ce: split into prepare/run/unprepare
crypto: sun8i-ce: handle different error registers
crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes
crypto: sun8i-ce: support hash algorithms
crypto: sun8i-ce: Add stat_bytes debugfs
crypto: sun8i-ce: Add support for the PRNG
crypto: sun8i-ce: Add support for the TRNG
crypto: sun8i-ce: fix comparison of integer expressions of different
signedness
crypto: sun8i-ss: fix comparison of integer expressions of different
signedness

 drivers/crypto/allwinner/Kconfig              |  43 ++
 drivers/crypto/allwinner/sun8i-ce/Makefile    |   3 +
 .../allwinner/sun8i-ce/sun8i-ce-cipher.c      | 116 +++--
 .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 381 ++++++++++++++-
 .../crypto/allwinner/sun8i-ce/sun8i-ce-hash.c | 413 ++++++++++++++++
 .../crypto/allwinner/sun8i-ce/sun8i-ce-prng.c | 164 +++++++
 .../crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 127 +++++
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h  | 139 +++++-
 drivers/crypto/allwinner/sun8i-ss/Makefile    |   2 +
 .../crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 205 +++++++-
 .../crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 444 ++++++++++++++++++
 .../crypto/allwinner/sun8i-ss/sun8i-ss-prng.c | 173 +++++++
 drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h  |  89 +++-
 13 files changed, 2240 insertions(+), 59 deletions(-)
 create mode 100644 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
 create mode 100644 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c
 create mode 100644 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
 create mode 100644 drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
 create mode 100644 drivers/crypto/allwinner/sun8i-ss/sun8i-ss-prng.c
Signature · 1 line
2.26.2