Re: [PATCH net-next 2/2] net: socket: change MSG_CMSG_COMPAT to BIT(21)

2021-03-21 Thread Herbert Xu
> fixups */ > -#else > -#define MSG_CMSG_COMPAT 0 /* We never have 32 bit fixups > */ > -#endif Shouldn't you add some comment here to stop people from trying to use BIT(31) in the future? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH net] macvlan: macvlan_count_rx() needs to be aware of preemption

2021-03-10 Thread Herbert Xu
a4 > kernel/kthread.c:292) > r10:85247e64 r9:898dac80 r8:80269d68 r7: r6:8a9c6000 r5:89a2ee40 > r4:8a97bd00 > [<80271dbc>] (kthread) from [<80200114>] (ret_from_fork+0x14/0x20 > arch/arm/kernel/entry-common.S:158) > Exception stack(0x8a9c7fb0 to 0x8a9c7ff8) &

Re: [PATCH] crypto: Rename struct device_private to bcm_device_private

2021-01-13 Thread Herbert Xu
2qgg@e107158-lin/ > Signed-off-by: Jiri Olsa > --- > drivers/crypto/bcm/cipher.c | 2 +- > drivers/crypto/bcm/cipher.h | 4 ++-- > drivers/crypto/bcm/util.c | 2 +- > 3 files changed, 4 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: Why the auxiliary cipher in gss_krb5_crypto.c?

2020-12-04 Thread Herbert Xu
on the side of the caller. Maybe there is a way to reuse that here. > Herbert? Yes this was one of the reasons I was persuing the continuation work. It should allow us to kill the special case for CTS in the krb5 code. Hopefully I can get some time to restart work on this soon. Cheers, --

Re: [RFC][PATCH 00/18] crypto: Add generic Kerberos library

2020-12-01 Thread Herbert Xu
PI the underlying implementataions would just have to do the same thing. Since this is particular to your use-case it's better to leave the complexity where it's needed rather than propagting it to all the crypto drivers. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org

Re: [RFC][PATCH 00/18] crypto: Add generic Kerberos library

2020-12-01 Thread Herbert Xu
hat we can pass in an offset into the output sg as well? Couldn't you just change the output sg to include the offset? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [RFC][PATCH 00/18] crypto: Add generic Kerberos library

2020-11-26 Thread Herbert Xu
> be required to wrap it up in the autoloading, module-handling mechanisms. I don't have any problems with it living under crypto. However, I'd like to see what the sunrpc code looks like before going one way or another. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.o

Re: [RFC][PATCH 00/18] crypto: Add generic Kerberos library

2020-11-25 Thread Herbert Xu
are actually sharing this code with sunrpc, am I missing something? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH net] netdevice.h: Fix unintentional disable of ALL_FOR_ALL features on upper device

2020-11-24 Thread Herbert Xu
27;re trying to enable a feature on the virtual device unconditionally. > We might ask Herbert Xu if we : > > 1) Need to comment the function, or change its name to be more descriptive. > 2) Change the behavior (as you suggested) > 3) Other choice. I think Tariq's patch is fine, al

Re: [PATCH v9,net-next,12/12] crypto: octeontx2: register with linux crypto framework

2020-11-15 Thread Herbert Xu
On Fri, Nov 13, 2020 at 08:44:40AM -0800, Jakub Kicinski wrote: > > SGTM, actually everything starting from patch 4 is in drivers/crypto, > so we can merge the first 3 into net-next and the rest via crypto? Yes of course. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apa

Re: [PATCH v9,net-next,12/12] crypto: octeontx2: register with linux crypto framework

2020-11-12 Thread Herbert Xu
512),ecb(cipher_null)), > > rfc4106(gcm(aes)). > > Herbert, could someone who knows about crypto take a look at this, > if the intention is to merge this via net-next? This patch seems to be quite large but it is self-contained. How about waiting a release cycle and then resubmit

Re: [PATCH ipsec] xfrm: Pass template address family to xfrm_state_look_at

