Skip to content

crypto: sun4i-ss: prevent always fallback for ciphers

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 1 replyIn review
  2. v37 patches 3 repliesSuperseded
  3. v27 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches5 repliesSuperseded

Changes in v4 from the cover letter

- patch #2: Rewrite test as suggested by David Laight
- patch #7: removed all ifdef CONFIG_CRYPTO_DEV_SUN4I_SS_DEBUG
- added kmap patch

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8crypto: sun4i-ss: linearize buffers content must be keptdrivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h+6 -80 replies
2/8crypto: sun4i-ss: checking sg length is not sufficientdrivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c+2 -20 replies
3/8crypto: sun4i-ss: IV register does not work on A10 and A13drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c+28 -60 replies
4/8crypto: sun4i-ss: handle BigEndian for cipherdrivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c+6 -60 replies
5/8crypto: sun4i-ss: initialize need_fallbackdrivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c+1 -10 replies
6/8crypto: sun4i-ss: fix kmap usagedrivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c+65 -440 replies
7/8crypto: sun4i-ss: enabled stats via debugfsdrivers/crypto/allwinner/Kconfig drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c +3 more+98 -00 replies
8/8crypto: sun4i-ss: add SPDX header and remove blank linesdrivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c+1 -30 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH v4 0/8] crypto: sun4i-ss: prevent always fallback for ciphers

Hello

For help testing on "crypto: sun4i-ss - Fix sparse endianness markers", I have added "stats" support like other allwinner's crypto drivers. Seeing stats showed a clear problem, the ciphers function were not used at all.
This is due to the not-inialized need_fallback which is "init" as true everytime.
So basicly, since the patch introduced it, this probem hidden some bugs.

This serie fixes all hidden problems, then fix the initialization of "need_fallback" and then add the stats like other allwinner drivers.

Regards

changes since v3:
- patch #2: Rewrite test as suggested by David Laight
- patch #7: removed all ifdef CONFIG_CRYPTO_DEV_SUN4I_SS_DEBUG
- added kmap patch

Changes since v2:
- patch #1: move buf/bufo out of function for reducing stack usage
- patch #4: use writesl()
- patch #6: use IS_ENABLED instead of #ifdef

Changes since v1:
- patch #4 is sufficient to fix BE problem (removed todo)

Corentin Labbe (8):
crypto: sun4i-ss: linearize buffers content must be kept
crypto: sun4i-ss: checking sg length is not sufficient
crypto: sun4i-ss: IV register does not work on A10 and A13
crypto: sun4i-ss: handle BigEndian for cipher
crypto: sun4i-ss: initialize need_fallback
crypto: sun4i-ss: fix kmap usage
crypto: sun4i-ss: enabled stats via debugfs
crypto: sun4i-ss: add SPDX header and remove blank lines

 drivers/crypto/allwinner/Kconfig              |   9 +
 .../allwinner/sun4i-ss/sun4i-ss-cipher.c      | 196 +++++++++++-------
 .../crypto/allwinner/sun4i-ss/sun4i-ss-core.c |  52 +++++
 .../crypto/allwinner/sun4i-ss/sun4i-ss-hash.c |   6 +
 .../crypto/allwinner/sun4i-ss/sun4i-ss-prng.c |   6 +
 drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h  |   8 +
 6 files changed, 207 insertions(+), 70 deletions(-)
Signature · 1 line
2.26.2