Re: [PATCH 1/1] crypto: ux500: hash: Add namespacing to hash_init()

2020-07-09 Thread Herbert Xu
sing argument 1 of > '__hash_init' from incompatible pointer type > [-Werror=incompatible-pointer-types] > 1362 | return hash_init(req); > > Fix this by namespacing the local hash_init() such that the > source of confusion is removed. > > Cc: Linus Walleij &g

[PATCH] crypto: ccp - Silence strncpy warning

2020-07-09 Thread Herbert Xu
This patch kills an strncpy by using strscpy instead. The name would be silently truncated if it is too long. Signed-off-by: Herbert Xu diff --git a/drivers/crypto/ccp/ccp-crypto-sha.c b/drivers/crypto/ccp/ccp-crypto-sha.c index b0cc2bd73af8..2bc29736fa45 100644 --- a/drivers/crypto/ccp/ccp

Re: [PATCH 0/5] crypto: clean up ARM/arm64 glue code for GHASH and GCM

2020-07-09 Thread Herbert Xu
ne helper to suppress indirect calls > crypto: arm/ghash - use variably sized key struct > > arch/arm/crypto/ghash-ce-glue.c | 51 ++-- > arch/arm64/crypto/ghash-ce-glue.c | 257 +++- > 2 files changed, 118 insertions(+), 190 deletions(-) All applied. T

Re: [PATCH 3/5] crypto: arm64/gcm - use variably sized key struct

2020-07-09 Thread Herbert Xu
On Thu, Jul 09, 2020 at 10:12:31PM +1000, Herbert Xu wrote: > On Thu, Jul 09, 2020 at 06:22:58PM +1000, Herbert Xu wrote: > > On Mon, Jun 29, 2020 at 09:39:23AM +0200, Ard Biesheuvel wrote: > > > Now that the ghash and gcm drivers are split, we no longer need to > > >

Re: [PATCH 3/5] crypto: arm64/gcm - use variably sized key struct

2020-07-09 Thread Herbert Xu
On Thu, Jul 09, 2020 at 06:22:58PM +1000, Herbert Xu wrote: > On Mon, Jun 29, 2020 at 09:39:23AM +0200, Ard Biesheuvel wrote: > > Now that the ghash and gcm drivers are split, we no longer need to allocate > > a key struct for the former that carries powers of H that are only

Re: [PATCH 5/5] crypto: arm/ghash - use variably sized key struct

2020-07-09 Thread Herbert Xu
e a const argument, it only tells > the caller that the array will be left untouched. This is why the > compiler is perfectly happy with this arrangement. You're right. Luc, here is the patch that triggers the bogus warning with sparse. Thanks, -- Email: Herbert Xu Home Page: http:/

Re: [Patch v2 8/9] crypto: hisilicon/qm - fix the process of register algorithms to crypto

2020-07-09 Thread Herbert Xu
pared. We fix > this in 'hisi_qm', and you will see it soon. I cannot accept a clearly buggy patch. So please fix this and resubmit. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 3/5] crypto: arm64/gcm - use variably sized key struct

2020-07-09 Thread Herbert Xu
ittle bit. > > Signed-off-by: Ard Biesheuvel > --- > arch/arm64/crypto/ghash-ce-glue.c | 49 +--- > 1 file changed, 21 insertions(+), 28 deletions(-) sparse doesn't like this patch either. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.o

Re: [PATCH 5/5] crypto: arm/ghash - use variably sized key struct

2020-07-09 Thread Herbert Xu
/arm/crypto/ghash-ce-glue.c:69:64:got unsigned long long [usertype] ( * )[2] Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCHv5 2/7] crypto: sa2ul: Add crypto driver

2020-07-09 Thread Herbert Xu
On Thu, Jul 09, 2020 at 06:03:01PM +1000, Herbert Xu wrote: > On Wed, Jul 01, 2020 at 11:05:48AM +0300, Tero Kristo wrote: > > From: Keerthy > > > > Adds a basic crypto driver and currently supports AES/3DES > > in cbc mode for both encryption and decryption. >