2020-11-03 Thread Herbert Xu
6-over-v4 in transport mode? Isn't that the whole point of BEET mode? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH ipsec] xfrm: Pass template address family to xfrm_state_look_at

2020-11-03 Thread Herbert Xu
do the comparison on flow you must use the original family and not some other value. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] xfrm/compat: Remove use of kmalloc_track_caller

2020-11-01 Thread Herbert Xu
[net/xfrm/xfrm_compat.ko] undefined! Is this with a recent kernel? Because they should be exported: commit fd7cb5753ef49964ea9db5121c3fc9a4ec21ed8e Author: Daniel Vetter Date: Mon Mar 23 15:49:00 2020 +0100 mm/sl[uo]b: export __kmalloc_track(_node)_caller Cheers, -- Email: He

Re: [PATCH v2] net: xfrm: fix a race condition during allocing spi

2020-10-22 Thread Herbert Xu
ifite loop. > > To fix the race, x->id.spi = htonl(spi) in the xfrm_alloc_spi() is moved > to the back of spin_lock_bh, sothat state_hash_work thread no longer add x > which id.spi is zero into the hash_list. > > Fixes: f034b5d4efdf ("[XFRM]: Dynamic xfrm_state hash table

Re: [PATCH] net: xfrm: fix a race condition during allocing spi

2020-10-21 Thread Herbert Xu
this was introduced with the dynamic resizing in f034b5d4efdfe0fb9e2a1ce1d95fa7914f24de49. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] net: xfrm: fix a race condition during allocing spi

2020-10-21 Thread Herbert Xu
es*/ > hlist_add_head_rcu(&x->byspi) > > So the same xfrm_stame (x) is added into the same list_hash > (net->xfrm.state_byspi)2 times that makes the list_hash become > a inifite loop. Your explanation makes no sense. Prior to obtaining the spin lock on the LHS,

Re: gssapi, crypto and afs/rxrpc

2020-10-18 Thread Herbert Xu
27;d make sense. Otherwise a library helper would be more appropriate. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [RFC 1/1] net/tls(TLS_SW): Handle -ENOSPC error return from device/AES-NI

2020-10-11 Thread Herbert Xu
you request MAY_BACKLOG. However, you must then ensure that when you get EBUSY that you stop issuing new requests until the Crypto API signals through the callback that you can start again. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org

Re: [RFC 1/1] net/tls(TLS_SW): Handle -ENOSPC error return from device/AES-NI

2020-10-07 Thread Herbert Xu
mode you wish to use. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 7/9 net-next] xfrm: use dev_sw_netstats_rx_add()

2020-10-05 Thread Herbert Xu
On Mon, Oct 05, 2020 at 10:36:34PM +0200, Fabian Frederick wrote: > use new helper for netstats settings > > Signed-off-by: Fabian Frederick > --- > net/xfrm/xfrm_interface.c | 9 + > 1 file changed, 1 insertion(+), 8 deletions(-) Acked-by: Herbert Xu -- Email: Her

Re: [RFC PATCH] lsm,selinux: pass the family information along with xfrm flow

2020-09-30 Thread Herbert Xu
On Wed, Sep 30, 2020 at 09:09:20AM +1000, James Morris wrote: > > I'm not keen on adding a parameter which nobody is using. Perhaps a note > in the header instead? Please at least change to the struct flowi to flowi_common if we're not adding a family field. Thanks, -- Emai

[PATCH] xfrm: Use correct address family in xfrm_state_find

2020-09-24 Thread Herbert Xu
ed-by: syzbot+577fbac3145a6eb2e...@syzkaller.appspotmail.com Fixes: 48b8d78315bf ("[XFRM]: State selection update to use inner...") Signed-off-by: Herbert Xu diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 69520ad3d83b..9b5f2c2b9770 100644 --- a/net/xfrm/xfrm_state.c +++

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

