Re: KASAN: stack-out-of-bounds Read in xfrm_selector_match (2)

2020-09-24 Thread Herbert Xu
with a family. This appears to have been lost with 8444cf712c5f71845cba9dc30d8f530ff0d5ff83. I'm working on a fix. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: possible deadlock in xfrm_policy_delete

2020-09-24 Thread Herbert Xu
On Thu, Sep 24, 2020 at 09:30:03AM +0200, pet...@infradead.org wrote: > On Thu, Sep 24, 2020 at 06:44:12AM +0200, Dmitry Vyukov wrote: > > On Thu, Sep 24, 2020 at 6:36 AM Herbert Xu > > wrote: > > > > (k-slock-AF_INET6){+.-.}-{2:2} > > That's a seqlock

Re: possible deadlock in xfrm_policy_delete

2020-09-23 Thread Herbert Xu
e commit question because this commit is specific to seqlocks. There is another syzbot report in this pile that mixed the SCTP socket lock with the TCP socket lock and those are not seqlocks. It's almost as if when a spinlock is freed and reallocated lockdep is not clearing the existing state. C

Re: inconsistent lock state in xfrm_policy_lookup_inexact_addr

2020-09-23 Thread Herbert Xu
/lockdep.c:5398 > seqcount_lockdep_reader_access+0x139/0x1a0 include/linux/seqlock.h:103 > xfrm_policy_lookup_inexact_addr+0x57/0x200 net/xfrm/xfrm_policy.c:1909 And this is a completely different seqlock. Again lockdep is creating a bogus report by lumping two unrelated locks (but of th

Re: possible deadlock in xfrm_user_rcv_msg

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: possible deadlock in xfrm_policy_delete

2020-09-23 Thread Herbert Xu
51 > spin_lock include/linux/spinlock.h:354 [inline] > sctp_rcv+0xd96/0x2d50 net/sctp/input.c:231 What's going on with all these bogus lockdep reports? These are two completely different locks, one is for TCP and the other is for SCTP. Why is lockdep suddenly beoming c

Re: possible deadlock in xfrm_policy_lookup_bytype

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: WARNING: SOFTIRQ-READ-safe -> SOFTIRQ-READ-unsafe lock order detected

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: inconsistent lock state in xfrm_user_rcv_msg

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: possible deadlock in xfrm_policy_lookup_inexact_addr

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH] crypto: x86/poly1305 - Remove assignments with no effect

2020-09-23 Thread Herbert Xu
ch removes a few ineffectual assignments from the function crypto_poly1305_setdctxkey. Reported-by: kernel test robot Signed-off-by: Herbert Xu diff --git a/arch/x86/crypto/poly1305_glue.c b/arch/x86/crypto/poly1305_glue.c index f85885d6ccd8..e508dbd91813 100644 --- a/arch/x86/cryp

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] rhashtable: fix indentation of a continue statement

2020-09-20 Thread Herbert Xu
+), 1 deletion(-) Acked-by: Herbert Xu -- 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: 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 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 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: 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-cry...@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 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 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 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: 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/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 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] 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: [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] 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 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 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] 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

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] soc: fsl: Remove bogus packed attributes from qman.h

2020-09-01 Thread Herbert Xu
cture which is not good. I think the following changes > are a better fix for the warnings: This works for me. Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] soc: fsl: Remove bogus packed attributes from qman.h

2020-08-31 Thread Herbert Xu
structs contain no holes. 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.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

[PATCH] dmaengine: fsldma: Do not pass pointers to lower_32_bits

2020-08-29 Thread Herbert Xu
es a mask on the argument it no longer works. Passing a pointer to lower_32_bits doesn't look right anyway. This patch adds explicit casts so that an integer is passed along as the argument to lower_32_bits. Reported-by: Guenter Roeck Signed-off-by: Herbert Xu diff --git a/drivers/dma

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] kernel.h: Silence sparse warning in lower_32_bits

2020-08-28 Thread Herbert Xu
(6a09e667f3bcc908 becomes f3bcc908) This patch removes the warning by adding a mask to keep sparse happy. Signed-off-by: Herbert Xu diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 500def620d8f..c25b8e41c0ea 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -186,7 +186,7

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

[PATCH] crypto: sa2ul - Reduce stack usage

2020-08-24 Thread Herbert Xu
d buffer from sa_set_sc_auth. 4. Use async skcipher fallback and remove on-stack request from sa_cipher_run. Reported-by: kernel test robot Fixes: d2c8ac187fc9 ("crypto: sa2ul - Add AEAD algorithm support") Signed-off-by: Herbert Xu diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/

Re: [PATCH 4.19 012/168] crypto: ccree - fix resource leak on error path