Re: [PATCHv5 2/7] crypto: sa2ul: Add crypto driver

2020-07-09 Thread Herbert Xu
not declared. Should it be static? ../drivers/crypto/sa2ul.c:2199:6: warning: symbol 'sa_unregister_algos' was not declared. Should it be static? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 0/6] crypto: hisilicon/hpre bugfix - misc fixes

2020-07-09 Thread Herbert Xu
/hpre - Add a switch in sriov_configure > crypto: hisilicon/hpre - update debugfs interface parameters > > drivers/crypto/hisilicon/hpre/hpre_main.c | 114 > -- > 1 file changed, 62 insertions(+), 52 deletions(-) This doesn't apply against

Re: [Patch v2 8/9] crypto: hisilicon/qm - fix the process of register algorithms to crypto

2020-07-08 Thread Herbert Xu
x27; to > 'hisi_zip_probe'. The algorithms will be registered to crypto only when > there is device bind on the driver. And when the devices are removed, > the algorithms will be unregistered. You can't just unregister a live algorithm because if someone holds a reference

Re: [PATCH 2/6] crypto: algapi - use common mechanism for inheriting flags

2020-07-08 Thread Herbert Xu
pto_algt_inherited_mask, e.g., u32 mask; int err; err = crypto_algt_inherited_mask(tb, CRYPTO_ALG_TYPE_SHASH); if (err < 0) return err; mask = err; This could then be used to simplify other templates too, such as gcm. Thanks, --

Re: [PATCH] crypto: caam - Remove broken arc4 support

2020-07-08 Thread Herbert Xu
e kernel (hence from caam driver) > due to skcipher limitations in terms of handling the keystream. Actually that's not quite true. The reason I create this patch in the first place is to remove this limitation from skcipher. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.or

[v3 PATCH] crypto: chacha - Add DEFINE_CHACHA_STATE macro

2020-07-07 Thread Herbert Xu
ded which takes care of all the work to ensure that it is actually aligned on the stack. This patch also changes an awkward use of CHACHA_STATE_WORDS to CHACHA_BLOCK_SIZE. Signed-off-by: Herbert Xu diff --git a/arch/x86/crypto/chacha_glue.c b/arch/x86/crypto/chacha_glue.c index 22250091cdbec..20d02

[PATCH] crypto: lib/chacha20poly1305 - Add missing function declaration

2020-07-07 Thread Herbert Xu
This patch adds a declaration for chacha20poly1305_selftest to silence a sparse warning. Signed-off-by: Herbert Xu diff --git a/include/crypto/chacha20poly1305.h b/include/crypto/chacha20poly1305.h index 234ee28078efd..d2ac3ff7dc1ec 100644 --- a/include/crypto/chacha20poly1305.h +++ b/include

[PATCH] hwrng: ba431 - Include kernel.h

2020-07-06 Thread Herbert Xu
There are multiple things in this file that requires kernel.h but it's only included through other header files indirectly. This patch adds a direct inclusion as those indirect inclusions may go away at any point. Signed-off-by: Herbert Xu diff --git a/drivers/char/hw_random/ba431-rng

[v2 PATCH] crypto: chacha - Add DEFINE_CHACHA_STATE macro

2020-07-06 Thread Herbert Xu
t to where the state array is defined. To do so a macro DEFINE_CHACHA_STATE has been added which takes care of all the work to ensure that it is actually aligned on the stack. Signed-off-by: Herbert Xu diff --git a/arch/x86/crypto/chacha_glue.c b/arch/x86/crypto/chacha_glue.c index 22250091cdbec..20

[PATCH] crypto: chacha - Add DEFINE_CHACHA_STATE macro

2020-07-06 Thread Herbert Xu
which takes care of all the work to ensure that it is actually aligned on the stack. Signed-off-by: Herbert Xu diff --git a/arch/x86/crypto/chacha_glue.c b/arch/x86/crypto/chacha_glue.c index 22250091cdbec..20d0252f11aa5 100644 --- a/arch/x86/crypto/chacha_glue.c +++ b/arch/x86/crypto