2020-09-24 Thread Herbert Xu
Reported-by: syzbot+577fbac3145a6eb2e...@syzkaller.appspotmail.com Fixes: 48b8d78315bf ("[XFRM]: State selection update to use inner...") Signed-off-by: Herbert Xu diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 69520ad3d83b..9b5f2c2b9770 100644 --- a/net/xf

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

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 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 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: [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 7/7] crypto: arc4 - mark ecb(arc4) skcipher as obsolete

2020-08-24 Thread Herbert Xu
lg. CRYPTO_USER is the configuration interface which has nothing to do with af_alg. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] net: Get rid of consume_skb when tracing is off

2020-08-22 Thread Herbert Xu
On Sat, Aug 22, 2020 at 01:54:19PM -0400, Neil Horman wrote: > > Wouldn't it be better to make this: > #define consume_skb(x) kfree_skb(x) Either way is fine but I prefer inline functions over macros. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/

Re: [PATCH] net: Get rid of consume_skb when tracing is off

2020-08-21 Thread Herbert Xu
gt; We want the following to be supported. > > perf probe consume_skb That should continue to work as this patch does not change anything when CONFIG_TRACEPOINTS is enabled. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH] net: Get rid of consume_skb when tracing is off

2020-08-21 Thread Herbert Xu
The function consume_skb is only meaningful when tracing is enabled. This patch makes it conditional on CONFIG_TRACEPOINTS. Signed-off-by: Herbert Xu diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 46881d902124..e8bca74857a3 100644 --- a/include/linux/skbuff.h +++ b/include

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

Re: [PATCH v2 3/3] drivers: crypto: add the Virtual Function driver for OcteonTX2 CPT

2020-08-12 Thread Herbert Xu
opping new users from coming in after you've finished the test. 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-08-12 Thread Herbert Xu
lease work out a way with the ARM folks to fix this without adding assembly code in a driver. 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 2/3] drivers: crypto: add support for OCTEONTX2 CPT engine

2020-08-12 Thread Herbert Xu
line = lf->lmtline; > + long ret; > + > + /* > + * Make sure memory areas pointed in CPT_INST_S > + * are flushed before the instruction is sent to CPT > + */ > + smp_wmb(); Why should this be a NOOP on UP? Cheers, -- Email: Herbert Xu H

Re: [PATCH ipsec-next] xfrm: add /proc/sys/core/net/xfrm_redact_secret

2020-07-28 Thread Herbert Xu
r at compile or via proc, it can not be disabled. > Redacting secret is a FIPS 140-2 requirement. Couldn't you use the existing fips_enabled sysctl? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH net V2] Crypto/chcr: Registering cxgb4 to xfrmdev_ops

2020-07-24 Thread Herbert Xu
#x27;m happy to continue taking anything that touches chcr_algo.c as that resides wholly within the Crypto API. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[v2 PATCH 2/2] rhashtable: Restore RCU marking on rhash_lock_head

2020-07-24 Thread Herbert Xu
This patch restores the RCU marking on bucket_table->buckets as it really does need RCU protection. Its removal had led to a fatal bug. Signed-off-by: Herbert Xu diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index e3def7bbe932..83ad875a7ea2 100644 --- a/include/li

[v2 PATCH 1/2] rhashtable: Fix unprotected RCU dereference in __rht_ptr

2020-07-24 Thread Herbert Xu
huai" Signed-off-by: Herbert Xu diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index 70ebef866cc8..e3def7bbe932 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h @@ -349,11 +349,11 @@ static inline void rht_unlock(struct bucket_table *tbl

[v2 PATCH 0/2] rhashtable: Fix unprotected RCU dereference in __rht_ptr

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

[PATCH 2/2] rhashtable: Restore RCU marking on rhash_lock_head

2020-07-23 Thread Herbert Xu
This patch restores the RCU marking on bucket_table->buckets as it really does need RCU protection. Its removal had led to a fatal bug. Signed-off-by: Herbert Xu diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index e3def7bbe932..9a8d4b9dde50 100644 --- a/include/li