2020-08-21 Thread Herbert Xu
ll as the crypto_shash_tfm pointer so it does the right thing for NULL pointers. Please check again. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v5 00/10] crypto: hisilicon/qm - misc fixes

2020-08-21 Thread Herbert Xu
> drivers/crypto/hisilicon/sec2/sec_crypto.c | 35 ++--- > drivers/crypto/hisilicon/sec2/sec_main.c| 34 ++--- > drivers/crypto/hisilicon/zip/zip_crypto.c | 2 +- > drivers/crypto/hisilicon/zip/zip_main.c | 49 +++--- > 8 files changed, 290 insertions(+), 145 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: ccree - fix runtime PM imbalance on error

2020-08-21 Thread Herbert Xu
1 file changed, 5 insertions(+), 1 deletion(-) Your patch didn't make it to the list or patchwork. Please 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] drivers: crypto: picoxcell_crypto: Fix potential race condition bug

2020-08-21 Thread Herbert Xu
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

Re: [PATCHv3 1/2] hwrng: optee: handle unlimited data rates

2020-08-21 Thread Herbert Xu
wed-by: Sumit Garg > --- > drivers/char/hw_random/optee-rng.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) 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 0/2] Cyrpto: Clean up kmap() use

2020-08-21 Thread Herbert Xu
ors > > crypto/ahash.c| 41 +++ > drivers/crypto/ux500/hash/hash_core.c | 30 > include/crypto/internal/hash.h| 13 - > 3 files changed, 22 insertions(+), 62 deletions(-) All applied. Thanks.

Re: [PATCH] hwrng : cleanup initialization

2020-08-21 Thread Herbert Xu
~ > > Because mem is assigned before it is used, this is not > a real problem. But the initialization is strange and not > needed, so remove it. > > Signed-off-by: Tom Rix > --- > drivers/char/hw_random/intel-rng.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Pat

Re: [PATCH -next] crypto: sa2ul: add Kconfig selects to fix build error

2020-08-21 Thread Herbert Xu
pto/sa2ul.o: in function `sa_sha_digest': > sa2ul.c:(.text+0x2b25): undefined reference to `sha512_zero_message_hash' > > Signed-off-by: Randy Dunlap > Reported-by: Randy Dunlap # 2020-07-29 > Cc: Herbert Xu > Cc: "David S. Miller" > Cc: linux-cry...@vger.ker

Re: [PATCH v2] crypto/x86: Use CRC32 mnemonic in crc32c-intel_glue.c

2020-08-21 Thread Herbert Xu
> there is also a couple of reg-reg moves removed. > > There are no hidden states for CRC32 insn, so there is no need to mark > assembly as volatile. > > v2: Introduce CRC32_INST define. > > Signed-off-by: Uros Bizjak > CC: Herbert Xu > CC: "David S

Re: [PATCH 0/2] Remove none supported ciphers

2020-08-21 Thread Herbert Xu
> 3 files changed, 4 insertions(+), 280 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: mediatek - Fix wrong return value in mtk_desc_ring_alloc()

2020-08-21 Thread Herbert Xu
t; Signed-off-by: Tianjia Zhang > --- > drivers/crypto/mediatek/mtk-platform.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: ixp4xx - Fix the size used in a 'dma_free_coherent()' call

2020-08-21 Thread Herbert Xu
to: ixp4xx - Hardware crypto support for IXP4xx > CPUs") > Signed-off-by: Christophe JAILLET > --- > drivers/crypto/ixp4xx_crypto.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 0/6] crypto: delete or fix duplicated words

2020-08-21 Thread Herbert Xu
On Thu, Jul 30, 2020 at 07:39:18PM -0700, Randy Dunlap wrote: > Drop doubled words or fix them to what they should be. > > > Cc: Herbert Xu > Cc: "David S. Miller" > Cc: linux-cry...@vger.kernel.org > > crypto/algif_aead.c |2 +- >

Re: [PATCH] crypto: hifn_795x - switch from 'pci_' to 'dma_' API

2020-08-21 Thread Herbert Xu
_set_dma_mask(e1, e2) > +dma_set_mask(&e1->dev, e2) > > @@ > expression e1, e2; > @@ > -pci_set_consistent_dma_mask(e1, e2) > +dma_set_coherent_mask(&e1->dev, e2) > > Signed-off-by: Christophe JAILLET > --- > If needed, see post from Christoph Hellwig on the kernel-janitors ML: >https://marc.info/?l=kernel-janitors&m=158745678307186&w=4 > --- > drivers/crypto/hifn_795x.c | 21 - > 1 file changed, 12 insertions(+), 9 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

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