Re: [PATCH] crypto, x86: aesni: add compatibility with IAS

2020-07-03 Thread Herbert Xu
On Fri, Jul 03, 2020 at 10:36:43AM +0200, Sedat Dilek wrote: > > Can you please apply my patch, too? Please repost your patch without the 5.7 tag. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2] crypto: ccp - Update CCP driver maintainer information

2020-07-02 Thread Herbert Xu
+ > 1 file changed, 9 insertions(+) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: hisilicon/qm: Change type of pasid to u32

2020-07-02 Thread Herbert Xu
-- > PASID type will be changed consistently as u32: > https://lore.kernel.org/patchwork/patch/1257770/ > > drivers/crypto/hisilicon/qm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: ccp - Fix use of merged scatterlists

2020-07-02 Thread Herbert Xu
in the DMA mapped > representation. > > Fixes: 63b945091a070 ("crypto: ccp - CCP device driver and interface support") > Signed-off-by: John Allen > Cc: sta...@vger.kernel.org > --- > drivers/crypto/ccp/ccp-dev.h | 1 + > drivers/crypto/ccp/ccp-ops.c | 37 ++++++

Re: [PATCH] crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init

2020-07-02 Thread Herbert Xu
ding the missed function call. > > Signed-off-by: Dinghao Liu > --- > drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 1 + > 1 file changed, 1 insertion(+) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http:

Re: [PATCH 0/3] qce crypto fixes for tcrypto failures

2020-07-02 Thread Herbert Xu
uest > > drivers/crypto/Kconfig | 2 ++ > drivers/crypto/qce/common.h | 2 ++ > drivers/crypto/qce/sha.c| 36 +--- > 3 files changed, 33 insertions(+), 7 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: ht

Re: [PATCH] crypto, x86: aesni: add compatibility with IAS

2020-07-02 Thread Herbert Xu
; Reported-by: Sedat Dilek > Reported-by: Fangrui Song > Tested-by: Sedat Dilek # build+boot Linux v5.7.5; > clang v11.0.0-git > Signed-off-by: Jian Cai > --- > arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 14 +++--- > 1 file changed, 3 insertions(+), 11

[PATCH] crypto: ccp - Fix sparse warnings

2020-07-02 Thread Herbert Xu
This patch fixes a number of endianness marking issues in the ccp driver. Signed-off-by: Herbert Xu diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index 82ac4c14c04c..7838f63bab32 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c

Re: [PATCH 2/5] crypto:hisilicon/sec2 - update busy processing logic

2020-07-02 Thread Herbert Xu
cklog, return '-EBUSY' to user. > After the request being finished, the cached requests will > be processed in the call back function. to notify the > corresponding user that SEC queue can process more requests. > > Signed-off-by: Kai Ye > Reviewed-by: Longfang Liu

Re: [PATCH v2 1/3] crypto: permit users to specify numa node of acomp hardware

2020-07-02 Thread Herbert Xu
fm->node = node; Should the kzalloc also use node? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: caam - Remove broken arc4 support

2020-07-02 Thread Herbert Xu
On Thu, Jul 02, 2020 at 05:56:16PM +1000, Herbert Xu wrote: > > For XTS I haven't decided whether to go this way or not. If it > does work out though we could even extend it to AEAD. But there is clearly a need for this functionality, and it's not just af_alg. Have a look at

Re: [PATCH] crypto: caam - Remove broken arc4 support

2020-07-02 Thread Herbert Xu
4 at first, where it's definitely an improvement over modifying the tfm context in encrypt/decrypt. For XTS I haven't decided whether to go this way or not. If it does work out though we could even extend it to AEAD. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apan

Re: [PATCH] crypto: caam - Remove broken arc4 support

2020-07-02 Thread Herbert Xu
n XTS. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: caam - Remove broken arc4 support

2020-07-02 Thread Herbert Xu
y have two users right now we can fix this by moving the state into the request and I'm working on it. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: caam - Remove broken arc4 support

2020-07-02 Thread Herbert Xu
ve the arc4 interface completely (and hope that nobody complains :) Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH] crypto: caam - Remove broken arc4 support

