Re: [v2 PATCH] crypto: sun4i-ss - Fix sparse endianness markers

2020-09-23 Thread Herbert Xu
> > blocksize: 64 > > digestsize : 16 > > and I didnt see anything failed/unknow in /proc/crypto > > Why the failed algorithm is not visible ? Please include the complete /proc/cry

Re: [PATCH] random: use correct memory barriers for crng_node_pool

2020-09-21 Thread Herbert Xu
acquire then I would have no problems with everybody else following in its footsteps. Here is the original patch in question: https://lore.kernel.org/lkml/20200916233042.51634-1-ebigg...@kernel.org/ Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] random: use correct memory barriers for crng_node_pool

2020-09-21 Thread Herbert Xu
On Mon, Sep 21, 2020 at 08:27:14AM -0700, Paul E. McKenney wrote: > On Mon, Sep 21, 2020 at 06:19:39PM +1000, Herbert Xu wrote: > > On Thu, Sep 17, 2020 at 09:58:02AM -0700, Eric Biggers wrote: > > > > > > smp_load_acquire() is obviously correct, whereas READ_ONCE(

Re: [PATCH] random: use correct memory barriers for crng_node_pool

2020-09-21 Thread Herbert Xu
s line of reasoning, surely you should be converting the RCU derference first and foremost, no? 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/7] crypto: sun4i-ss: handle BigEndian for cipher

2020-09-18 Thread Herbert Xu
oCs on kernelCI. I'll happily accept patches that fix the actual bug but not ones just papering over it. 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: inside-secure - Fix corruption on not fully coherent systems

2020-09-18 Thread Herbert Xu
t then the macro CRYPTO_MINALIGN should cover it. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: linux-next: manual merge of the staging tree with the crypto tree

2020-09-18 Thread Herbert Xu
ag I can pull in to > prevent merge issues in the future? It's in the cryptodev tree, but unfortunately it's not in a topic branch so you'd be pulling all other crypto changes along with 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 4/7] crypto: sun4i-ss: handle BigEndian for cipher

2020-09-18 Thread Herbert Xu
E failure get caught by the selftest? If so please just leave it enabled so that it can be fixed properly. 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 1/4] crypto: caam - Fix kerneldoc

2020-09-18 Thread Herbert Xu
since v1: > 1. Fix more warnings > --- > drivers/crypto/caam/caamalg_desc.c | 1 + > drivers/crypto/caam/caamalg_qi2.c | 4 ++-- > drivers/crypto/caam/ctrl.c | 4 +++- > drivers/crypto/caam/jr.c | 10 +----- > 4 files changed, 11 insertions(+), 8 deletions(-

Re: [PATCH] crypto: mark unused ciphers as obsolete

2020-09-18 Thread Herbert Xu
he joint coverage of their QA, > we should be able to confirm that these algos are never used, and > actually remove them altogether. > > crypto/Kconfig | 4 > 1 file changed, 4 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: inside-secure - Add support for EIP197 with output classifier

2020-09-18 Thread Herbert Xu
pto/inside-secure/safexcel.h | 13 ++ > 2 files changed, 54 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] crypto: sa2ul - Fix pm_runtime_get_sync() error checking

2020-09-18 Thread Herbert Xu
rpenter > --- > drivers/crypto/sa2ul.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 RESEND 0/2] crypto: qat - replace DIDs macros

2020-09-18 Thread Herbert Xu
/qat_hal.c | 7 --- > drivers/crypto/qat/qat_common/qat_uclo.c | 9 + > drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 11 --- > drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 11 --- > 9 files changed, 33 insertions(+),

Re: [PATCH 0/5] crypto: hisilicon - update ACC module parameter

2020-09-18 Thread Herbert Xu
insertions(+), 9 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: omap-sham: convert to use crypto engine

2020-09-18 Thread Herbert Xu
> 1 file changed, 78 insertions(+), 108 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: omap-sham: fix digcnt register handling with export/import

