[PATCH] cypto: mediatek - fix leaks in mtk_desc_ring_alloc

2020-09-02 Thread Xiaoliang Pang
In the init loop, if an error occurs in function 'dma_alloc_coherent', then goto the err_cleanup section, in the cleanup loop, after run i--, the struct mtk_ring rising[i] will not be released, causing a memory leak Signed-off-by: Xiaoliang Pang --- drivers/crypto/mediatek/mtk-platform.c | 2 +-

[PATCH] padata: fix possible padata_works_lock deadlock

2020-09-02 Thread Daniel Jordan
syzbot reports, WARNING: inconsistent lock state 5.9.0-rc2-syzkaller #0 Not tainted inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.0/26715 takes: (padata_works_lock){+.?.}-{2:2}, at: padata_do_parallel kernel/padata.c:220 {IN-SOFTIR

[PATCH 1/4] crypto: caam - Fix kerneldoc

2020-09-02 Thread Krzysztof Kozlowski
Fix kerneldoc warnings: drivers/crypto/caam/caamalg_qi2.c:73: warning: cannot understand function prototype: 'struct caam_ctx ' drivers/crypto/caam/caamalg_qi2.c:2962: warning: cannot understand function prototype: 'struct caam_hash_ctx ' Signed-off-by: Krzysztof Kozlowski --- drivers/cry

[PATCH 2/4] crypto: caam - Simplify with dev_err_probe()

2020-09-02 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/caam/caamalg_qi2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/caam/caamal

[PATCH 3/4] crypto: stm32-hash - Simplify with dev_err_probe()

2020-09-02 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/stm32/stm32-hash.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/s

[PATCH 4/4] crypto: allwinner/sun8i - Simplify with dev_err_probe()

2020-09-02 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 9 +++-- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 9 +++--

Re: [PATCH] crypto/x86: Use XORL r32,32 in curve25519-x86_64.c

2020-09-02 Thread Jason A. Donenfeld
On Wed, Sep 2, 2020 at 1:42 PM Uros Bizjak wrote: > > On Wed, Sep 2, 2020 at 11:17 AM wrote: > > > > On Wed, Sep 02, 2020 at 07:50:36AM +0200, Uros Bizjak wrote: > > > On Tue, Sep 1, 2020 at 9:12 PM Jason A. Donenfeld wrote: > > > > > > > > On Tue, Sep 1, 2020 at 8:13 PM Jason A. Donenfeld > >

Re: [PATCH] crypto/x86: Use XORL r32,32 in curve25519-x86_64.c

2020-09-02 Thread Jason A. Donenfeld
On Wed, Sep 2, 2020 at 11:44 AM wrote: > > On Wed, Sep 02, 2020 at 07:50:36AM +0200, Uros Bizjak wrote: > > On Tue, Sep 1, 2020 at 9:12 PM Jason A. Donenfeld wrote: > > > > > > On Tue, Sep 1, 2020 at 8:13 PM Jason A. Donenfeld wrote: > > > > operands are the same. Also, have you seen any measura

Re: [PATCH] dt-bindings: crypto: Specify that allwinner,sun8i-a33-crypto needs reset

2020-09-02 Thread Maxime Ripard
On Wed, Sep 02, 2020 at 11:17:16AM +0200, Corentin Labbe wrote: > 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 comp

[PATCH -next] crypto: pkcs7: Use match_string() helper to simplify the code

2020-09-02 Thread YueHaibing
match_string() returns the array index of a matching string. Use it instead of the open-coded implementation. Signed-off-by: YueHaibing --- crypto/asymmetric_keys/pkcs7_verify.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/crypto/asymmetric_keys/pkcs7_verify.c b/

RE: [PATCH v2 1/4] crypto: inside-secure - use kfree_sensitive()

2020-09-02 Thread Van Leeuwen, Pascal
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > On Behalf Of Denis Efremov > Sent: Thursday, August 27, 2020 8:44 AM > To: linux-crypto@vger.kernel.org > Cc: Denis Efremov ; Corentin Labbe > ; Herbert Xu > ; linux-ker...@vger.kernel.org > Subject: [PATCH v2 1/4] crypto:

Re: [PATCH] crypto/x86: Use XORL r32,32 in curve25519-x86_64.c

2020-09-02 Thread Uros Bizjak
On Wed, Sep 2, 2020 at 11:17 AM wrote: > > On Wed, Sep 02, 2020 at 07:50:36AM +0200, Uros Bizjak wrote: > > On Tue, Sep 1, 2020 at 9:12 PM Jason A. Donenfeld wrote: > > > > > > On Tue, Sep 1, 2020 at 8:13 PM Jason A. Donenfeld wrote: > > > > operands are the same. Also, have you seen any measura

[PATCH v3 1/3] dt-bindings: vendor-prefixes: Add Xiphera vendor prefix

2020-09-02 Thread Atte Tommiska
Xiphera is an FPGA-based cryptographic solutions provider based in Finland. Website of the company: https://xiphera.com/ Signed-off-by: Atte Tommiska Acked-by: Rob Herring --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentat

[PATCH v3 3/3] hwrng: xiphera-trng: add support for XIP8001B hwrng

2020-09-02 Thread Atte Tommiska
Xiphera XIP8001B is an FPGA-based True Random Number Generator Intellectual Property (IP) Core which can be instantiated in multiple FPGA families. This driver adds Linux support for it through the hwrng interface. Signed-off-by: Atte Tommiska Reported-by: kernel test robot --- drivers/char/hw_

[PATCH v3 0/3] hwrng: add support for Xiphera XIP8001B

2020-09-02 Thread Atte Tommiska
This patchset introduces a linux driver for Xiphera's XIP8001B IP. The IP is an FPGA-based TRNG which can be used in various FPGA families. The IP is in use in multiple customer projects and in Xiphera's own products. changes in v2: - fixed the 'make dt_binding_check' errors in the devicetree s

[PATCH v3 2/3] dt-bindings: rng: add bindings for Xiphera XIP8001B hwrng

2020-09-02 Thread Atte Tommiska
Document the device tree bindings of Xiphera's XIP8001B-trng IP. Signed-off-by: Atte Tommiska Reviewed-by: Rob Herring --- .../bindings/rng/xiphera,xip8001b-trng.yaml | 33 +++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/rng/xiphera,

Re: [PATCH RESEND 00/10] crypto: hisilicon/zip - misc clean up

2020-09-02 Thread shenyang (M)
any comment? Thanks, Yang On 2020/8/24 11:11, Yang Shen wrote: This patchset make some clean up: patch 1:remove useless parameters patch 4:replace 'sprintf' with 'scnprintf' patch 7:fix static check warning and the rest patch fix some coding style Resend this patch series because it depends on

[PATCH] dt-bindings: crypto: Specify that allwinner,sun8i-a33-crypto needs reset

2020-09-02 Thread Corentin Labbe
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 --- .../bindings/crypt

Re: [PATCH] crypto/x86: Use XORL r32,32 in curve25519-x86_64.c

2020-09-02 Thread peterz
On Wed, Sep 02, 2020 at 07:50:36AM +0200, Uros Bizjak wrote: > On Tue, Sep 1, 2020 at 9:12 PM Jason A. Donenfeld wrote: > > > > On Tue, Sep 1, 2020 at 8:13 PM Jason A. Donenfeld wrote: > > > operands are the same. Also, have you seen any measurable differences > > > when benching this? I can stic

Re: [PATCH v2 1/4] crypto: inside-secure - use kfree_sensitive()

2020-09-02 Thread Antoine Tenart
Hello Denis, Quoting Denis Efremov (2020-08-27 08:43:59) > Use kfree_sensitive() instead of open-coding it. > > Signed-off-by: Denis Efremov Acked-by: Antoine Tenart Thanks! Antoine > --- > drivers/crypto/inside-secure/safexcel_hash.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-