mbox series

[00/19] crypto: allwinner: lots of fixes

Message ID 20220317205605.3924836-1-clabbe@baylibre.com (mailing list archive)
Headers show
Series crypto: allwinner: lots of fixes | expand

Message

Corentin LABBE March 17, 2022, 8:55 p.m. UTC
Hello

This series is all fixes which I found on allwinner crypto drivers.

Regards

Corentin Labbe (19):
  crypto: sun8i-ce: Fix minor style issue
  crypto: sun8i-ce: do not allocate memory when handling requests
  crypto: sun4i-ss: do not allocate backup IV on requests
  crypto: sun8i-ss: rework handling of IV
  crypto: sun8i-ss: handle zero sized sg
  crypto: sun8i-ss: remove redundant test
  crypto: sun8i-ss: test error before assigning
  crypto: sun8i-ss: use sg_nents_for_len
  crypto: sun8i-ss: do not allocate memory when handling hash requests
  crypto: sun8i-ss: do not zeroize all pad
  crypto: sun8i-ss: handle requests if last block is not modulo 64
  crypto: sun8i-ss: rework debugging
  crypto: sun8i-ss: Add function for handling hash padding
  crypto: sun8i-ss: add hmac(sha1)
  crypto: sun8i-ss: do not fallback if cryptlen is less than sg length
  crypto: sun8i-ce: Add function for handling hash padding
  crypto: sun8i-ce: use sg_nents_for_len
  crypto: sun8i-ce: rework debugging
  crypto: sun8i-ce: do not fallback if cryptlen is less than sg length

 .../allwinner/sun4i-ss/sun4i-ss-cipher.c      |  22 +-
 drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h  |   1 +
 .../allwinner/sun8i-ce/sun8i-ce-cipher.c      | 102 +++--
 .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c |  54 ++-
 .../crypto/allwinner/sun8i-ce/sun8i-ce-hash.c | 130 ++++--
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h  |  19 +-
 .../allwinner/sun8i-ss/sun8i-ss-cipher.c      | 180 +++++---
 .../crypto/allwinner/sun8i-ss/sun8i-ss-core.c |  92 ++++-
 .../crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 385 +++++++++++++++---
 drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h  |  33 +-
 10 files changed, 767 insertions(+), 251 deletions(-)

Comments

Herbert Xu April 8, 2022, 8:24 a.m. UTC | #1
Corentin Labbe <clabbe@baylibre.com> wrote:
> Hello
> 
> This series is all fixes which I found on allwinner crypto drivers.

This doesn't compile cleanly with sparse.  Please fix and resubmit.

Thanks,
Corentin LABBE April 11, 2022, 7:37 a.m. UTC | #2
Le Fri, Apr 08, 2022 at 04:24:20PM +0800, Herbert Xu a écrit :
> Corentin Labbe <clabbe@baylibre.com> wrote:
> > Hello
> > 
> > This series is all fixes which I found on allwinner crypto drivers.
> 
> This doesn't compile cleanly with sparse.  Please fix and resubmit.
> 
> Thanks,

Hello

Coul you give me more details ?
I do not have any sparse error.

Regards
Herbert Xu April 11, 2022, 7:40 a.m. UTC | #3
On Mon, Apr 11, 2022 at 09:37:22AM +0200, LABBE Corentin wrote:
>
> Coul you give me more details ?
> I do not have any sparse error.

Did you compile with C=1? Anyway, for a start hash_pad is broken as
it tries to store an le32 value into a u32.

Cheers,
Corentin LABBE April 11, 2022, 8:37 a.m. UTC | #4
Le Mon, Apr 11, 2022 at 03:40:28PM +0800, Herbert Xu a écrit :
> On Mon, Apr 11, 2022 at 09:37:22AM +0200, LABBE Corentin wrote:
> >
> > Coul you give me more details ?
> > I do not have any sparse error.
> 
> Did you compile with C=1? Anyway, for a start hash_pad is broken as
> it tries to store an le32 value into a u32.

Yes I compile with both W=1 and C=1.
But rigth, hash_pad takes a u32 but the origin variable bf is __le32, so perhaps it is why sparse dont see a problem.
Anyway I will fix hash_pad declaration.

Thanks