2020-09-18 Thread Herbert Xu
oticed while transitioning to openssl 1.1 support. > > Fixes: 0d373d603202 ("crypto: omap-sham - Add OMAP4/AM33XX SHAM Support") > Signed-off-by: Tero Kristo > --- > drivers/crypto/omap-sham.c | 3 +++ > 1 file changed, 3 insertions(+) Patch applied. Thanks

Re: [PATCH] crypto: inside-secure - Prevent missing of processing errors

2020-09-18 Thread Herbert Xu
-off-by: Pascal van Leeuwen > --- > drivers/crypto/inside-secure/safexcel_ring.c | 9 + > 1 file changed, 5 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 v2 00/10] crypto: hisilicon/zip - misc clean up

2020-09-18 Thread Herbert Xu
| 15 > drivers/crypto/hisilicon/zip/zip_crypto.c | 112 ++ > drivers/crypto/hisilicon/zip/zip_main.c | 126 > ++ > 3 files changed, 135 insertions(+), 118 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 3/3] crypto: hisilicon/hpre - fix a bug in dh algorithm

2020-09-18 Thread Herbert Xu
{ > + msg->in = cpu_to_le64((u64)ctx->dh.dma_g); Why do you need the u64 cast? 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: inside-secure - Fix corruption on not fully coherent systems

2020-09-17 Thread Herbert Xu
that does the aligning for you. Have a look at drivers/crypto/padlock-aes.c which does something similar for the tfm ctx. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v6 5/8] crypto: testmgr - support test with different ciphertext per encryption

2020-09-17 Thread Herbert Xu
posed to be another patch that contains test vectors? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v8] crypto: af_alg - add extra parameters for DRBG interface

2020-09-17 Thread Herbert Xu
/ > + if (pctx->entropy) > + sk->sk_socket->ops = &algif_rng_test_ops; > + Please make that if (IS_ENABLED(CONFIG_CRYPTO_USER_API_RNG_CAVP) && pctx->entropy) so that this and the rest of the new code simply disappears when the Kconfig option is of

Re: linux-next: manual merge of the staging tree with the crypto tree

2020-09-17 Thread Herbert Xu
config RTLLIB_CRYPTO_CCM > config RTLLIB_CRYPTO_TKIP > tristate "Support for rtllib TKIP crypto" > depends on RTLLIB > + select CRYPTO > -select CRYPTO_ARC4 > +select CRYPTO_LIB_ARC4 As the driver has been converted over to the lib arc4 API, it

Re: [PATCH] random: initialize ChaCha20 constants with correct endianness

2020-09-17 Thread Herbert Xu
ways use the standard constants. > > Cc: linux-crypto@vger.kernel.org > Signed-off-by: Eric Biggers > --- > drivers/char/random.c | 4 ++-- > include/crypto/chacha.h | 9 +++-- > 2 files changed, 9 insertions(+), 4 deletions(-) Acked-by: Herbert Xu -- Email: Herbert Xu Hom

Re: [PATCH] random: use correct memory barriers for crng_node_pool

2020-09-17 Thread Herbert Xu
sed might not appear to be fully initialized. The only architecture that requires a barrier for data dependency is Alpha. The correct primitive to ensure that barrier is present is smp_barrier_depends, or you could just use READ_ONCE. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.o

Re: [PATCH] crypto: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally

2020-09-15 Thread Herbert Xu
just take them away. Or am I missing something? Good point. Thomas mentioned that RT has been doing this for a while now so perhaps someone has studied this problem already? Thomas? 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: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally

2020-09-15 Thread Herbert Xu
As long as nobody objects to the slight performance degradation on legacy highmem platforms it should make kmap_atomic just go away on modern platforms. 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: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally

2020-09-15 Thread Herbert Xu
*addr) { if (PageHighMem(page)) kunmap_atomic(addr); } 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: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally

2020-09-14 Thread Herbert Xu
lve manually checking every instance of kmap_atomic. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH] crypto: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally

2020-09-14 Thread Herbert Xu
be doing that by interrupting the SG miter walk rather than using kmap. Reported-by: Linus Torvalds Signed-off-by: Herbert Xu diff --git a/lib/crypto/chacha20poly1305.c b/lib/crypto/chacha20poly1305.c index 431e04280332..5850f3b87359 100644 --- a/lib/crypto/chacha20poly1305.c +++ b/lib/crypto

[PATCH 1/3] crypto: inside-secure - Move priv pointer into safexcel_context

2020-09-13 Thread Herbert Xu
This patch moves the priv pointer into struct safexcel_context because both structs that extend safexcel_context have that pointer as well. Signed-off-by: Herbert Xu --- drivers/crypto/inside-secure/safexcel.h|1 drivers/crypto/inside-secure/safexcel_cipher.c | 42

[PATCH 2/3] crypto: inside-secure - Move ipad/opad into safexcel_context

2020-09-13 Thread Herbert Xu
As both safexcel_ahash_ctx and safexcel_cipher_ctx contain ipad and opad buffers this patch moves them into the common struct safexcel_context. It also adds a union so that they can be accessed in the appropriate endian without crazy casts. Signed-off-by: Herbert Xu --- drivers/crypto/inside

[PATCH 3/3] crypto: inside-secure - Reuse code in safexcel_hmac_alg_setkey

2020-09-13 Thread Herbert Xu
safexcel_hmac_alg_setkey has been added for use by ahash transforms. As a result safexcel_aead_setkey's stack frame has been reduced by about half in size, or about 512 bytes. Reported-by: kernel test robot Signed-off-by: Herbert Xu --- drivers/crypto/inside-secure/safexcel.h|5 ++- drivers/c

[PATCH 0/3] crypto: inside-secure - Silence stack frame size warning in safexcel_aead_setkey

2020-09-13 Thread Herbert Xu
ate/ostate variables on the stack. This patch series removes the warning by reusing the ahash setkey code for aead. Note that we've simply moved the istate/ostate into the ahash code and the overall stack usage is actually unchanged. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 3/3] crypto: s5p-sss - Pass error from clk_get and reduce verbosity on deferral

2020-09-11 Thread Herbert Xu
pto/s5p-sss.c | 15 +++ > 1 file changed, 7 insertions(+), 8 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 2/3] crypto: s5p-sss - Add and fix kerneldoc

2020-09-11 Thread Herbert Xu
Krzysztof Kozlowski > --- > drivers/crypto/s5p-sss.c | 7 --- > 1 file changed, 4 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] crypto: qat - include domain in top level debugfs path

2020-09-11 Thread Herbert Xu
ccvf/adf_drv.c | 6 ++ > 6 files changed, 12 insertions(+), 24 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: s5p-sss: remove redundant null check

2020-09-10 Thread Herbert Xu
changed, 2 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 v3 0/7] crypto: mark ecb(arc4) skcipher as obsolete

2020-09-10 Thread Herbert Xu
> - add a Kconfig option to en/disable obsolete algorithms that are only kept > around to prevent breaking users that rely on it via the socket interface > - add a patch to clean up some bogus Kconfig dependencies > - add acks to patches #1, #2 and #3 > > [0] > https://l

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

2020-09-10 Thread Herbert Xu
5 files changed, 196 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/rng/xiphera,xip8001b-trng.yaml > create mode 100644 drivers/char/hw_random/xiphera-trng.c 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] hwrng: imx-rngc - add quality to use it as kernel entropy pool

2020-09-10 Thread Herbert Xu
> > Signed-off-by: Marco Felsch > --- > drivers/char/hw_random/imx-rngc.c | 1 + > 1 file changed, 1 insertion(+) 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 v2] crypto: qat - check cipher length for aead AES-CBC-HMAC-SHA