2020-07-01 Thread Herbert Xu
Signed-off-by: Herbert Xu diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index b2f9882bc010f..797bff9b93182 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -810,12 +810,6 @@ static int ctr_skcipher_setkey(struct crypto_skcipher

[v2 PATCH] crypto: af_alg - Fix regression on empty requests

2020-07-01 Thread Herbert Xu
x->init as long as one sendmsg(2) has been made, with or without a control message. Reported-by: Sachin Sant Reported-by: Naresh Kamboju Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when...") Signed-off-by: Herbert Xu diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 9

Re: [PATCH 1/3 v6] crypto: introduce the flag CRYPTO_ALG_ALLOCATES_MEMORY

2020-06-30 Thread Herbert Xu
struct aead_alg *alg; > + u32 mask; > int err; > > algt = crypto_get_attr_type(tb); > if (IS_ERR(algt)) > return PTR_ERR(algt); Then we could remove this bit. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCHv4 3/7] crypto: sa2ul: add sha1/sha256/sha512 support

2020-06-30 Thread Herbert Xu
o algif_hash, right? If so it'd be much easier to implement the buffering in user-space. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCHv4 3/7] crypto: sa2ul: add sha1/sha256/sha512 support

2020-06-30 Thread Herbert Xu
support this? What's the use-case? FWIW IPsec only uses digest. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCHv4 3/7] crypto: sa2ul: add sha1/sha256/sha512 support

2020-06-30 Thread Herbert Xu
stack so they must not be large. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCHv4 3/7] crypto: sa2ul: add sha1/sha256/sha512 support

2020-06-29 Thread Herbert Xu
an push this > to be processed by HW, otherwise I must fallback to SW. Does this sound like > a better approach? You can buffer up to a block obviously. Anything beyond that should just use a fallback. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herb

[PATCH] hwrng: ba431 - Add dependency on HAS_IOMEM

2020-06-29 Thread Herbert Xu
_ioremap_resource' This patch should fix the problem: ---8<--- The ba431 driver depends on HAS_IOMEM and this was missing from the Kconfig file. Reported-by: kernel test robot Fixes: 0289e9be5dc2 ("hwrng: ba431 - add support for BA431 hwrng") Signed-off-by: Herbert Xu diff --git a

Re: [PATCH 1/1] crypto: ux500: hash: Add namespacing to hash_init()

2020-06-29 Thread Herbert Xu
sing argument 1 of > '__hash_init' from incompatible pointer type > [-Werror=incompatible-pointer-types] > 1362 | return hash_init(req); > > Fix this by namespacing the local hash_init() such that the > source of confusion is removed. > > Cc: Linus Walleij &g

[PATCH 0/7] hwrng: Fix W=1 warnings

2020-06-29 Thread Herbert Xu
This patch series fixes a bunch of warnings encountered with W=1. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH 5/7] hwrng: st - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu --- drivers/char/hw_random/st-rng.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c

[PATCH 2/7] hwrng: omap - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. While we're at it this patch also expands the compiler coverage when CONFIG_OF is off by removing all the CONFIG_OF ifdefs. Signed-off-by: Herbert Xu --- drivers/char/hw_random/omap-rng.c |

[PATCH 6/7] hwrng: pic32 - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu --- drivers/char/hw_random/pic32-rng.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/pic32-rng.c b/drivers/char/hw_random/pic32

[PATCH 7/7] hwrng: octeon - Fix sparse warnings

2020-06-29 Thread Herbert Xu
This patch fixes a bunch of sparse warnings by adding __force tags when casting __iomem poitners to u64. Signed-off-by: Herbert Xu --- drivers/char/hw_random/octeon-rng.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers

[PATCH 3/7] hwrng: hisi - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu --- drivers/char/hw_random/hisi-rng.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/hisi-rng.c b/drivers/char/hw_random/hisi

[PATCH 1/7] hwrng: npcm - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Reported-by: kernel test robot Signed-off-by: Herbert Xu --- drivers/char/hw_random/npcm-rng.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/npcm-rng.c b

