[PATCH] crypto: cavium/nitrox - fix firmware assignment to AE cores

2019-09-19 Thread Phani Kiran Hemadri
This patch fixes assigning UCD block number of Asymmetric crypto firmware to AE cores of CNN55XX device. Fixes: a7268c4d4205 ("crypto: cavium/nitrox - Add support for loading asymmetric crypto firmware") Signed-off-by: Phani Kiran Hemadri Reviewed-by: Srikanth Jampala --- drivers/crypto/caviu

[PATCH] crypto: pcrypt - forbid recursive instantiation

2019-09-19 Thread Steffen Klassert
If the pcrypt template is used multiple times in an algorithm, then a deadlock occurs because all pcrypt instances share the same padata_instance, which completes requests in the order submitted. That is, the inner pcrypt request waits for the outer pcrypt request while the outer request is alread

[PATCH] crypto: qce - add CRYPTO_ALG_KERN_DRIVER_ONLY flag

2019-09-19 Thread Eneas U de Queiroz
Set the CRYPTO_ALG_KERN_DRIVER_ONLY flag to all algorithms exposed by the qce driver, since they are all hardware accelerated, accessible through a kernel driver only, and not available directly to userspace. Signed-off-by: Eneas U de Queiroz diff --git a/drivers/crypto/qce/ablkcipher.c b/driver

[PATCH] crypto: chtls - simplify a bit 'create_flowc_wr_skb()'

2019-09-19 Thread Christophe JAILLET
Use '__skb_put_data()' instead of rewritting it. This improves readability. Signed-off-by: Christophe JAILLET --- drivers/crypto/chelsio/chtls/chtls_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c b/drivers/crypto/chelsio/chtls/ch

Re: Can KEY_DH_OPERATIONS become tristate? (was: Re: Kernel 5.3.0 stuck during boot on Amiga)

2019-09-19 Thread Geert Uytterhoeven
Hi David, On Wed, Sep 18, 2019 at 6:43 PM David Howells wrote: > Geert Uytterhoeven wrote: > > > > TL;DR: CONFIG_CRYPTO_DH=y is reported to cause boot delays of several > > > > minutes on old and slow machines. > > > > > > Why is it doing that? It doesn't do anything unless it is called, so > >

Re: [PATCH v2] crypto: ccp - Release all allocated memory if sha type is invalid

2019-09-19 Thread Gary R Hook
On 9/19/19 11:04 AM, Navid Emamdoost wrote: > Release all allocated memory if sha type is invalid: > In ccp_run_sha_cmd, if the type of sha is invalid, the allocated > hmac_buf should be released. > > v2: fix the goto. > > Signed-off-by: Navid Emamdoost Acked-by: Gary R Hook > --- > drivers

Re: [PATCH v2 2/2] crypto: sun4i-ss: enable pm_runtime

2019-09-19 Thread Maxime Ripard
Hi, On Thu, Sep 19, 2019 at 07:10:35AM +0200, Corentin Labbe wrote: > This patch enables power management on the Security System. > > Signed-off-by: Corentin Labbe > --- > drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 9 +++ > drivers/crypto/sunxi-ss/sun4i-ss-core.c | 94 +++

[PATCH v2] crypto: ccp - Release all allocated memory if sha type is invalid

2019-09-19 Thread Navid Emamdoost
Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost --- drivers/crypto/ccp/ccp-ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --gi

[PATCH 2/2] [v2] crypto: hisilicon - allow compile-testing on x86

2019-09-19 Thread Arnd Bergmann
To avoid missing arm64 specific warnings that get introduced in this driver, allow compile-testing on all 64-bit architectures. The only actual arm64 specific code in this driver is an open- coded 128 bit MMIO write. On non-arm64 the same can be done using memcpy_toio. What I also noticed is that

Re: [PATCH 2/2] crypto: hisilicon - avoid unused function warning

2019-09-19 Thread Arnd Bergmann
On Thu, Sep 19, 2019 at 3:48 PM Herbert Xu wrote: > > On Thu, Sep 19, 2019 at 04:11:13PM +0800, Zhou Wang wrote: > > On 2019/9/13 17:17, Herbert Xu wrote: > > > On Fri, Sep 06, 2019 at 05:22:30PM +0200, Arnd Bergmann wrote: > > >> The only caller of hisi_zip_vf_q_assign() is hidden in an #ifdef, >

[PATCH 2/2] crypto: hisilicon - allow compile-testing on x86