[PATCH 1/2] rhashtable: Fix unprotected RCU dereference in __rht_ptr

2020-07-23 Thread Herbert Xu
huai" Signed-off-by: Herbert Xu diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index 70ebef866cc8..e3def7bbe932 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h @@ -349,11 +349,11 @@ static inline void rht_unlock(struct bucket_table *tbl

[PATCH 0/2] rhashtable: Fix unprotected RCU dereference in __rht_ptr

2020-07-23 Thread Herbert Xu
This patch series fixes an unprotected dereference in __rht_ptr. The first patch is a minimal fix that does not use the correct RCU markings but is suitable for backport, and the second patch cleans up the RCU markings. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert

Re: PROBLEM: potential concurrency bug in rhashtable.h

2020-07-23 Thread Herbert Xu
its callers. Everything else is just juggling RCU markings. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH] flow_offload: Move rhashtable inclusion to the source file

2020-07-23 Thread Herbert Xu
. Fixes: 4e481908c51b ("flow_offload: move tc indirect block to...") Signed-off-by: Herbert Xu diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h index f2c8311a0433..1075369d21d3 100644 --- a/include/net/flow_offload.h +++ b/include/net/flow_offload.h @@ -5,7 +5,6 @@

Re: PROBLEM: potential concurrency bug in rhashtable.h

2020-07-23 Thread Herbert Xu
ble. Let me see what I can do. 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 net] tcp: md5: refine tcp_md5_do_add()/tcp_md5_hash_key() barriers

2020-07-01 Thread Herbert Xu
quot;) > Signed-off-by: Eric Dumazet > Cc: Mathieu Desnoyers > Cc: Herbert Xu > Cc: Marco Elver > --- > net/ipv4/tcp.c | 8 > net/ipv4/tcp_ipv4.c | 19 ++++++- > 2 files changed, 18 insertions(+), 9 deletions(-) Acked-by: Herbert Xu T

Re: [regression] TCP_MD5SIG on established sockets

2020-06-30 Thread Herbert Xu
alized bytes, > if key->keylen is increased. (initial content of key->key[] is garbage) > > Something like this : LGTM. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [regression] TCP_MD5SIG on established sockets

2020-06-30 Thread Herbert Xu
mb. If they already exist in the code then I agree it's not a big deal. But adding a new pair of bogus smp_Xmb's is bad for maintenance. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [regression] TCP_MD5SIG on established sockets

2020-06-30 Thread Herbert Xu
E()/WRITE_ONCE(), but ACCESS_ONCE() instead. If it's the double-read that you're protecting against, you should just use barrier() and the comment should say so too. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [regression] TCP_MD5SIG on established sockets

2020-06-30 Thread Herbert Xu
() in tcp_md5_hash_key() */ > + >key->keylen = newkeylen; >return 0; >} This doesn't make sense. Your smp_rmb only guarantees that you see a version of key->key that's newer than keylen. What if the key got changed twice? You coul

Re: linux-next: build failures after merge of the vfs tree

2020-06-29 Thread Herbert Xu
> > @@ -26,6 +26,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > > > > #include "remoteproc_internal.h" > > > #include "qcom_common.h" > > > > I have applied those 2 by hand for today. > > I am still applying the above patch. Hi Al: Could you please fold these changes into your tree? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: missing retval check of call_netdevice_notifiers in dev_change_net_namespace

2020-06-23 Thread Herbert Xu
On Mon, Jun 22, 2020 at 12:43:53PM -0500, Eric W. Biederman wrote: > > Adding Herbert Xu who added support for failing notifications in > fcc5a03ac425 ("[NET]: Allow netdev REGISTER/CHANGENAME events to fail"). > > He might have some insight but 2007 wa

Re: linux-next: build failures after merge of the vfs tree