[PATCH 4/7] hwrng: bcm2835 - Fix W=1 unused variable warning

2020-06-29 Thread Herbert Xu
This patch fixes an unused variable warning when this driver is built with CONFIG_OF=n. Signed-off-by: Herbert Xu --- drivers/char/hw_random/bcm2835-rng.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random

[GIT PULL] Crypto Fixes for 5.8

2020-06-28 Thread Herbert Xu
) Daniel Jordan (1): padata: upgrade smp_mb__after_atomic to smp_mb in padata_do_serial Herbert Xu (1): crypto: af_alg - fix use-after-free in af_alg_accept() due to bh_lock_sock() crypto/af_alg.c | 26 +++--- crypto/algif_aead.c | 9

Re: [PATCH] crypto: af_alg - Fix regression on empty requests

2020-06-27 Thread Herbert Xu
On Fri, Jun 26, 2020 at 04:29:48PM +1000, Herbert Xu wrote: > > Reported-by: Sachin Sant > Reported-by: Naresh Kamboju > Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when...") > Signed-off-by: Herbert Xu Reported-by: kernel test robot -- Email: He

[PATCH] crypto: af_alg - Fix regression on empty requests

2020-06-25 Thread Herbert Xu
t distinguish the case of no metadata as opposed to an empty request. IOW it is always assumed that if you call recv(2) before sending metadata that you are working with an empty request. Reported-by: Sachin Sant Reported-by: Naresh Kamboju Fixes: f3c802a1f300 ("crypto: algif_aead - Onl

Re: [PATCH v2 0/3] fixes and update to essiv support

2020-06-25 Thread Herbert Xu
x resource leak on error path > crypto: ccree: adapt ccree essiv support to kcapi > crypto: ccree: remove unused field > > drivers/crypto/ccree/cc_cipher.c | 149 ++- > 1 file changed, 108 insertions(+), 41 deletions(-) All applied. Thanks.

Re: [PATCH] crypto: img-hash: remove redundant initialization of variable err

2020-06-25 Thread Herbert Xu
es-Coverity: ("Unused value") > Signed-off-by: Colin Ian King > --- > drivers/crypto/img-hash.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: ccp: remove redundant assignment to variable ret

2020-06-25 Thread Herbert Xu
erity: ("Unused value") > Signed-off-by: Colin Ian King > --- > drivers/crypto/ccp/ccp-ops.c | 1 - > 1 file changed, 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: caam/qi2 - fix return code in ahash_finup_no_ctx()

2020-06-25 Thread Herbert Xu
verridden by -ENOMEM. > > Signed-off-by: Horia Geantă > --- > drivers/crypto/caam/caamalg_qi2.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 1/2] cpt-crypto: don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified

2020-06-25 Thread Herbert Xu
reqmanager.c | 12 ++-- > drivers/crypto/cavium/cpt/request_manager.h |2 ++ > 3 files changed, 9 insertions(+), 6 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2] crypto: hisilicon - fix strncpy warning with strscpy

2020-06-25 Thread Herbert Xu
strlcpy since better truncation handling > suggested by Herbert > Rebase to 5.8-rc1 > > drivers/crypto/hisilicon/qm.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert

[PATCH] crypto: cpt - Fix sparse warnings

2020-06-25 Thread Herbert Xu
he BE behaviour as the correct one. Signed-off-by: Herbert Xu diff --git a/drivers/crypto/cavium/cpt/cptvf_algs.c b/drivers/crypto/cavium/cpt/cptvf_algs.c index 2e4bf90c5798..0f0991f9f294 100644 --- a/drivers/crypto/cavium/cpt/cptvf_algs.c +++ b/drivers/crypto/cavium/cpt/cptvf_algs.c @@ -99,10 +

Re: [PATCH 1/3] crypto: pass the flag CRYPTO_ALG_ALLOCATES_MEMORY