2019-09-19 Thread Arnd Bergmann
To avoid missing arm64 specific warnings that get introduced in this driver, allow compile-testing on all 64-bit architectures. The only actual arm64 specific code in this driver is an open- coded 128 bit MMIO write. On non-arm64 the same can be done using memcpy_toio. What I also noticed is that

[PATCH 1/2] [v2] crypto: hisilicon - avoid unused function warning

2019-09-19 Thread Arnd Bergmann
The only caller of hisi_zip_vf_q_assign() is hidden in an #ifdef, so the function causes a warning when CONFIG_PCI_IOV is disabled: drivers/crypto/hisilicon/zip/zip_main.c:740:12: error: unused function 'hisi_zip_vf_q_assign' [-Werror,-Wunused-function] Replace the #ifdef with an IS_ENABLED() ch

Re: [PATCH 2/2] crypto: hisilicon - avoid unused function warning

2019-09-19 Thread Herbert Xu
On Thu, Sep 19, 2019 at 04:11:13PM +0800, Zhou Wang wrote: > On 2019/9/13 17:17, Herbert Xu wrote: > > On Fri, Sep 06, 2019 at 05:22:30PM +0200, Arnd Bergmann wrote: > >> The only caller of hisi_zip_vf_q_assign() is hidden in an #ifdef, > >> so the function causes a warning when CONFIG_PCI_IOV is d

Re: [PATCH 12/12] crypto: caam - change JR device ownership scheme

2019-09-19 Thread Herbert Xu
On Thu, Sep 19, 2019 at 11:19:22AM +, Horia Geanta wrote: > > What should a driver do when: > -user tries to unbind it AND > -there are tfms referencing algorithms registered by this driver > > 1. If driver tries to unregister the algorithms during its .remove() > callback, then this BUG_ON is

Re: [PATCH] crypto: ccp - release hmac_buf if ccp_run_sha_cmd fails

2019-09-19 Thread Gary R Hook
On 9/16/19 8:22 AM, Lendacky, Thomas wrote: > On 9/13/19 6:48 PM, Navid Emamdoost wrote: >> In ccp_run_sha_cmd, if the type of sha is invalid, the allocated >> hmac_buf should be released. >> >> Signed-off-by: Navid Emamdoost >> --- >> drivers/crypto/ccp/ccp-ops.c | 1 + >> 1 file changed, 1 in

Re: [PATCH 12/12] crypto: caam - change JR device ownership scheme

2019-09-19 Thread Horia Geanta
On 9/18/2019 6:13 AM, Andrey Smirnov wrote: >> I think you need to do some form of slow wait loop in jrpriv until >> jrpriv->tfm_count reaches zero. > Hmm, what do we do if it never does? Why do you think it would be > better than cancelling all outstanding jobs and resetting the HW? > Herbert, W

Re: crypto: aes - rename local routines to prevent future clashes

2019-09-19 Thread Ard Biesheuvel
On Thu, 19 Sep 2019 at 12:43, Geert Uytterhoeven wrote: > > Hi Ard, > Hello Geert, > On Wed, Sep 18, 2019 at 9:59 PM Linux Kernel Mailing List > wrote: > > Commit: 724ecd3c0eb7040d423b22332a60d097e2666820 > > Parent: 20bb4ef038a97b8bb5c07d2a1125019a93f618b3 > > Refname:refs/heads/ma

Re: crypto: aes - rename local routines to prevent future clashes

2019-09-19 Thread Geert Uytterhoeven
Hi Ard, On Wed, Sep 18, 2019 at 9:59 PM Linux Kernel Mailing List wrote: > Commit: 724ecd3c0eb7040d423b22332a60d097e2666820 > Parent: 20bb4ef038a97b8bb5c07d2a1125019a93f618b3 > Refname:refs/heads/master > Web: > https://git.kernel.org/torvalds/c/724ecd3c0eb7040d423b22332a60d09

Re: [PATCH 2/2] crypto: hisilicon - avoid unused function warning

2019-09-19 Thread Zhou Wang
On 2019/9/13 17:17, Herbert Xu wrote: > On Fri, Sep 06, 2019 at 05:22:30PM +0200, Arnd Bergmann wrote: >> The only caller of hisi_zip_vf_q_assign() is hidden in an #ifdef, >> so the function causes a warning when CONFIG_PCI_IOV is disabled: >> >> drivers/crypto/hisilicon/zip/zip_main.c:740:12: erro