2020-06-17 Thread Herbert Xu
include diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index feb70283b6a2..903b2bb97e12 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "remoteproc_internal.h" #include "qcom_common.h" -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: linux-next: build failures after merge of the vfs tree

2020-06-17 Thread Herbert Xu
x 32b7a30b2485..eb382ceaa116 100644 --- a/arch/s390/lib/test_unwind.c +++ b/arch/s390/lib/test_unwind.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: linux-next: build failures after merge of the vfs tree

2020-06-16 Thread Herbert Xu
405722adfe1..c4f273e2fe78 100644 --- a/drivers/mtd/nand/raw/cadence-nand-controller.c +++ b/drivers/mtd/nand/raw/cadence-nand-controller.c @@ -17,6 +17,7 @@ #include #include #include +#include /* * HPNFC can work in 3 modes: Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~h

Re: linux-next: build failures after merge of the vfs tree

2020-06-15 Thread Herbert Xu
a forward declaration in linux/socket.h for struct file. Reported-by: Stephen Rothwell Fixes: f0187db056dc ("iov_iter: Move unnecessary inclusion of...") Signed-off-by: Herbert Xu diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c index 67087dbe2f9f..962b6e05287b 100644 --- a

[v3 PATCH] iov_iter: Move unnecessary inclusion of crypto/hash.h

2020-06-11 Thread Herbert Xu
detected by build failures. Also skbuff.h was relying on this to provide a declaration for ahash_request. This patch adds a forward declaration instead. Signed-off-by: Herbert Xu diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c index 6d0bec947636..e237d6038407 100644

Re: [PATCH net-next 2/2] Crypto/chcr: Checking cra_refcnt before unregistering the algorithms

2020-06-10 Thread Herbert Xu
n is how do you want to deal with the exception. IOW do you want to leave the algorithm still registered? If you can keep the algorithm registered you might as well never unregister it in the first place. If it has to go then this code path must wait for the users to disappear first. Cheers, -

Re: [PATCH net-next 0/2] Fixing issues in dma mapping and driver removal

2020-06-10 Thread Herbert Xu
On Wed, Jun 10, 2020 at 05:05:43PM -0700, David Miller wrote: > > Maybe we can start handling these changes via the crypto tree at some > point? Yes that's good point Dave. How about we push changes for chcr_algo via the crypto tree and the rest via netdev? Thanks, -- Email: He

Re: [PATCH net-next 2/2] Crypto/chcr: Checking cra_refcnt before unregistering the algorithms

2020-06-10 Thread Herbert Xu
s is not the case for your driver because of the existence of a path of unregistration that is not tied to module removal. To support that properly, we need to add code to the Crypto API to handle this, as opposed to adding hacks to the driver. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH net v3 2/3] esp: select CRYPTO_SEQIV

2020-06-09 Thread Herbert Xu
yption algorithms require "seqiv" > -- and RFC 8221 lists AES-GCM as "MUST" be implemented. > > Just make XFRM_ESP select CRYPTO_SEQIV. > > Fixes: f23efcbcc523 ("crypto: ctr - no longer needs CRYPTO_SEQIV") made > Cc: Corentin Labbe > Cc: Greg Kr

Re: [PATCH net v3 3/3] esp, ah: modernize the crypto algorithm selections

2020-06-09 Thread Herbert Xu
> > Also improve the help text. > > Suggested-by: Herbert Xu > Suggested-by: Steffen Klassert > Cc: Corentin Labbe > Cc: Greg Kroah-Hartman > Signed-off-by: Eric Biggers > --- > net/ipv4/Kconfig | 21 +++-- > net/ipv6/Kconfig | 21 +

Re: [PATCH net v3 1/3] esp, ah: consolidate the crypto algorithm selections

2020-06-09 Thread Herbert Xu
and make these be > selected by the corresponding INET* options. > > Suggested-by: Herbert Xu > Cc: Corentin Labbe > Cc: Greg Kroah-Hartman > Cc: Steffen Klassert > Signed-off-by: Eric Biggers > --- > net/ipv4/Kconfig | 16 ++-- > net/ipv6/Kconfig |