2020-06-25 Thread Herbert Xu
NHERITED_FLAGS (CRYPTO_ALG_ASYNC | > CRYPTO_ALG_ALLOCATES_MEMORY) Any reason why you need to renumber NOLOAD? If not please keep the existing values. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCHv4 3/7] crypto: sa2ul: add sha1/sha256/sha512 support

2020-06-25 Thread Herbert Xu
port the partial hashing interface, you must actually hash the data and not just save it in your context. Otherwise your export is completely meaningless. If your hardware cannot export partially hashed state, then you should use a software fallback for everything but digest. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 4/4] crypto: qat - fallback for xts with 192 bit keys

2020-06-25 Thread Herbert Xu
ur new patch just shows up as a comment on the old one. Please repost the whole series. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: LTP: crypto: af_alg02 regression on linux-next 20200621 tag

2020-06-23 Thread Herbert Xu
;s my introduction of the init variable that broke this. Let me investigate. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: LTP: crypto: af_alg02 regression on linux-next 20200621 tag

2020-06-22 Thread Herbert Xu
failing - Hung and time out > ltp-syscalls-tests: > * keyctl07 - PASS > * request_key03 - PASS > > Please suggest the way to debug / fix the af_alg02 and af_alg05 failures. Did you clear the MSG_MORE flag in the final send(2) call before you call recv(2)? Cheers, -- E

Re: [next-20200621] LTP tests af_alg02/05 failure on POWER9 PowerVM LPAR

2020-06-22 Thread Herbert Xu
rough recvmsg(2). Setting the MSG_MORE flag indicates that your request has not been sent in full. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[GIT PULL] Crypto Fixes for 5.8

2020-06-21 Thread Herbert Xu
PM imbalance on error Eric Biggers (1): crypto: algboss - don't wait during notifier callback Heinrich Schuchardt (1): crypto: caam - fix typos Herbert Xu (3): crypto: algif_skcipher - Cap recv SG list at ctx->used crypto: hisilicon - Cap block size at 2^31

Re: [PATCH] crypto: scompress - call the completion callback for the completed acomp_req

2020-06-20 Thread Herbert Xu
t acomp_req > *req, int dir) > } > out: > spin_unlock(&scratch->lock); > + > + if (req->base.complete) > + acomp_request_complete(req, ret); > + > return ret; > } Nack. This is a deliberate optimisation to allow the sync

Re: [PATCH] crypto: caam/qi2: remove redundant assignment to ret

2020-06-18 Thread Herbert Xu
rror code returned by dpaa2_caam_enqueue() > should be returned instead of -ENOMEM. You can do that as a follow-up. The patch is correct as is. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: caam/qi2: remove redundant assignment to ret

2020-06-18 Thread Herbert Xu
On Thu, Jun 18, 2020 at 01:40:55PM +0300, Horia Geantă wrote: > On 6/18/2020 10:58 AM, Herbert Xu wrote: > > On Thu, Jun 11, 2020 at 04:39:34PM +0100, Colin King wrote: > >> From: Colin Ian King > >> > >> The variable ret is being assigned a value that is neve

Re: [PATCH] crypto: caam/qi2: remove redundant assignment to ret

2020-06-18 Thread Herbert Xu
t; Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King > --- > drivers/crypto/caam/caamalg_qi2.c | 2 -- > 1 file changed, 2 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 0/3] crypto: qat - update admin interface

2020-06-18 Thread Herbert Xu
nit_admin.h| 75 ++- > 2 files changed, 114 insertions(+), 57 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: hisilicon - update SEC driver module parameter

2020-06-18 Thread Herbert Xu
file changed, 3 insertions(+), 3 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 0/2] crc-t10dif library improvements

2020-06-18 Thread Herbert Xu
l crypto notify dead-lock". > > Eric Biggers (2): > crc-t10dif: use fallback in initial state > crc-t10dif: clean up some more things > > lib/crc-t10dif.c | 61 +--- > 1 file changed, 21 insertions(+), 40 deletions(-) All appli

Re: [PATCH] padata: upgrade smp_mb__after_atomic to smp_mb in padata_do_serial

