418a917 ("crypto: sun8i-ss - support hash algorithms")
> Signed-off-by: Colin Ian King
> ---
Hello
Acked-by: Corentin Labbe
Tested-by: Corentin Labbe
Tested-on: sun8i-a83t-bananapi-m3
Thanks
Some CONFIG select miss CRYPTO_.
Reported-by: Chen-Yu Tsai
Fixes: 56f6d5aee88d1 ("crypto: sun8i-ce - support hash algorithms")
Fixes: d9b45418a9177 ("crypto: sun8i-ss - support hash algorithms")
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 14 ++
te(struct crypto_rng *tfm, const
> u8 *src,
> memcpy(ctx->seed, d + dlen, ctx->slen);
> }
> memzero_explicit(d, todo);
> +err_free:
> kfree(d);
>
> return err;
> --
> 2.30.0
>
Hello
Tested-by: Corentin Labbe
Acked-by: Corentin Labbe
Thanks
, DMA_TO_DEVICE);
> if (dma_mapping_error(ce->dev, dma_iv)) {
> dev_err(ce->dev, "Cannot DMA MAP IV\n");
> + err = -EFAULT;
> goto err_iv;
> }
>
> --
> 2.17.1
>
Hello
Tested-by: Corentin Labbe
Acked-by: Corentin Labbe
Thanks
This patch fixes a memory leak on an error path.
Fixes: d9b45418a917 ("crypto: sun8i-ss - support hash algorithms")
Reported-by: kernel test robot
Reported-by: Dan Carpenter
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 2 +-
1 file changed, 1
s free'd before the return.
>
> Addresses-Coverity: ("Resource leak")
> Fixes: ac2614d721de ("crypto: sun8i-ss - Add support for the PRNG")
> Signed-off-by: Colin Ian King
> ---
Acked-by: Corentin Labbe
Thanks!
This patch fixes a memory leak on an error path.
Fixes: d9b45418a917 ("crypto: sun8i-ss - support hash algorithms")
Reported-by: kernel test robot
Reported-by: Dan Carpenter
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 2 +-
1 file changed, 1
changed, 16 insertions(+), 8 deletions(-)
>
Hello
Acked-by: Corentin LABBE
Tested-by: Corentin LABBE
Tested-on: sun8i-a83t-bananapi-m3
Tested-on: sun50i-h6-pine-h64
Tested-on: sun50i-h6-orangepi-one-plus
Thanks
Ciphers produce invalid results on BE.
Key and IV need to be written in LE.
Fixes: 6298e948215f2 ("crypto: sunxi-ss - Add Allwinner Security System crypto
accelerator")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 12 ++--
1 fi
Signed-off-by: Corentin Labbe
---
.../allwinner/sun4i-ss/sun4i-ss-cipher.c | 34 +++
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
index f4979758832
This patch enable to access usage stats for each algorithm.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 9
.../allwinner/sun4i-ss/sun4i-ss-cipher.c | 20 +++
.../crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 52 +++
.../crypto
This patchs fixes some remaining style issue.
Signed-off-by: Corentin Labbe
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 3 ---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 1 +
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a
t place.
Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto
accelerator")
Signed-off-by: Corentin Labbe
---
.../allwinner/sun4i-ss/sun4i-ss-cipher.c | 109 +++---
1 file changed, 65 insertions(+), 44 deletions(-)
diff --git a/drivers/crypto/al
The need_fallback is never initialized and seem to be always true at runtime.
So all hardware operations are always bypassed.
Fixes: 0ae1f46c55f87 ("crypto: sun4i-ss - fallback when length is not multiple
of blocksize")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinne
rypto
accelerator")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-ciph
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 BigEnd
educe stack usage")
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 12
drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h| 2 ++
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-c
On Mon, Dec 07, 2020 at 01:15:49AM +0100, Thomas Gleixner wrote:
> On Sun, Dec 06 2020 at 22:40, Corentin Labbe wrote:
> > On Sat, Dec 05, 2020 at 08:48:15PM +0100, Thomas Gleixner wrote:
> >> So this maps two pages and unmaps the first one. That's all called from
> >&
On Sat, Dec 05, 2020 at 08:48:15PM +0100, Thomas Gleixner wrote:
> Corentin,
>
> On Sat, Dec 05 2020 at 19:43, Corentin Labbe wrote:
> > On Fri, Dec 04, 2020 at 09:58:21PM +0100, Thomas Gleixner wrote:
> >> Can you please replace the debug patch with the one below and tr
On Fri, Dec 04, 2020 at 09:58:21PM +0100, Thomas Gleixner wrote:
> On Fri, Dec 04 2020 at 20:27, Corentin Labbe wrote:
> > On Fri, Dec 04, 2020 at 04:08:27PM +0100, Thomas Gleixner wrote:
> >> On Fri, Dec 04 2020 at 14:26, Corentin Labbe wrote:
> >> > On Fri, De
On Fri, Dec 04, 2020 at 04:08:27PM +0100, Thomas Gleixner wrote:
> On Fri, Dec 04 2020 at 14:26, Corentin Labbe wrote:
> > On Fri, Dec 04, 2020 at 12:34:05AM +0100, Thomas Gleixner wrote:
> >> The unmap comes from sg_miter_stop() and looking at the previous
> >> map/u
On Fri, Dec 04, 2020 at 12:34:05AM +0100, Thomas Gleixner wrote:
> On Thu, Dec 03 2020 at 18:38, Corentin Labbe wrote:
> > On Wed, Dec 02, 2020 at 09:59:36PM +0100, Thomas Gleixner wrote:
> >> On Wed, Dec 02 2020 at 20:55, Corentin Labbe wrote:
> >> > On Tue, De
On Wed, Dec 02, 2020 at 09:59:36PM +0100, Thomas Gleixner wrote:
> On Wed, Dec 02 2020 at 20:55, Corentin Labbe wrote:
> > On Tue, Dec 01, 2020 at 04:15:08PM +0100, Thomas Gleixner wrote:
> >
> > The result could be seen at http://kernel.montjoie.ovh/129768.log
> > The
On Tue, Dec 01, 2020 at 04:15:08PM +0100, Thomas Gleixner wrote:
> On Tue, Dec 01 2020 at 15:45, Corentin Labbe wrote:
> > On Tue, Dec 01, 2020 at 03:16:36PM +0100, Thomas Gleixner wrote:
> > In fact the warn was a bit later so I added:
> >preempt_disab
On Tue, Dec 01, 2020 at 03:16:36PM +0100, Thomas Gleixner wrote:
> On Tue, Dec 01 2020 at 14:52, Corentin Labbe wrote:
> > On Tue, Dec 01, 2020 at 02:28:54PM +0100, Thomas Gleixner wrote:
> > The patch made the board too busy logging and fail to boot until the test.
>
> Stup
On Tue, Dec 01, 2020 at 02:28:54PM +0100, Thomas Gleixner wrote:
> On Tue, Dec 01 2020 at 14:01, Corentin Labbe wrote:
> > +[ 213.050152] [ cut here ]
> > +[ 213.050207] WARNING: CPU: 0 PID: 18430 at mm/highmem.c:581
> > kunmap_loca
Hello
When testing 20201130, I hit this problem:
+[ 213.050152] [ cut here ]
+[ 213.050207] WARNING: CPU: 0 PID: 18430 at mm/highmem.c:581
kunmap_local_indexed+0x194/0x1d4
+[ 213.050214] Modules linked in: sm4_generic authenc vmac xcbc hmac
streebog_generic sm3_generi
Signed-off-by: Corentin Labbe
---
.../allwinner/sun4i-ss/sun4i-ss-cipher.c | 34 +++
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
index 4dd736ee5a4
This patch enable to access usage stats for each algorithm.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 9 +++
.../allwinner/sun4i-ss/sun4i-ss-cipher.c | 20 +++
.../crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 56 +++
.../crypto
- 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 (7):
crypto: sun4i-ss: linearize buffers content must be kept
This patchs fixes some remaining style issue.
Signed-off-by: Corentin Labbe
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 3 ---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 1 +
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a
The need_fallback is never initialized and seem to be always true at runtime.
So all hardware operations are always bypassed.
Fixes: 0ae1f46c55f87 ("crypto: sun4i-ss - fallback when length is not multiple
of blocksize")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinne
rypto
accelerator")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-ciph
Ciphers produce invalid results on BE.
Key and IV need to be written in LE.
Fixes: 6298e948215f2 ("crypto: sunxi-ss - Add Allwinner Security System crypto
accelerator")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 12 ++--
1 fi
educe stack usage")
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 12
drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h| 2 ++
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-c
was an error.
Fixes: 56f6d5aee88d ("crypto: sun8i-ce - support hash algorithms")
Reported-by: kernel test robot
Reported-by: Dan Carpenter
Signed-off-by: Corentin Labbe
---
.../crypto/allwinner/sun8i-ce/sun8i-ce-hash.c | 20 +++
1 file changed, 12 insertions(+), 8 dele
/arm/sunxi/README
> + * You could find a link for the datasheet in Documentation/arm/sunxi.rst
> */
> #include "sun8i-ce.h"
> #include
> --
> 2.26.2
>
Hello
Acked-by: Corentin Labbe
Thanks
On Thu, Oct 08, 2020 at 04:52:38PM +1100, Herbert Xu wrote:
> On Thu, Sep 24, 2020 at 03:27:38PM +0200, Corentin Labbe wrote:
> >
> > This is an example on next-20200923+BigEndian
> > alg: ahash: sha1 test failed (wrong result) on test vector \"random:
> > p
On Mon, Oct 05, 2020 at 01:09:10PM -0400, Daniel Jordan wrote:
> On Thu, Oct 01, 2020 at 07:50:22PM +0200, Corentin Labbe wrote:
> > On Tue, Mar 03, 2020 at 04:30:17PM -0500, Daniel Jordan wrote:
> > > Barring other ideas, Corentin, would you be willing to boot with
> >
>
Hello
The label could be better placed just before the kfree.
In error case, there are no need to memzero the not used "d".
But a patch with it, was already sent to the ML.
Anyway if you fix it, you could add "Acked-by: Corentin Labbe
"
Regards
On Tue, Mar 03, 2020 at 04:31:11PM -0500, Daniel Jordan wrote:
> On Tue, Mar 03, 2020 at 08:48:19AM +0100, Corentin Labbe wrote:
> > The patch fix the issue. Thanks!
>
> Thanks for trying it!
>
> > So you could add:
> > Reported-by: Corentin Labbe
> > Test
On Thu, Sep 24, 2020 at 01:08:59PM +1000, Herbert Xu wrote:
> On Mon, Sep 14, 2020 at 12:40:58PM +0200, Corentin Labbe wrote:
> >
> > I got this on next-20200910/multi_v7_defconfig BigEndian
> > [ 12.137856] alg: hash: skipping comparison tests for md5-sun4i-ss
>
This patchs fixes some remaining style issue.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 3 ---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 1 +
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss
This patch enable to access usage stats for each algorithm.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 9
.../allwinner/sun4i-ss/sun4i-ss-cipher.c | 21
.../crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 54 +++
.../crypto
The need_fallback is never initialized and seem to be always true at runtime.
So all hardware operations are always bypassed.
Fixes: 0ae1f46c55f87 ("crypto: sun4i-ss - fallback when length is not multiple
of blocksize")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinne
rypto
accelerator")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-ciph
Ciphers produce invalid results on BE.
Key and IV need to be written in LE.
Fixes: 6298e948215f2 ("crypto: sunxi-ss - Add Allwinner Security System crypto
accelerator")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 12 ++--
1 fi
1:
- patch #4 is sufficient to fix BE problem (removed todo)
Corentin Labbe (7):
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
Signed-off-by: Corentin Labbe
---
.../allwinner/sun4i-ss/sun4i-ss-cipher.c | 34 +++
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
index 2614640231d
When running the non-optimized cipher function, SS produce partial random
output.
This is due to linearize buffers being reseted after each loop.
Fixes: 8d3bcb9900ca ("crypto: sun4i-ss - reduce stack usage")
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-s
Instead of using an hardcoded value, let's use a defined value for
SS_START.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 2 +-
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --
Error registers are different across SoCs.
This patch handle those difference.
Signed-off-by: Corentin Labbe
---
.../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 62 ---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 8 +++
2 files changed, 62 insertions(+), 8 deletions
-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 8 ++
drivers/crypto/allwinner/sun8i-ce/Makefile| 1 +
.../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 18 +++
.../crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 127 ++
drivers/crypto/allwinner/sun8i-ce
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
Instead of storing IV data in the channel context, store them in the
request context.
Storing them in the channel structure was conceptualy wrong since they
are per request related.
Signed-off-by: Corentin Labbe
---
.../allwinner/sun8i-ce/sun8i-ce-cipher.c | 27 +--
drivers
Hash algorithms will need also a spetial t_dlen handling, but since the
meaning will be different, rename the current flag to specify it apply
only on ciphers algorithms.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +-
drivers/crypto/allwinner/sun8i
This patch split the do_one_request into three.
Prepare will handle all DMA mapping and initialisation of the task
structure.
Unprepare will clean all DMA mapping.
And the do_one_request will be limited to just executing the task.
Signed-off-by: Corentin Labbe
---
.../allwinner/sun8i-ce/sun8i
This patch fixes the warning:
warning: comparison of integer expressions of different signedness: 'int' and
'long unsigned int' [-Wsign-compare]
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 7 ---
1 file changed, 4 insert
This patch adds a new stat_bytes counter in the sun8i-ce debugfs.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
The SS support multiples hash algorithms, this patch adds support for
MD5, SHA1, SHA224 and SHA256.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 9 +
drivers/crypto/allwinner/sun8i-ss/Makefile| 1 +
.../crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 155
This patch fixes the warning:
warning: comparison of integer expressions of different signedness: 'int' and
'long unsigned int' [-Wsign-compare]
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 7 ---
1 file changed, 4 insert
t;)
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
index 138759dc8190..08ed1ca12baf 10
The CE support multiples hash algorithms, this patch adds support for
MD5, SHA1, SHA224, SHA256, SHA384 and SHA512.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 10 +
drivers/crypto/allwinner/sun8i-ce/Makefile| 1 +
.../crypto/allwinner/sun8i-ce/sun8i
This patch adds some comment on structures used by sun8i-ss.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
index
This patch reworks the way debug info are printed.
Instead of printing raw numbers, let's add a bit of context.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/allw
This patch had support for the PRNG present in the CE.
The output was tested with rngtest without any failure.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 8 +
drivers/crypto/allwinner/sun8i-ce/Makefile| 1 +
.../crypto/allwinner/sun8i-ce/sun8i-ce
This fixes a trivial typo.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
index 377ea7acb54d
This patch had support for the PRNG present in the SS.
The output was tested with rngtest without any failure.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 8 +
drivers/crypto/allwinner/sun8i-ss/Makefile| 1 +
.../crypto/allwinner/sun8i-ss/sun8i-ss
Some line got only spaces, remove them
Signed-off-by: Corentin Labbe
---
crypto/proc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/proc.c b/crypto/proc.c
index 08d8c2bc7e62..12fccb9c5205 100644
--- a/crypto/proc.c
+++ b/crypto/proc.c
@@ -36,7 +36,7 @@ static
k 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.
Corentin Labbe (7):
crypto
Signed-off-by: Corentin Labbe
---
.../allwinner/sun4i-ss/sun4i-ss-cipher.c | 34 +++
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
index 2614640231d
rypto
accelerator")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-ciph
This patch enable to access usage stats for each algorithm.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 9
.../allwinner/sun4i-ss/sun4i-ss-cipher.c | 21
.../crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 54 +++
.../crypto
When running the non-optimized cipher function, SS produce partial random
output.
This is due to linearize buffers being reseted after each loop.
Fixes: 8d3bcb9900ca ("crypto: sun4i-ss - reduce stack usage")
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-s
t;)
Cc:
Signed-off-by: Corentin Labbe
---
.../crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c
ind
The need_fallback is never initialized and seem to be always true at runtime.
So all hardware operations are always bypassed.
Fixes: 0ae1f46c55f87 ("crypto: sun4i-ss - fallback when length is not multiple
of blocksize")
Cc:
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinne
This patchs fixes some remaining style issue.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 3 ---
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 1 +
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/allwinner/sun4i-ss
) {
> - if (PTR_ERR(ss->reset) == -EPROBE_DEFER)
> - return PTR_ERR(ss->reset);
> - dev_err(&pdev->dev, "No reset control found\n");
> - return PTR_ERR(ss->reset);
> - }
> + if (IS_ERR(ss->reset))
> + return dev_err_probe(&pdev->dev, PTR_ERR(ss->reset),
> + "No reset control found\n");
>
> mutex_init(&ss->mlock);
>
> --
> 2.17.1
>
Hello
Acked-by: Corentin Labbe
Tested-by: Corentin Labbe
Thanks
On Fri, Sep 11, 2020 at 02:13:55PM +1000, Herbert Xu wrote:
> On Thu, Sep 10, 2020 at 02:22:48PM +0200, Corentin Labbe wrote:
> >
> > I get some md5 error on both A20+BE:
> > alg: ahash: md5 test failed (wrong result) on test vector \"random:
> > psize=129
On Fri, Sep 11, 2020 at 02:13:55PM +1000, Herbert Xu wrote:
> On Thu, Sep 10, 2020 at 02:22:48PM +0200, Corentin Labbe wrote:
> >
> > I get some md5 error on both A20+BE:
> > alg: ahash: md5 test failed (wrong result) on test vector \"random:
> > psize=129
On Tue, Sep 08, 2020 at 03:00:36PM +1000, Herbert Xu wrote:
> On Mon, Sep 07, 2020 at 06:00:29PM +0200, Corentin Labbe wrote:
> >
> > The put_unaligned should be _le32.
> >
> > This fix the modprobe tcrypt fail.
>
> Thanks. Yes the original code was correct
When adding allwinner,sun8i-a33-crypto, I forgot to add that it needs reset.
Furthermore, there are no need to use items to list only one compatible
in compatible list.
Fixes: f81547ba7a98 ("dt-bindings: crypto: add new compatible for A33 SS")
Signed-off-by: Corentin Labbe
---
Chang
On Mon, Sep 07, 2020 at 04:24:00PM +1000, Herbert Xu wrote:
> On Sun, Sep 06, 2020 at 04:52:24PM +0800, kernel test robot wrote:
> >
> > >> drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:483:35: sparse:
> > >> sparse: incorrect type in assignment (different base types) @@
> > >> expected u
On Mon, Sep 07, 2020 at 04:24:00PM +1000, Herbert Xu wrote:
> On Sun, Sep 06, 2020 at 04:52:24PM +0800, kernel test robot wrote:
> >
> > >> drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:483:35: sparse:
> > >> sparse: incorrect type in assignment (different base types) @@
> > >> expected u
On Fri, Sep 04, 2020 at 12:37:19PM -0700, Joe Perches wrote:
> On Fri, 2020-09-04 at 11:10 +0000, Corentin Labbe wrote:
> > This patch fix a double empty line issue reported by checkpatch.
> > While at it, since now the maximum line length is now 100, reorder some
> > wrappe
Hash algorithms will need also a spetial t_dlen handling, but since the
meaning will be different, rename the current flag to specify it apply
only on ciphers algorithms.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +-
drivers/crypto/allwinner/sun8i
This patch adds some comment on structures used by sun8i-ss.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
index
This patch reworks the way debug info are printed.
Instead of printing raw numbers, let's add a bit of context.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/allw
This fixes a trivial typo.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
index 377ea7acb54d
-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 8 ++
drivers/crypto/allwinner/sun8i-ce/Makefile| 1 +
.../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 18 +++
.../crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 127 ++
drivers/crypto/allwinner/sun8i-ce
This patch fixes the warning:
warning: comparison of integer expressions of different signedness: 'int' and
'long unsigned int' [-Wsign-compare]
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 7 ---
1 file changed, 4 insert
t;)
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
index 138759dc8190..08ed1ca12baf 10
This patch had support for the PRNG present in the CE.
The output was tested with rngtest without any failure.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 8 +
drivers/crypto/allwinner/sun8i-ce/Makefile| 1 +
.../crypto/allwinner/sun8i-ce/sun8i-ce
This patch fixes the warning:
warning: comparison of integer expressions of different signedness: 'int' and
'long unsigned int' [-Wsign-compare]
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 7 ---
1 file changed, 4 insert
Error registers are different across SoCs.
This patch handle those difference.
Signed-off-by: Corentin Labbe
---
.../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 62 ---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 8 +++
2 files changed, 62 insertions(+), 8 deletions
The CE support multiples hash algorithms, this patch adds support for
MD5, SHA1, SHA224, SHA256, SHA384 and SHA512.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/Kconfig | 10 +
drivers/crypto/allwinner/sun8i-ce/Makefile| 1 +
.../crypto/allwinner/sun8i-ce/sun8i
This patch fix a double empty line issue reported by checkpatch.
While at it, since now the maximum line length is now 100, reorder some
wrapped line.
Signed-off-by: Corentin Labbe
---
.../allwinner/sun8i-ce/sun8i-ce-cipher.c | 34 ++-
.../crypto/allwinner/sun8i-ce/sun8i-ce
This patch adds a new stat_bytes counter in the sun8i-ce debugfs.
Signed-off-by: Corentin Labbe
---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
This patch split the do_one_request into three.
Prepare will handle all DMA mapping and initialisation of the task
structure.
Unprepare will clean all DMA mapping.
And the do_one_request will be limited to just executing the task.
Signed-off-by: Corentin Labbe
---
.../allwinner/sun8i-ce/sun8i
Instead of storing IV data in the channel context, store them in the
request context.
Storing them in the channel structure was conceptualy wrong since they
are per request related.
Signed-off-by: Corentin Labbe
---
.../allwinner/sun8i-ce/sun8i-ce-cipher.c | 27 +--
drivers
1 - 100 of 571 matches
Mail list logo