Re: [PATCH net v2] esp: select CRYPTO_SEQIV when useful

2020-06-07 Thread Herbert Xu
select CRYPTO_SEQIV? OK, let's just go with the unconditional select on SEQIV since Steffen recommended RFC8221 which lists GCM and CBC as MUST and GCM requires SEQIV to work. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH net] esp: select CRYPTO_SEQIV

2020-06-04 Thread Herbert Xu
x27;t be on it. We probably should add AES, SHA256 and GCM to the list. Another potential improvement is to merge the two select lists between ESP and ESP6. Perhaps move them to a new tristate say XFRM_ESP that would then be selected by ESP and ESP6. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH net] esp: select CRYPTO_SEQIV

2020-06-04 Thread Herbert Xu
On Fri, Jun 05, 2020 at 10:28:58AM +1000, Herbert Xu wrote: > > Hmm, the selection list doesn't include CTR so just adding SEQIV > per se makes no sense. I'm not certain that we really want to > include every algorithm under the sun. Steffen, what do you think? Or how

Re: [PATCH net] esp: select CRYPTO_SEQIV

2020-06-04 Thread Herbert Xu
eds CRYPTO_SEQIV") > Cc: Corentin Labbe > Cc: Greg Kroah-Hartman > Cc: Herbert Xu > Cc: Steffen Klassert > Signed-off-by: Eric Biggers > --- > net/ipv4/Kconfig | 1 + > net/ipv6/Kconfig | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/net/ipv4/

[PATCH] rhashtable: Drop raw RCU deref in nested_table_free

2020-06-03 Thread Herbert Xu
don't need RCU protection when we're freeing a nested RCU table because by this stage we've long passed a memory barrier when anyone could change the nested table. Signed-off-by: Herbert Xu diff --git a/lib/rhashtable.c b/lib/rhashtable.c index bdb7e4cadf05..9f6890aedd1a 100644 --

Re: [PATCH v2] net: ipv4: move tcp_fastopen server side code to SipHash library

2019-06-16 Thread Herbert Xu
78 deletions(-) You should also revert commit 798b2cbf9227 in your patch: commit 798b2cbf9227b1bd7d37ae9af4d9c750e6f4de9c Author: David S. Miller Date: Tue Sep 4 14:20:14 2012 -0400 net: Add INET dependency on aes crypto for the sake of TCP fastopen. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH ipsec] xfrm: fix sa selector validation

2019-06-14 Thread Herbert Xu
CC: Anirudh Gupta > Signed-off-by: Nicolas Dichtel Acked-by: Herbert Xu Sorry for not catching this! Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] inet: frags: Remove unnecessary smp_store_release/READ_ONCE

2019-05-31 Thread Herbert Xu
hy you need them and why the code would be buggy if you don't use them. In this case the code doesn't need them because an implicit barrier() (which is *stronger* than READ_ONCE/WRITE_ONCE) already exists in both places. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org

Re: [PATCH] inet: frags: Remove unnecessary smp_store_release/READ_ONCE

2019-05-28 Thread Herbert Xu
in_lock shared_var = 1 spin_lock spin_unlock if (shared_var == 1) ... spin_unlock Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH] inet: frags: Remove unnecessary smp_store_release/READ_ONCE

2019-05-28 Thread Herbert Xu
in order to not confuse future readers of this code. Comments have been added in their places. Signed-off-by: Herbert Xu diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index 2b816f1ebbb4..35e9784fab4e 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c @@ -193,1

[PATCH] rhashtable: Add rht_ptr_rcu and improve rht_ptr

2019-05-28 Thread Herbert Xu
This patch moves common code between rht_ptr and rht_ptr_exclusive into __rht_ptr. It also adds a new helper rht_ptr_rcu exclusively for the RCU case. This way rht_ptr becomes a lock-only construct so we can use the lighter rcu_dereference_protected primitive. Signed-off-by: Herbert Xu