2020-06-18 Thread Herbert Xu
ts") > Signed-off-by: Daniel Jordan > Cc: Herbert Xu > Cc: Steffen Klassert > Cc: linux-crypto@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > --- > kernel/padata.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Patch applied. Thanks. -- Emai

Re: [PATCH v2] crypto: hisilicon - allow smaller reads in debugfs

2020-06-18 Thread Herbert Xu
one byte at a time, that's fine or if you want > to read it in one 256 byte chunk that's also fine. Plus it deletes 21 > lines of code and is a lot cleaner. > > drivers/crypto/hisilicon/qm.c | 33 ++--- > 1 file changed, 6 insertions(+), 27 del

Re: [PATCH v2] crypto: caam/qi2 - add support for dpseci_reset()

2020-06-18 Thread Herbert Xu
| 2 ++ > drivers/crypto/caam/dpseci_cmd.h | 1 + > 4 files changed, 36 insertions(+) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 0/3] Replace user types and remove packed

2020-06-18 Thread Herbert Xu
| 54 +++--- > drivers/crypto/qat/qat_common/qat_asym_algs.c | 12 +- > drivers/crypto/qat/qat_common/qat_hal.c | 40 ++--- > drivers/crypto/qat/qat_common/qat_uclo.c | 20 +-- > .../qat/qat_dh895xcc/adf_dh895xcc_hw_data.c | 26 +-- > 23 files changed, 352 insertions(+

Re: [PATCH] crypto: caam - add clock info for VFxxx SoCs

2020-06-18 Thread Herbert Xu
On Mon, Jun 01, 2020 at 04:07:26PM -0700, Andrey Smirnov wrote: > Add a small bit of plumbing necessary to use CAAM on VFxxx SoCs. > > Signed-off-by: Andrey Smirnov > Cc: Chris Healy > Cc: Horia Geantă > Cc: Herbert Xu > Cc: Fabio Estevam > Cc: linux-...@nx

Re: [PATCH v2 0/2] hwrng: add support for Silex Insight BA431

2020-06-18 Thread Herbert Xu
header. > - Added missing endpoint and "If unsure, say Y" in the Kconfig like it is > done for the other rng drivers. > - Replaced the udelay() loop by readx_poll_timeout() in the driver. > - Added Arnd's ack in the second patch. All applied. Thanks. -- E

Re: [PATCH] crypto: qat - convert to SPDX License Identifiers

2020-06-18 Thread Herbert Xu
dh895xcc_hw_data.h | 48 +- > drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 48 +- > .../qat_dh895xccvf/adf_dh895xccvf_hw_data.c | 48 +- > .../qat_dh895xccvf/adf_dh895xccvf_hw_data.h | 48 +--------- > drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 48 +--

Re: [PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings

2020-06-18 Thread Herbert Xu
e4a85c6e47907a [2369/7050] crypto: sa2ul: > Add crypto driver > :: branch date: 3 hours ago > :: commit date: 5 months ago > > sa2ul.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) This driver does not exist in the cryptodev tree. Thanks, -- Email:

[PATCH] crypto: api - Prune inclusions in crypto.h

2020-06-18 Thread Herbert Xu
We haven't used string.h since the memcpy calls were removed so this patch removes its inclusion. The file uaccess.h isn't needed at all. However, removing it reveals that we do need to add an inclusion for refcount.h. Signed-off-by: Herbert Xu diff --git a/include/linux/crypto.h

Re: [v2 PATCH 0/3] crypto: skcipher - Add support for no chaining and partial chaining

2020-06-16 Thread Herbert Xu
chaining either. > > Also, please use a better name than "fcsize". Any suggestions? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] char: hw_random: Fix a reference count leak.

2020-06-16 Thread Herbert Xu
y, thank you for your work. > > Herbert, could you take a look at the Dinghao's patch, please? It was part of a number of patches that did similar things. The general conclusion was that it should call put_noidle instead. See https://patchwork.kernel.org/patch/11574843/ Cheers, -

[PATCH] crypto: omap-sham - Fix sparse/compiler warnings

