[PATCH 1/2] mac80211: Use linked list instead of rhashtable walk for mesh tables

2019-02-12 Thread Herbert Xu
of the current position, it always converts the current position to an integer which defeats the purpose of the iterator. Therefore this patch converts all uses of rhashtable walk into a simple linked list. Signed-off-by: Herbert Xu --- net/mac80211/mesh.h |4 + net/mac80211/mesh_p

[PATCH 2/2] mac80211: Free mpath object when rhashtable insertion fails

2019-02-12 Thread Herbert Xu
When rhashtable insertion fails the mesh table code doesn't free the now-orphan mesh path object. This patch fixes that. Signed-off-by: Herbert Xu --- net/mac80211/mesh_pathtbl.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/mac80211/mesh_pathtb

[PATCH] mac80211: Use rhashtable_lookup_get_insert_fast instead of racy code

2019-02-12 Thread Herbert Xu
On Wed, Feb 13, 2019 at 01:05:51PM +0800, Herbert Xu wrote: > Hi: > > This patch fixes a number of issues with the use of the rhashtable API > in mac80211. First of all it converts the use of rashtable walks over > to a simple linked list. This is because an rhashtable walk

[PATCH] rhashtable: Remove obsolete rhashtable_walk_init function

2019-02-12 Thread Herbert Xu
off-by: Herbert Xu diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index 20f9c6af7473..ae9c0f71f311 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h @@ -1113,14 +1113,6 @@ static inline int rhashtable_replace_fast( return err; } -/* Obsol

Re: [PATCH] rhashtable: Remove obsolete rhashtable_walk_init function

2019-02-13 Thread Herbert Xu
ree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Herbert-Xu/rhashtable-Remove-obsolete-rhashtable_walk_init-function/20190213-182336 > config: x86_64-lkp (attached as .config) > compiler: gcc-8 (Debian 8.2.0-20)

Re: [PATCH 2/2] mac80211: Free mpath object when rhashtable insertion fails (fwd)

2019-02-13 Thread Herbert Xu
r is not due to an existing entry (EEXIST). 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] mac80211: Use linked list instead of rhashtable walk for mesh tables

2019-02-13 Thread Herbert Xu
On Wed, Feb 13, 2019 at 01:16:13PM +0800, Herbert Xu wrote: > The mesh table code walks over hash tables for two purposes. First of > all it's used as part of a netlink dump process, but it is also used > for looking up entries to delete using criteria other than the hash > key

[v2 PATCH 0/4] mac80211: Fix incorrect usage of rhashtable walk API

2019-02-13 Thread Herbert Xu
moves an obsolete rhashtable API. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH 1/4] mac80211: Use linked list instead of rhashtable walk for mesh tables

2019-02-13 Thread Herbert Xu
s the walk list modifications. In fact the previous code was buggy as the removals can race with each other, potentially resulting in a double-free. Signed-off-by: Herbert Xu --- net/mac80211/mesh.h |6 + net/mac80211/mesh_pathtbl.c | 138 +++- 2 fi

[PATCH 3/4] mac80211: Use rhashtable_lookup_get_insert_fast instead of racy code

2019-02-13 Thread Herbert Xu
directly return the mathcing object. Signed-off-by: Herbert Xu --- net/mac80211/mesh_pathtbl.c | 31 ++- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index db5a1aef22db..8902395e406e 100644

[PATCH 4/4] rhashtable: Remove obsolete rhashtable_walk_init function

2019-02-13 Thread Herbert Xu
The rhashtable_walk_init function has been obsolete for more than two years. This patch finally converts its last users over to rhashtable_walk_enter and removes it. Signed-off-by: Herbert Xu --- include/linux/rhashtable.h |8 lib/rhashtable.c |2 +- lib

[PATCH 2/4] mac80211: Free mpath object when rhashtable insertion fails

2019-02-13 Thread Herbert Xu
When rhashtable insertion fails the mesh table code doesn't free the now-orphan mesh path object. This patch fixes that. Signed-off-by: Herbert Xu --- net/mac80211/mesh_pathtbl.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/net/mac80211/mesh_pathtb

Re: [PATCH 2/4] mac80211: Free mpath object when rhashtable insertion fails

2019-02-14 Thread Herbert Xu
On Wed, Feb 13, 2019 at 04:04:29PM +0100, Johannes Berg wrote: > On Wed, 2019-02-13 at 22:39 +0800, Herbert Xu wrote: > > + if (ret != -EEXIST) > > return ERR_PTR(ret); > > Surely that should still be "if (ret && ret != -EEXIST)" otherwise yo

[v3 PATCH 0/4] mac80211: Fix incorrect usage of rhashtable walk API

2019-02-14 Thread Herbert Xu
fails (which can occur due to OOM). The third patch is a code-cleanup to mac80211 while the last patch removes an obsolete rhashtable API. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH 3/4] mac80211: Use rhashtable_lookup_get_insert_fast instead of racy code

2019-02-14 Thread Herbert Xu
directly return the mathcing object. Signed-off-by: Herbert Xu --- net/mac80211/mesh_pathtbl.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index c3a7396fb955..8902395e406e 100644 --- a

[PATCH 1/4] mac80211: Use linked list instead of rhashtable walk for mesh tables

2019-02-14 Thread Herbert Xu
s the walk list modifications. In fact the previous code was buggy as the removals can race with each other, potentially resulting in a double-free. Signed-off-by: Herbert Xu --- net/mac80211/mesh.h |6 + net/mac80211/mesh_pathtbl.c | 138 +++- 2 fi

[PATCH 2/4] mac80211: Free mpath object when rhashtable insertion fails

2019-02-14 Thread Herbert Xu
When rhashtable insertion fails the mesh table code doesn't free the now-orphan mesh path object. This patch fixes that. Signed-off-by: Herbert Xu --- net/mac80211/mesh_pathtbl.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/net/mac

[PATCH 4/4] rhashtable: Remove obsolete rhashtable_walk_init function

2019-02-14 Thread Herbert Xu
The rhashtable_walk_init function has been obsolete for more than two years. This patch finally converts its last users over to rhashtable_walk_enter and removes it. Signed-off-by: Herbert Xu --- include/linux/rhashtable.h |8 lib/rhashtable.c |2 +- lib

Re: [PATCH 2/4] mac80211: Free mpath object when rhashtable insertion fails

2019-02-14 Thread Herbert Xu
d not to do this in my patch as it's not directly related to the kfree issue. But I agree that this makes more sense and we should make that change in another patch. Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] lib/test_rhashtable: fix spelling mistake "existant" -> "existent"

2019-02-18 Thread Herbert Xu
On Sun, Feb 17, 2019 at 10:52:09PM +, Colin King wrote: > From: Colin Ian King > > There are spelling mistakes in warning macro messages. Fix them. > > Signed-off-by: Colin Ian King Acked-by: Herbert Xu -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert

Re: [v3 PATCH 0/4] mac80211: Fix incorrect usage of rhashtable walk API

2019-02-18 Thread Herbert Xu
even just appending "(v3)" to > the subject of the cover letter would've fixed that... Noted. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] lib/rhashtable: reorder some inititalization sequences

2018-05-14 Thread Herbert Xu
t; Also move the locking initialization down to the end. > > > > Signed-off-by: Davidlohr Bueso > > The user potentially "doing something bogus" is why the most > expensive part of the initialization (the memory allocation) > is done after everything else is vali

Re: [PATCH v2 2/2] chcr: Add support for Inline IPSec

2017-11-15 Thread Herbert Xu
s/crypto/chelsio/chcr_core.c:169: undefined reference to > >> `chcr_add_xfrmops' Atul, can you fix this and resubmit your patches please? Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: GRO disabled with IPv4 options

2017-11-16 Thread Herbert Xu
too much. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [crypto v3 1/2] cxgb4: Add support for Inline IPSec Tx

2017-11-28 Thread Herbert Xu
smit from chcr driver. > > Signed-off-by: Atul Gupta > Signed-off-by: Ganesh Goudar > --- > V2: Fixed the build warnings and created patch against cryptodev > to avoid possible merge conflicts > V3: Fixed a build warning and added flag for data packet Patch applied. Than

Re: [crypto v3 2/2] chcr: Add support for Inline IPSec

2017-11-28 Thread Herbert Xu
off-by: Atul Gupta > Signed-off-by: Harsh Jain > Signed-off-by: Ganesh Goudar > --- > V2: Fixed the build warnings and created patch against cryptodev > to avoid possible merge conflicts > V3: Fixed a build warning and added flag for data packet Patch applied. Thanks. --

Re: [5/8] crypto: remove unused hardirq.h

2017-11-28 Thread Herbert Xu
On Sat, Nov 18, 2017 at 07:02:18AM +0800, Yang Shi wrote: > Preempt counter APIs have been split out, currently, hardirq.h just > includes irq_enter/exit APIs which are not used by crypto at all. > > So, remove the unused hardirq.h. > > Signed-off-by: Yang Shi > Cc: Herbe

Re: [PATCH net-next 2/5] rhashtable: Add rhastable_walk_peek

2017-11-30 Thread Herbert Xu
on? As it is it's difficult to deduce why we would want to add something like this given that hashtable walks are always unstable and there is no guarantee that two calls to peek or a peek followed by a normal walk will see the same entry. Thanks, -- Email: Herbert Xu Home Page: http://gondo

Re: [PATCH net-next 2/5] rhashtable: Add rhastable_walk_peek

2017-11-30 Thread Herbert Xu
in > each pass. Thanks Tom! This information is very useful. It sounds like this problem isn't specific to ila and would exist for all rhashtable users that dump through netlink. Let me think about this a little bit more. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~he

Re: [PATCH net-next 1/5] rhashtable: Don't reset walker table in rhashtable_walk_start

2017-12-01 Thread Herbert Xu
follow the start > of the walk so there should be no behavioral change in doing this. > > Signed-off-by: Tom Herbert Doesn't this mean that if a walk encounters a rehash you may end up missing half or more of the hash table? Cheers, -- Email: Herbert Xu Home Pag

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-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

[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 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/

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
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 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: [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: [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
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
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: [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: [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-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-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
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, -

[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: 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

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-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-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: [PATCH v2 1/7] crypto:chelsio: Remove unused parameter

2017-11-03 Thread Herbert Xu
On Sun, Oct 08, 2017 at 01:37:18PM +0530, Harsh Jain wrote: > From: Yeshaswi M R Gowda > > Remove unused parameter sent to latest fw. > > Signed-off-by: Harsh Jain All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gond

Re: [PATCH v10 00/20] simplify crypto wait for async op

2017-11-03 Thread Herbert Xu
ast tests the crypto users via testmgr and > tcrypt but I do note that I do not have access to some > of the HW whose drivers are modified nor do I claim I was > able to test all of the corner cases. > > The patch set is based upon linux-next release tagged > next-20171017. All

Re: kernel BUG at net/key/af_key.c:LINE!

2017-11-08 Thread Herbert Xu
ogle Compute Engine, > BIOS Google 01/01/2011 > task: 8801d4ecc1c0 task.stack: 8801c13f8000 > RIP: 0010:pfkey_xfrm_policy2msg+0x209c/0x22b0 net/key/af_key.c:2068 This shows that you have a xfrm policy that has a bogus family field in your policy database. But it gives no cl

Re: kernel BUG at net/key/af_key.c:LINE!

2017-11-09 Thread Herbert Xu
don't currently see how this is bypassing that check. But clearly it has found a way through the check since it's crashing. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: kernel BUG at net/key/af_key.c:LINE!

2017-11-09 Thread Herbert Xu
On Thu, Nov 09, 2017 at 10:38:57PM +1100, Herbert Xu wrote: > > The xfrm code path is meant to forbid the creation of such a policy. > I don't currently see how this is bypassing that check. But > clearly it has found a way through the check since it's crashing. By castra

Re: kernel BUG at net/key/af_key.c:LINE!

2017-11-09 Thread Herbert Xu
On Fri, Nov 10, 2017 at 01:04:59PM +1100, Herbert Xu wrote: > > By castrating the reproducer to not perform a pfkey dump I have > captured the corrupted policy via xfrm: > > src ???/0 dst ???/0 uid 0 > socket in action allow index 2083 priority 0 ptype main share any &

Re: kernel BUG at net/key/af_key.c:LINE!

2017-11-09 Thread Herbert Xu
On Fri, Nov 10, 2017 at 01:11:45PM +1100, Herbert Xu wrote: > > Oh and this is an important clue. We have two policies with > identical index values. The index value is meant to be unique > so clearly something funny is going on. I found the problem. This crap is coming from clone_

Re: kernel BUG at net/key/af_key.c:LINE!

2017-11-09 Thread Herbert Xu
On Fri, Nov 10, 2017 at 01:30:38PM +1100, Herbert Xu wrote: > > I found the problem. This crap is coming from clone_policy. Now > let me where this code came from. ---8<--- Subject: xfrm: Copy policy family in clone_policy The syzbot found an ancient bug in the IPsec code. When

Re: [PATCH 0/9] Bug fixes and ctr mode of operation

2017-06-19 Thread Herbert Xu
2k > Atul Gupta (2): > chcr - Add debug counters > crypto: chcr - Select device in Round Robin fashion 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: [GIT] Networking

2017-07-10 Thread Herbert Xu
another socket leak, this time in > AF_ALG. Hmm, I can't see the problem in af_alg_accept. The struct socket comes directly from sys_accept() which creates it using sock_alloc. So the only thing I can think of is that the memory returned by sock_alloc is not zeroed and therefore the WARN_O

Re: [GIT] Networking

2017-07-10 Thread Herbert Xu
actually redundant because all the work it does is subsumed by sock_init_data. However, it was added to placate SELinux as it uses it to initialise its internal state. This patch avoisd the warning by making the SELinux call directly. Reported-by: Linus Torvalds Signed-off-by: Herbert Xu dif

Re: [GIT] Networking

2017-07-11 Thread Herbert Xu
On Tue, Jul 11, 2017 at 01:31:14PM -0700, David Miller wrote: > > Acked-by: David S. Miller > > Looks good, is this going via my tree or your's? I'll push it along. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor

Re: [PATCH] lib: test_rhashtable: fix for large entry counts

2017-07-23 Thread Herbert Xu
eger type field. > > Fixes: f4a3e90ba5739 ("rhashtable-test: extend to test concurrency") > Reported by: Manuel Messner > Signed-off-by: Phil Sutter 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

Transport mode xfrm_gro

2017-12-05 Thread Herbert Xu
ng to reinject the skb into the network stack? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: Transport mode xfrm_gro

2017-12-05 Thread Herbert Xu
On Wed, Dec 06, 2017 at 02:37:17PM +1100, Herbert Xu wrote: > > So why is xfrm_input in the xfrm_gro case trying to reinject the > skb into the network stack? Nevermind, I see now that transport_finish has code to skip xfrm_gro packets. Cheers, -- Email: Herbert Xu Home P

Re: [PATCH v2 net-next 1/5] rhashtable: Change rhashtable_walk_start to return void

2017-12-11 Thread Herbert Xu
he function > rhashtable_walk_start_check has been added that returns -EAGAIN on a > resize event. > > Signed-off-by: Tom Herbert 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 v2 net-next 2/5] rhashtable: Add rhastable_walk_peek

2017-12-11 Thread Herbert Xu
walker.tbl being NULL is not a > sufficient condition for end of table). > > Signed-off-by: Tom Herbert 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 v2 net-next 0/5] rhashtable: New features in walk and bucket

2017-12-11 Thread Herbert Xu
fix up all existing rhashtable users that dump through netlink to use the new peek interface. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

xfrm: Reinject transport-mode packets through tasklet

2017-12-14 Thread Herbert Xu
input hooks") Signed-off-by: Herbert Xu diff --git a/include/net/xfrm.h b/include/net/xfrm.h index dc28a98..ae35991 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1570,6 +1570,9 @@ struct xfrmk_spdinfo { int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb); int

Re: [PATCH 2/3] tcp: Add ESP encapsulation support

2018-01-17 Thread Herbert Xu
done. I'm working on it. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 0/7] crypto: aesni: provide generic gcm(aes)

2017-05-17 Thread Herbert Xu
crypto API. > > With these patches, performance of MACsec on a single core increases > by 40% (from 4.5Gbps to around 6.3Gbps). All patches 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] rhashtable: Fix missing elements when inserting.

2017-05-23 Thread Herbert Xu
list); Your second RCU_INIT_POINTER needs to be rcu_assign_pointer. Your approach of retaining the first duplicate object as the head of the list should work too but I don't really see any point in changing this. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: Fwd: Netlink XFRM socket subsystem NULL pointer dereference

2017-10-19 Thread Herbert Xu
On Thu, Oct 19, 2017 at 05:26:25PM +0800, Herbert Xu wrote: > > So it's an netlink API issue. It is possible for cb->done to be > called without cb->dump ever being called. And xfrm_user doesn't > deal with that. Let me survey the others to see whether we should >

[PATCH v2] ipsec: Fix aborted xfrm policy dump crash

2017-10-19 Thread Herbert Xu
s because the target socket's receive buffer is full. This patch fixes it by using the cb->start mechanism to ensure that the initialisation is always done regardless of the buffer situation. Fixes: 12a169e7d8f4 ("ipsec: Put dumpers on the dump list") Signed-off-by: Herbert Xu

Re: [PATCH] net: xfrm_user: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Herbert Xu
le even warning about this? If anything we should be converting these constructs to not use BUG. 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_user: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Herbert Xu
On Mon, Oct 23, 2017 at 10:50:43PM -0500, Gustavo A. R. Silva wrote: > > Quoting Herbert Xu : > > >On Mon, Oct 23, 2017 at 01:18:57PM -0500, Gustavo A. R. Silva wrote: > >>Use BUG_ON instead of if condition followed by BUG. > >> > >>This issu

Re: [PATCH] net: xfrm_user: use BUG_ON instead of if condition followed by BUG

2017-10-23 Thread Herbert Xu
BUG_ON(cond); rather than just BUG_ON(code_that_does_something()); But maybe it's just me. 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_user: use BUG_ON instead of if condition followed by BUG

2017-10-24 Thread Herbert Xu
ng like int err; err = ; BUG_ON(err); Having real code in BUG_ON may pose problems to people reading the code because some of us tend to ignore code in BUG_ON and similar macros such as BUILD_BUG_ON. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Ke

Re: [PATCH] ipv6: esp6: use BUG_ON instead of if condition followed by BUG

2017-10-24 Thread Herbert Xu
goto out; > } > > - if (skb_copy_bits(skb, skb->len - alen - 2, nexthdr, 2)) > - BUG(); > + BUG_ON(skb_copy_bits(skb, skb->len - alen - 2, nexthdr, 2)); How about ret = skb_copy_bits(skb, skb->len - alen - 2, nexthdr, 2);

Re: [PATCH] net: xfrm_user: use BUG_ON instead of if condition followed by BUG

2017-10-25 Thread Herbert Xu
d_spdinfo(r_skb, net, sportid, seq, *flags); BUG_ON(err < 0); 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] ipv6: esp6: use BUG_ON instead of if condition followed by BUG

2017-10-26 Thread Herbert Xu
On Thu, Oct 26, 2017 at 07:51:06AM -0500, Gustavo A. R. Silva wrote: > Use BUG_ON instead of if condition followed by BUG in esp_remove_trailer. > > This issue was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva Acked-by: Herbert Xu -- Email: H

Re: Using the aesni generic gcm(aes) aead in atomic context

2017-10-30 Thread Herbert Xu
ext? Are you allocating the tfm from atomic context? That is not allowed. Normally you would allocate the tfm in process context, e.g., when the connection is setup. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: Using the aesni generic gcm(aes) aead in atomic context

2017-10-31 Thread Herbert Xu
I shouldn't need to check irq_fpu_usable(). The crypto API should work regardless of what context you're in. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: Using the aesni generic gcm(aes) aead in atomic context

2017-10-31 Thread Herbert Xu
On Tue, Oct 31, 2017 at 07:23:35AM +, Ilya Lesokhin wrote: > On Tuesday, October 31, 2017 9:17 AM, Herbert Xu wrote: > > > > Users of the crypto API shouldn't need to check irq_fpu_usable(). > > The crypto API should work regardless of what context you're in

Re: Using the aesni generic gcm(aes) aead in atomic context

2017-10-31 Thread Herbert Xu
> Hopefully the situation where the FPU is not available is rare enough > So it won't hurt the performance too much. For your intended use case I think async processing should work just fine as it does for IPsec. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.

Re: REGRESSION: panic on e1000 driver

2007-05-30 Thread Herbert Xu
looking to see if there's some other problem that we haven't uncovered yet. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.t

Re: REGRESSION: panic on e1000 driver

2007-05-30 Thread Herbert Xu
en though we've explicitly shut it off. Does this patch help? If it does help, does it produce the warning in dmesg? Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: htt

Re: REGRESSION: panic on e1000 driver

2007-05-30 Thread Herbert Xu
t is through an interrupt? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsub

Re: REGRESSION: panic on e1000 driver

2007-05-31 Thread Herbert Xu
emory barriers then we should get to the bottom of it first before making this problem disappear. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~h

Re: [E1000-devel] REGRESSION: panic on e1000 driver

2007-05-31 Thread Herbert Xu
Change */ This still makes no sense. The only triggers I can find for this occur after e1000_irq_enable. So unless we've got a problem with memory barriers we shouldn't get the above printk. Is there another trigger that happens earlier? Cheers, -- Visit Openswan at ht