2020-09-10 Thread Herbert Xu
to/qat/qat_common/qat_algs.c | 10 +- > 1 file changed, 9 insertions(+), 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 v1] crypto: caam - use traditional error check pattern

2020-09-10 Thread Herbert Xu
> 1 file changed, 3 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] crypto/x86: Use XORL r32,32 in poly1305-x86_64-cryptogams.pl

2020-09-10 Thread Herbert Xu
On Thu, Aug 27, 2020 at 07:38:31PM +0200, Uros Bizjak wrote: > x86_64 zero extends 32bit operations, so for 64bit operands, > XORL r32,r32 is functionally equal to XORQ r64,r64, but avoids > a REX prefix byte when legacy registers are used. > > Signed-off-by: Uros Bizjak > Cc

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

2020-09-10 Thread Herbert Xu
On Thu, Aug 27, 2020 at 07:30:58PM +0200, Uros Bizjak wrote: > x86_64 zero extends 32bit operations, so for 64bit operands, > XORL r32,r32 is functionally equal to XORL r64,r64, but avoids > a REX prefix byte when legacy registers are used. > > Signed-off-by: Uros Bizjak > Cc

Re: [PATCH 2/2] crypto: sa2ul: fix compiler warning produced by clang

2020-09-10 Thread Herbert Xu
y: Nathan Chancellor > Signed-off-by: Tero Kristo > --- > drivers/crypto/sa2ul.c | 6 ++ > 1 file changed, 2 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

[PATCH] crypto: n2 - Fix sparse endianness warning

2020-09-10 Thread Herbert Xu
This patch fixes sparse endianness warnings by changing the type of hash_init to u8 from u32. There should be no difference in the generated code. Signed-off-by: Herbert Xu diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index f137f22da8fb..3642bf83d809 100644 --- a/drivers

Re: [PATCH v6 09/18] crypto: sun8i-ce: split into prepare/run/unprepare

2020-09-10 Thread Herbert Xu
different base types) ../drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:322:9:expected unsigned long long [usertype] addr ../drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:322:9:got restricted __le32 [usertype] t_key Please fix. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

2020-09-10 Thread Herbert Xu
> > Signed-off-by: Atte Tommiska > Reported-by: kernel test robot This Reported-by appears to be superfluous and I'll remove it when applying. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v3 7/7] crypto: arc4 - mark ecb(arc4) skcipher as obsolete

2020-09-10 Thread Herbert Xu
On Mon, Aug 31, 2020 at 06:16:49PM +0300, Ard Biesheuvel wrote: > > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include This needs kernel.h too for the pr_warn_ratelimited. I'll add it when I apply the series. Thanks, -- Email: Herb

Re: [PATCH] crypto: stm32/crc32 - Avoid lock if hardware is already used

2020-09-10 Thread Herbert Xu
"Support for STM32 crc accelerators" > depends on ARCH_STM32 > select CRYPTO_HASH > + select CRYPTO_CRC32 > + select CRYPTO_CRC32C Shouldn't this be "select CRC32"? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v6 0/8] crpyto: introduce OSCCA certificate and SM2 asymmetric algorithm

2020-09-10 Thread Herbert Xu
On Thu, Sep 03, 2020 at 09:12:34PM +0800, Tianjia Zhang wrote: > > --- > v6 changes: > 1. remove mpi_sub_ui function from mpi library. > 2. rebase on mainline. This series is still missing acks for patches 6-8. Without them it cannot proceed. Thanks, -- Email: Herbert Xu

Re: [v2 PATCH] crypto: sun4i-ss - Fix sparse endianness markers

2020-09-10 Thread Herbert Xu
ivs=[99.1%@+2668, 0.88%@alignmask+3630, 0.11%@+3403] > iv_offset=33\" > +[ 84.469074] need:35966fc8 b31ea266 2bf064e9 f20f40ad > +[ 84.469084] have:e29e4491 f3b6effc fa366691 00e04bd9 > > Thoses errors are random. (1 boot out of 2) Do these really go away without this patch applied?