2020-06-15 Thread Herbert Xu
This patch fixes sparse endianness warnings as well as compiler warnings on 64-bit hosts. Signed-off-by: Herbert Xu diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 82691a057d2a..954d703f2981 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c

[PATCH] crypto: omap-des - Fix sparse/compiler warnings

2020-06-15 Thread Herbert Xu
This patch fixes sparse endianness warnings as well as compiler warnings on 64-bit hosts. Signed-off-by: Herbert Xu diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index 8eda43319204..c9d38bcfd1c7 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -87,7

Re: [v2 PATCH 0/3] crypto: skcipher - Add support for no chaining and partial chaining

2020-06-15 Thread Herbert Xu
you're going to do that you might as well go a step further and allow cts to chain as it is so straightforward. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[v2 PATCH 1/3] crypto: skcipher - Add final chunk size field for chaining

2020-06-12 Thread Herbert Xu
d and therefore must be withheld if chaining is attempted. This attribute can also be used to indicate that no chaining is allowed. Its value should be set to -1 in that case. Signed-off-by: Herbert Xu --- include/crypto/skcipher.h | 23 +++ include/linux/crypto.h|

[v2 PATCH 3/3] crypto: cts - Add support for chaining

2020-06-12 Thread Herbert Xu
true end of a request. Signed-off-by: Herbert Xu --- crypto/cts.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/crypto/cts.c b/crypto/cts.c index 5e005c4f02215..3cca3112e7dca 100644 --- a/crypto/cts.c +++ b/crypto/cts.c @@ -100,7 +100,7 @@ static int

[v2 PATCH 2/3] crypto: algif_skcipher - Add support for fcsize

2020-06-12 Thread Herbert Xu
algif_skcipher will also now set the request flag CRYPTO_TFM_REQ_MORE when needed. Signed-off-by: Herbert Xu --- crypto/algif_skcipher.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index

[v2 PATCH 0/3] crypto: skcipher - Add support for no chaining and partial chaining

2020-06-12 Thread Herbert Xu
, namely cts-generic. Changing others should be fairly straightforward. In particular, we should mark all the ones that don't support chaining (e.g., most stream ciphers). Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~he

Re: [PATCH 1/3] crypto: skcipher - Add final chunk size field for chaining

2020-06-12 Thread Herbert Xu
plicit signedness conversion here? int -> unsigned int? Good catch. It's supposed to be int. Let me fix this. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH 2/3] crypto: algif_skcipher - Add support for fcsize

2020-06-12 Thread Herbert Xu
algif_skcipher will also now set the request flag CRYPTO_TFM_REQ_MORE when needed. Signed-off-by: Herbert Xu --- crypto/algif_skcipher.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index

[PATCH 3/3] crypto: cts - Add support for chaining

2020-06-12 Thread Herbert Xu
true end of a request. Signed-off-by: Herbert Xu --- crypto/cts.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/crypto/cts.c b/crypto/cts.c index 5e005c4f02215..3cca3112e7dca 100644 --- a/crypto/cts.c +++ b/crypto/cts.c @@ -100,7 +100,7 @@ static int

[PATCH 1/3] crypto: skcipher - Add final chunk size field for chaining

2020-06-12 Thread Herbert Xu
d and therefore must be withheld if chaining is attempted. This attribute can also be used to indicate that no chaining is allowed. Its value should be set to -1 in that case. Signed-off-by: Herbert Xu --- include/crypto/skcipher.h | 24 include/linux/crypto.h|

[PATCH 0/3] crypto: skcipher - Add support for no chaining and partial chaining

2020-06-12 Thread Herbert Xu
straightforward. In particular, we should mark all the ones that don't support chaining (e.g., most stream ciphers). Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[v2 PATCH] crypto: octeontx - Fix sparse warnings

2020-06-12 Thread Herbert Xu
he BE behaviour as the correct one. Reported-by: kernel test robot Signed-off-by: Herbert Xu diff --git a/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c b/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c index fec8f3b9b112..cc103b1bc224 100644 --- a/drivers/crypto/marvell/octeontx/otx_cptpf_uc

<    4   5   6   7   8   9   10   11   12   13   >