Re: REGRESSION: panic on e1000 driver

2007-05-31 Thread Herbert Xu
make the printk go away or does it trigger a backtrace? Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- diff --git a/drivers/ne

Re: REGRESSION: panic on e1000 driver

2007-05-31 Thread Herbert Xu
interrupt. We can fix this by 1) Ignoring IRQs when irq_sem > 0. 2) Always generate an IRQ after e1000_irq_enable. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://

Re: [NET] gso: Fix GSO feature mask in sk_setup_caps

2007-05-31 Thread Herbert Xu
On Thu, May 31, 2007 at 10:16:22PM -0700, David Miller wrote: > > I don't think it's worth bothering -stable with this one, > agreed? Not unless we're planning on making UFO use sk_setup_caps :) Agreed! Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbe

[NET] gso: Fix GSO feature mask in sk_setup_caps

2007-05-31 Thread Herbert Xu
em is that right now we translate GSO emulation to the bitmask NETIF_F_GSO_MASK, which includes every protocol, even ones that we cannot emulate. This patch makes it provide only the ones that we can emulate. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Cheers, -- Visit Opens

Re: [PATCH] e1000: disable polling before registering netdevice

2007-06-01 Thread Herbert Xu
etif_* calls above register_netdevice so the > stack starts out how we expect it to be. > > Signed-off-by: Auke Kok <[EMAIL PROTECTED]> > Cc: Herbert Xu <[EMAIL PROTECTED]> > Cc: Doug Chapman <[EMAIL PROTECTED]> Looks good! Thanks, -- Visit Openswan at http:/

[0/4] [IPV4]: Fix compatibility issue with ipv4_devconf_dflt

2007-06-02 Thread Herbert Xu
over again at the same points as before for values which have not been explicitly set. If this looks OK I'll do the same thing for IPv6 as well. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.a

[1/4] [IPV4]: Only panic if inetdev_init fails for loopback

2007-06-02 Thread Herbert Xu
if clause. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- diff -

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