Re: [PATCH net-next 11/11] inet: frags: rework rhashtable dismantle

2019-05-27 Thread Herbert Xu
? If it's meant to separate the setting of dead and the subsequent destruction work then it doesn't work because the barrier only protects the code preceding it, not after. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH net] xfrm: Fix xfrm sel prefix length validation

2019-05-21 Thread Herbert Xu
e address prefix lengths in the xfrm > selector.") > Signed-off-by: Anirudh Gupta 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 2/2] rhashtable: Fix cmpxchg RCU warnings

2019-05-16 Thread Herbert Xu
rimitive then yes that what it should do. But it isn't relevant to this patch. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH 2/2] rhashtable: Fix cmpxchg RCU warnings

2019-05-16 Thread Herbert Xu
As cmpxchg is a non-RCU mechanism it will cause sparse warnings when we use it for RCU. This patch adds explicit casts to silence those warnings. This should probably be moved to RCU itself in future. Signed-off-by: Herbert Xu --- lib/rhashtable.c |5 +++-- 1 file changed, 3 insertions

[PATCH 1/2] rhashtable: Remove RCU marking from rhash_lock_head

2019-05-16 Thread Herbert Xu
unnecessary RCU checking. Signed-off-by: Herbert Xu --- include/linux/rhashtable.h | 58 - lib/rhashtable.c | 28 ++--- 2 files changed, 46 insertions(+), 40 deletions(-) diff --git a/include/linux/rhashtable.h b/include

[PATCH 0/2] rhashtable: Fix sparse warnings

2019-05-16 Thread Herbert Xu
This patch series fixes all the sparse warnings. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH net] rhashtable: fix sparse RCU warnings on bit lock in bucket pointer

2019-05-15 Thread Herbert Xu
#x27;m working on a fix to this. 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/4] rhashtable: use cmpxchg() in nested_table_alloc()

2019-04-07 Thread Herbert Xu
replace rcu_assign_pointer() with cmpxchg() - which has equivalent > barrier properties. > If it the cmp fails, free the table that was just allocated. > > Signed-off-by: NeilBrown 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

[PATCH] ila: Fix rhashtable walker list corruption

2019-03-25 Thread Herbert Xu
xlat...") Signed-off-by: Herbert Xu diff --git a/net/ipv6/ila/ila_xlat.c b/net/ipv6/ila/ila_xlat.c index 79d2e43c05c5..5fc1f4e0c0cf 100644 --- a/net/ipv6/ila/ila_xlat.c +++ b/net/ipv6/ila/ila_xlat.c @@ -417,6 +417,7 @@ int ila_xlat_nl_cmd_flush(struct sk_buff *skb, struct genl_info *inf

Re: [Patch net v2] xfrm: clean up xfrm protocol checks

2019-03-25 Thread Herbert Xu
proto in validate_tmpl()") > Reported-by: syzbot+0bf0519d6e0de1591...@syzkaller.appspotmail.com > Cc: Steffen Klassert > Cc: Herbert Xu > Signed-off-by: Cong Wang > --- > include/net/xfrm.h | 17 + > net/ipv6/xfrm6_tunnel.c | 2 +- > net/key/af_key.c|

Re: [Patch net] xfrm: unify xfrm protocol checks

2019-03-21 Thread Herbert Xu
in the first case and allowed in the second case. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [Patch net] xfrm: unify xfrm protocol checks

2019-03-19 Thread Herbert Xu
em. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [Patch net] xfrm: unify xfrm protocol checks

2019-03-18 Thread Herbert Xu
rproto == IPSEC_PROTO_ANY && xfrm_id_proto_valid(proto))); > } This does not look right. IPSEC_PROTO_ANY should only be allowed in userproto and your patch is going to let it pass when it's in proto. Whether IPPROTO_ROUTING/IPPROTO_DSTOPTS should be allowed in this context is also n

  1   2   3   4   5   6   7   8   9   10   >