Re: [PATCH v3] cypto: mediatek - fix leaks in mtk_desc_ring_alloc

2020-09-10 Thread Herbert Xu
ring[i]->res_base, ring[i]->res_dma); > dma_free_coherent(cryp->dev, MTK_DESC_RING_SZ, > ring[i]->cmd_base, ring[i]->cmd_dma); > kfree(ring[i]); > - } > + }while(i--); Please add spaces before and after w

[GIT PULL] Crypto Fixes for 5.9

2020-09-09 Thread Herbert Xu
): padata: fix possible padata_works_lock deadlock kernel/padata.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Herbert Xu
lso just a test module though so the > code isn't particularly crucial. > > Herbert/David? thoughts? Please read the function as a whole, that fallthrough (and every other one in do_test) needs to stay. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH RESEND 1/9] crypto: caam/jr - add fallback for XTS with more than 8B IV

2020-09-08 Thread Herbert Xu
ned itself and not open-coded. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[v2 PATCH] crypto: sun4i-ss - Fix sparse endianness markers

2020-09-07 Thread Herbert Xu
should have no effect in the genereated code. Instead of using cpu_to_Xe32 followed by a memcpy, this patch converts the final hash write to use put_unaligned_X instead. Reported-by: kernel test robot Signed-off-by: Herbert Xu diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c b

Re: [linux-sunxi] Re: [PATCH v6 18/18] crypto: sun8i-ce: fix some style issue

2020-09-07 Thread Herbert Xu
without this last patch or not. While lines beyond 80 characters are allowed, please don't send patches that simply rewrite existing lines as longer ones. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH] crypto: sun4i-ss - Fix SHA1 hash on A33-variant with BE CPU

2020-09-06 Thread Herbert Xu
lot clearer. This patch also fixes the incorrect endianness marking on wb, although this should have no effect in the genereated code. Fixes: 1e02e6fbdadb ("crypto: sun4i-ss - add the A33 variant of SS") Reported-by: kernel test robot Signed-off-by: Herbert Xu diff --git a/drivers

[PATCH] crypto: sa2ul - Select CRYPTO_AUTHENC

2020-09-06 Thread Herbert Xu
Resend with new subject. ---8<--- The sa2ul driver uses crypto_authenc_extractkeys and therefore must select CRYPTO_AUTHENC. Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver") Reported-by: kernel test robot Signed-off-by: Herbert Xu diff --git a/drivers/crypto/Kconfig b/d

Re: sa2ul.c:undefined reference to `crypto_authenc_extractkeys'

2020-09-06 Thread Herbert Xu
--- The sa2ul driver uses crypto_authenc_extractkeys and therefore must select CRYPTO_AUTHENC. Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver") Reported-by: kernel test robot Signed-off-by: Herbert Xu diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index aa3a4ed

Re: [EXT] Re: [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 CPT engine

2020-09-04 Thread Herbert Xu
n then be shared by both your crypto driver and your network driver so you don't duplicate this everywhere. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2 2/3] drivers: crypto: add support for OCTEONTX2 CPT engine

2020-09-04 Thread Herbert Xu
ompile-test. 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: sun8i-ss - remove redundant memzero_explicit()

2020-09-04 Thread Herbert Xu
: rename kzfree() to kfree_sensitive()") > Signed-off-by: Denis Efremov > --- > Changes in v2: > - fixes tag added > > drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 1 - > 1 file changed, 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http

Re: [PATCH v2] padata: add another maintainer and another list

2020-09-04 Thread Herbert Xu
On Thu, Aug 27, 2020 at 09:53:28PM -0400, Daniel Jordan wrote: > At Steffen's request, I'll help maintain padata for the foreseeable > future. > > While at it, let's have patches go to lkml too since the code is now > used outside of crypto. > > Signed-off

Re: [PATCH] padata: fix possible padata_works_lock deadlock

2020-09-04 Thread Herbert Xu
; Fix by leaving softirqs disabled while do_parallel holds > padata_works_lock. > > Reported-by: syzbot+f4b9f49e38e25eb4e...@syzkaller.appspotmail.com > Fixes: 4611ce2246889 ("padata: allocate work structures for parallel jobs > from a pool") > Signed-off-by: Da

Re: [PATCH v2 0/4] crypto: use kfree_sensitive()

2020-09-04 Thread Herbert Xu
xcel_hash.c | 3 +-- > 4 files changed, 9 insertions(+), 34 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 1/3] crypto: sa2ul - Hide pointer and fix -Wpointer-to-int-cast in dev_dbg()

2020-09-04 Thread Herbert Xu
drivers/crypto/sa2ul.c:1486:33: warning: cast from pointer to integer of > different size [-Wpointer-to-int-cast] > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/crypto/sa2ul.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) All applied. Thanks. -- E

Re: [PATCH] hwrng: cctrn - Simplify with dev_err_probe()

2020-09-04 Thread Herbert Xu
andom/cctrng.c | 9 - > 1 file changed, 4 insertions(+), 5 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

[PATCH] crypto: ux500 - Fix sparse endianness warnings

2020-09-04 Thread Herbert Xu
This patch fixes a couple of sparse endianness warnings in the ux500 driver. Signed-off-by: Herbert Xu diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c index e64e764bb035..c3adeb2e5823 100644 --- a/drivers/crypto/ux500/cryp/cryp_core.c +++ b/drivers

[PATCH] crypto: sun8i-ce - Fix big-endian read of t_common_ctl

2020-09-04 Thread Herbert Xu
working on big...") Signed-off-by: Herbert Xu diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c index 138759dc8190..703a60d4e2f6 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c +++ b/drivers/crypto/allwinner/su

Re: [PATCH RESEND 04/10] crypto: hisilicon/zip - replace 'sprintf' with 'scnprintf'

2020-09-04 Thread Herbert Xu
; > + i - HZIP_COMP_CORE_NUM); > > > + if (!ret) > > > + return -ENOMEM; > > > > and that is just so wrong - did you even try to test > > the 'buffer too small' code path? > > Do you mean

Re: [PATCH] cypto: mediatek - fix leaks in mtk_desc_ring_alloc

2020-09-04 Thread Herbert Xu
/drivers/crypto/mediatek/mtk-platform.c > +++ b/drivers/crypto/mediatek/mtk-platform.c > @@ -469,7 +469,7 @@ static int mtk_desc_ring_alloc(struct mtk_cryp *cryp) >return 0; > > err_cleanup: > - for (; i--; ) { > + for (; i >= 0; --i) { How

Re: [PATCH] crypto: Mark tfm buffer as non leak.

2020-09-04 Thread Herbert Xu
e and that is the primary means of getting to the object. The tfm pointer is just an internal thing. So why do we have to mark mem as not a leak? Cheers, -- 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] crypto: arm/aes-neonbs - Use generic cbc encryption path

2020-09-01 Thread Herbert Xu
On Tue, Sep 01, 2020 at 11:47:03AM +0300, Ard Biesheuvel wrote: > On Tue, 1 Sep 2020 at 09:28, Herbert Xu wrote: > > > > Since commit b56f5cbc7e08ec7d31c42fc41e5247677f20b143 ("crypto: > > arm/aes-neonbs - resolve fallback cipher at runtime") the CBC > >

[v2 PATCH 1/2] crypto: arm/aes-neonbs - Use generic cbc encryption path

2020-09-01 Thread Herbert Xu
doing its own thing. This patch removes the custom encryption path and simply invokes the generic cbc template. Signed-off-by: Herbert Xu diff --git a/arch/arm/crypto/aes-neonbs-glue.c b/arch/arm/crypto/aes-neonbs-glue.c index e6fd32919c81..b324c5500846 100644 --- a/arch/arm/crypto/aes-neo

[v2 PATCH 2/2] crypto: cbc - Remove cbc.h

2020-09-01 Thread Herbert Xu
Now that crypto/cbc.h is only used by the generic cbc template, we can merge it back into the CBC code. Signed-off-by: Herbert Xu diff --git a/crypto/cbc.c b/crypto/cbc.c index e6f6273a7d39..0d9509dff891 100644 --- a/crypto/cbc.c +++ b/crypto/cbc.c @@ -6,7 +6,6 @@ */ #include -#include

[PATCH 2/2] crypto: cbc - Remove cbc.h

2020-08-31 Thread Herbert Xu
Now that crypto/cbc.h is only used by the generic cbc template, we can merge it back into the CBC code. Signed-off-by: Herbert Xu diff --git a/crypto/cbc.c b/crypto/cbc.c index e6f6273a7d39..0d9509dff891 100644 --- a/crypto/cbc.c +++ b/crypto/cbc.c @@ -6,7 +6,6 @@ */ #include -#include

[PATCH 1/2] crypto: arm/aes-neonbs - Use generic cbc encryption path

2020-08-31 Thread Herbert Xu
doing its own thing. This patch removes the custom encryption path and simply invokes the generic cbc template. Signed-off-by: Herbert Xu diff --git a/arch/arm/crypto/aes-neonbs-glue.c b/arch/arm/crypto/aes-neonbs-glue.c index e6fd32919c81..b324c5500846 100644 --- a/arch/arm/crypto/aes-neo

[GIT PULL] Crypto Fixes for 5.9

2020-08-30 Thread Herbert Xu
messages without MSG_MORE (2020-08-27 23:20:36 +1000) Giovanni Cabiddu (1): crypto: qat - add delay before polling mailbox Herbert Xu (1): crypto: af_alg - Work around empty control messages without MSG_MORE Randy Dunlap

Re: [PATCH] crypto: cavium/nitrox: add an error message to explain the failure of pci_request_mem_regions

2020-08-29 Thread Herbert Xu
order here does not matter? I don't think it matters. 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: cavium/nitrox: add an error message to explain the failure of pci_request_mem_regions

2020-08-28 Thread Herbert Xu
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: ccree - fix runtime PM imbalance on error

2020-08-28 Thread Herbert Xu
+- > 1 file changed, 5 insertions(+), 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 -next] crypto: sa2ul - Fix pointer-to-int-cast warning

2020-08-28 Thread Herbert Xu
> > Signed-off-by: YueHaibing > --- > drivers/crypto/sa2ul.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

[PATCH] crypto: amlogic - Fix endianness marker

2020-08-28 Thread Herbert Xu
The endianness marking on the variable v in meson_cipher is wrong. It is actually in CPU-order, not little-endian. This patch fixes it. Fixes: 3d04158814e7 ("crypto: amlogic - enable working on big...") Signed-off-by: Herbert Xu diff --git a/drivers/crypto/amlogic/amlogic-gxl-c

Re: [PATCH] Remove unneeded variable t1

2020-08-27 Thread Herbert Xu
const struct seed_ctx *ctx = crypto_tfm_ctx(tfm); >const __be32 *src = (const __be32 *)in; >__be32 *dst = (__be32 *)out; > - u32 x1, x2, x3, x4, t0, t1; > + u32 x1, x2, x3, x4, t0; >const u32 *ks = ctx->keysched; > &g

Re: [PATCH v5 02/18] crypto: sun8i-ss: Add support for the PRNG

2020-08-27 Thread Herbert Xu
On Fri, Aug 21, 2020 at 01:43:19PM +, Corentin Labbe wrote: > > + err = pm_runtime_get_sync(ss->dev); > + if (err < 0) > + goto err_pm; > + err = 0; The error case needs to do this: https://patchwork.kernel.org/patch/11728595/ Cheers, -- Email:

Re: [PATCH v5 03/18] crypto: sun8i-ss: support hash algorithms

2020-08-27 Thread Herbert Xu
8595/ Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: lib/crypto/chacha.c:65:1: warning: the frame size of 1604 bytes is larger than 1024 bytes

2020-08-27 Thread Herbert Xu
tes by value is not good. Passing struct chacha_state as a pointer doesn't work either. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: lib/crypto/chacha.c:65:1: warning: the frame size of 1604 bytes is larger than 1024 bytes

2020-08-27 Thread Herbert Xu
ingly this particular file fails with those options on gcc 8, 9 and 10. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: lib/crypto/chacha.c:65:1: warning: the frame size of 1604 bytes is larger than 1024 bytes

2020-08-27 Thread Herbert Xu
ion. To recreate this warning, you need to enable both GCOV_KERNEL and UBSAN. This is the minimal gcc command-line to recreate it: gcc -Wframe-larger-than=1024 -fprofile-arcs -fsanitize=object-size -c -O2 chacha.c If you take away either profile-arcs or sanitize=object-size then the problem goes

[v2 PATCH] crypto: af_alg - Work around empty control messages without MSG_MORE

2020-08-27 Thread Herbert Xu
control message). This patch changes the kernel so that this is explicitly allowed. Reported-by: Caleb Jorden Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when...") Cc: Signed-off-by: Herbert Xu diff --git a/crypto/af_alg.c b/crypto/af_alg.c index a6f581ab200c..8be8bec07cdd

Re: Issue with iwd + Linux 5.8.3 + WPA Enterprise

2020-08-26 Thread Herbert Xu
On Wed, Aug 26, 2020 at 05:42:27PM +0200, Ard Biesheuvel wrote: > > I still get a failure in aes_siv_encrypt(), which does not occur with > the kernel side fix applied. Where is this test from? I can't find it in the ell git tree. Thanks, -- Email: Herbert Xu H

Re: Issue with iwd + Linux 5.8.3 + WPA Enterprise

2020-08-26 Thread Herbert Xu
v. It does a sendmsg(2) that expects to be followed by more sendmsg(2) calls before a recvmsg(2). That's the one that needs a MSG_MORE. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH] crypto: af_alg - Work around empty control messages without MSG_MORE

2020-08-26 Thread Herbert Xu
MSG_MORE where appropriate, this patch works around the bug in the kernel so that existing binaries continue to work. We will print a warning however. Reported-by: Caleb Jorden Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when...") Cc: Signed-off-by: Herbert Xu diff --gi

Re: [PATCH] crypto: inside-secure - use kfree_sensitive()

2020-08-26 Thread Herbert Xu
as a patch series. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: Issue with iwd + Linux 5.8.3 + WPA Enterprise

2020-08-26 Thread Herbert Xu
y sendmsg(2) without a MSG_MORE will be interpreted as the end of a request. I'll work around this in the kernel though for the case where there is no actual data, with a WARN_ON_ONCE. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: Issue with iwd + Linux 5.8.3 + WPA Enterprise

2020-08-26 Thread Herbert Xu
On Wed, Aug 26, 2020 at 01:59:53PM +0200, Ard Biesheuvel wrote: > On Wed, 26 Aug 2020 at 13:50, Herbert Xu wrote: > > > > On Wed, Aug 26, 2020 at 12:40:14PM +0200, Ard Biesheuvel wrote: > > > > > > It would be helpful if someone could explain for the non-mac80

Re: Issue with iwd + Linux 5.8.3 + WPA Enterprise

2020-08-26 Thread Herbert Xu
tring of sendmsg(2)'s with MSG_MORE folloed by a recvmsg(2) in the same thread. I'll add a WARN_ON_ONCE so user-space can eventually be fixed. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<    1   2   3   4   5   6   7   8   9   10   >