Re: [PATCH net] ipv6: lock socket in ip6_datagram_connect()

2015-07-14 Thread Herbert Xu
sses. > > Signed-off-by: Eric Dumazet Good find! This goes all the way back to 1.3 it seems :) 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 -- To unsubscribe from this list: send the li

Re: net: Fix skb csum races when peeking

2015-07-13 Thread Herbert Xu
On Mon, Jul 13, 2015 at 08:01:42PM +0800, Herbert Xu wrote: > > PS we seem to no longer use the hardware checksum in case of > CHECKSUM_COMPLETE, I wonder why that is? Nevermind, it's still there. I was just looking in the wrong place. -- Email: Herbert Xu H

net: Fix skb csum races when peeking

2015-07-13 Thread Herbert Xu
On Mon, Jul 13, 2015 at 04:31:00PM +0800, Herbert Xu wrote: > On Mon, Jul 13, 2015 at 10:28:19AM +0200, Eric Dumazet wrote: > > > > Except that udp checksum are checked outside of spinlock protection. > > Good point. I wonder when this got broken. I'll do some dig

Re: [PATCH] netlink: enable skb header refcounting before sending first broadcast

2015-07-13 Thread Herbert Xu
ast side would generate a shared skb and the recv side is supposed to only read it, not modify it. In fact apart from the skb->peeked bug netlink_recvmsg does all the right things and never modifies skb. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbe

Re: [PATCH] netlink: enable skb header refcounting before sending first broadcast

2015-07-13 Thread Herbert Xu
On Mon, Jul 13, 2015 at 10:28:19AM +0200, Eric Dumazet wrote: > > Except that udp checksum are checked outside of spinlock protection. Good point. I wonder when this got broken. I'll do some digging. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PG

Re: [PATCH] netlink: enable skb header refcounting before sending first broadcast

2015-07-13 Thread Herbert Xu
On Mon, Jul 13, 2015 at 10:22:34AM +0200, Eric Dumazet wrote: > > It should worry, in case multiple threads are using MSG_PEEK on same udp > socket ;) That should be fine because we already hold a spinlock on the queue. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apa

Re: [PATCH] netlink: enable skb header refcounting before sending first broadcast

2015-07-13 Thread Herbert Xu
ve to worry about share skbs, unlike netlink. Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev" in the body of a message to majord..

Re: [PATCH v2] netlink: reset skb->peeked when reuse orphan skb for next broadcast

2015-07-13 Thread Herbert Xu
this patch is not needed if we fix the root cause. Thanks, -- Email: Herbert Xu 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 "unsubscribe netdev" in the body of a message to major

net: Clone skb before setting peeked flag

2015-07-13 Thread Herbert Xu
double-free. This patch fixes this by cloning the skb and replacing the skb in the list when setting skb->peeked. Fixes: a59322be07c9 ("[UDP]: Only increment counter on first peek/recv") Reported-by: Konstantin Khlebnikov Signed-off-by: Herbert Xu diff --git a/net/core/datagram

Re: [PATCH] netlink: enable skb header refcounting before sending first broadcast

2015-07-13 Thread Herbert Xu
t in finding this bug is wonderful. However I think the fix is a bit dirty. The real issue here is that the recv path no longer handles shared skbs. So either we need to fix the recv path to not touch skbs without cloning them, or we need to get rid of the use of shared skbs in netlink. In fact

Re: [PATCH v2] rhashtable: fix for resize events during table walk

2015-07-06 Thread Herbert Xu
r me. Bug probably introduced > by Herbert Xu's patch eddee5ba ("rhashtable: Fix walker behaviour during > rehash") although not explicitly tested. > > Fixes: eddee5ba ("rhashtable: Fix walker behaviour during rehash") > Signed-off-by: Phil Sutter Acked-by:

Re: [PATCH] rhashtable: fix for resize events during table walk

2015-07-06 Thread Herbert Xu
->tbl) { > iter->slot = 0; > iter->skip = 0; > - return ERR_PTR(-EAGAIN); > + rc = ERR_PTR(-EAGAIN); > } > > iter->p = NULL; I think a simpler fix would be to move "iter->p = NULL" before the i

Re: netlink & rhashtable status

2015-06-27 Thread Herbert Xu
. > > patch follows... Sounds like this is it. Thanks for digging into this! -- Email: Herbert Xu 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 "unsubscribe netdev"

Re: [PATCH v3.17 .. v3.19] lib/rhashtable: fix race between rhashtable_lookup_compare and hashtable resize

2015-06-27 Thread Herbert Xu
those kernels. Eric, can you rerun your test to see if this patch makes your problem go away on the pre-4.0 kernels? Thanks! -- Email: Herbert Xu 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

Re: Performance loss due to commit 37c3185 ([NET]: Added GSO toggle)

2015-06-25 Thread Herbert Xu
supports. I guess we should also check that the hardware can checksum both IPv4 and IPv6 before enabling it. However, the benefit of GSO should cancel out the cost of copying so I was hoping to just enable GSO unconditionally at some point. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.

Re: [PATCH net-next] bridge: multicast: add a comment to br_port_state_selection about blocking state

2015-06-23 Thread Herbert Xu
blocking/disabled state, the timer will > simply expire and stop without sending more queries. > > Suggested-by: Herbert Xu > Signed-off-by: Nikolay Aleksandrov Acked-by: Herbert Xu Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http:/

Re: [PATCH net-next] bridge: multicast: disable port when in blocking state

2015-06-22 Thread Herbert Xu
he timers will expire and kill themselves automatically? I think adding it to the place where you were going to place the disable_port call would be the most obvious. 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 v2] bridge: multicast: start querier timer when running user-space stp

2015-06-19 Thread Herbert Xu
gt; path and enables it in all states different from blocking. Note that when a > port goes in BR_STATE_DISABLED it's not enabled because that is handled > in the beginning of the port list loop. > > Signed-off-by: Nikolay Aleksandrov Acked-by: Herbert Xu On a related note, w

Re: [PATCH net 2/2] bridge: multicast: start querier timer when running user-space stp

2015-06-17 Thread Herbert Xu
uld be identical whether we use kernel STP or user-space STP. So how about removing br_multicast_enable_port from br_make_forward and just add it here for both kernel and user-space STP? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apan

Re: [PATCH net 1/2] bridge: multicast: restore router configuration on port link down/up

2015-06-17 Thread Herbert Xu
09e11758bd ("bridge: Add multicast_router sysfs entries") 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 -- To unsubscribe from this list: send the line "unsubscribe net

Re: [PATCH net v2] bridge: fix multicast router rlist endless loop

2015-06-09 Thread Herbert Xu
gt; Fixes: 0909e11758bd ("bridge: Add multicast_router sysfs entries") 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 -- To unsubscribe from this list: send the line "unsubsc

Re: [PATCH net] bridge: fix multicast router rlist endless loop

2015-06-09 Thread Herbert Xu
t); This should work but removing it and readding seems strange. How about moving the hlist_unhashed test that's currently in br_multicast_mark_router into br_multicast_add_router instead? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor

Re: [v2 PATCH 5/13] crypto: testmgr - Switch to new AEAD interface

2015-06-07 Thread Herbert Xu
removed? It will be removed once every single driver has been converted. Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev" in t

Re: [v2 PATCH 5/13] crypto: testmgr - Switch to new AEAD interface

2015-06-04 Thread Herbert Xu
On Thu, Jun 04, 2015 at 03:15:19PM -0700, Tadeusz Struk wrote: > Hi Herbert, > On 05/22/2015 01:30 AM, Herbert Xu wrote: > > This patch makes use of the new AEAD interface which uses a single > > SG list instead of separate lists for the AD and plain text. > > The fact th

Re: netlink: Disable insertions/removals during rehash

2015-06-04 Thread Herbert Xu
is, > or do you expect some changes ? I just looked up the patchwork entry and it actually says "not applicable" which is correct: https://patchwork.ozlabs.org/patch/473041/ Because the patch only applies to stable and is not needed in either net or net-next. Cheers

Re: Fw: [Bug 99091] New: Kernel panic while sending network packets over TAP interface

2015-05-28 Thread Herbert Xu
race condition or a > corrupted/uninitialized error queue in skb_queue_tail(). Your bug is simple. Somebody is setting skb->sk when they shouldn't. Presumably it's whatever that injected the packet into your stack, i.e., your NIC driver. So you should start look

Re: [PATCH net-next] neigh: Add missing rcu_assign_pointer

2015-05-28 Thread Herbert Xu
FIG_SPARSE_RCU_POINTER=y > root@edumazet-glaptop2:/usr/src/net# make C=2 CF=-D__CHECK_ENDIAN__ > net/core/neighbour.o > ... > CHECK net/core/neighbour.c Indeed. Thanks for pointing this out. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gon

Re: [PATCH net-next] neigh: Add missing rcu_assign_pointer

2015-05-28 Thread Herbert Xu
n RCU-protected like this will trigger sparse warnings. So better make it an RCU_INIT_POINTER. Cheers, -- Email: Herbert Xu 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 "unsu

Re: [PATCH] xfrm6: Do not use xfrm_local_error for path MTU issues in tunnels

2015-05-27 Thread Herbert Xu
g where in that situation the kernel would interpret the ICMP message as a reduction in outer MTU and thus resulting in a loop where the MTU keeps getting smaller. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --

Re: [v3 PATCH 0/8] crypto: Convert all AEAD users to new interface

2015-05-27 Thread Herbert Xu
ies of fixes posted just before it (but only to linux-crypto): https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg14487.html Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this li

Re: [v3 PATCH 0/8] crypto: Convert all AEAD users to new interface

2015-05-27 Thread Herbert Xu
de your own version of crypto_aead_encrypt and crypto_aead_decrypt that did the same thing as old_crypt. Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev&q

Re: [v3 PATCH 0/8] crypto: Convert all AEAD users to new interface

2015-05-27 Thread Herbert Xu
/ for the older kernel to support the new interface along with the old interface. Note that this patch itself won't be good enough because I have since removed cryptoff. But it illustrates the amount of code you need. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~h

[v3 PATCH 5/8] esp6: Switch to new AEAD interface

2015-05-27 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. The IV generation is also now carried out through normal AEAD methods. Signed-off-by: Herbert Xu --- net/ipv6/esp6.c | 200

[v3 PATCH 4/8] esp4: Switch to new AEAD interface

2015-05-27 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. The IV generation is also now carried out through normal AEAD methods. Signed-off-by: Herbert Xu --- net/ipv4/esp4.c | 200

[v3 PATCH 7/8] mac80211: Switch to new AEAD interface

2015-05-27 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Tested-by: Johannes Berg Signed-off-by: Herbert Xu --- net/mac80211/aes_ccm.c | 30 ++ net/mac80211/aes_gcm.c | 30

[v3 PATCH 6/8] mac802154: Switch to new AEAD interface

2015-05-27 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Signed-off-by: Herbert Xu --- net/mac802154/llsec.c | 41 ++--- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a

[v3 PATCH 8/8] crypto: tcrypt - Switch to new AEAD interface

2015-05-27 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Signed-off-by: Herbert Xu --- crypto/tcrypt.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c

[v3 PATCH 2/8] xfrm: Add IV generator information to xfrm_algo_desc

2015-05-27 Thread Herbert Xu
This patch adds IV generator information for each AEAD and block cipher to xfrm_algo_desc. This will be used to access the new AEAD interface. Signed-off-by: Herbert Xu --- include/net/xfrm.h |2 ++ net/xfrm/xfrm_algo.c | 16 2 files changed, 18 insertions(+) diff

[v3 PATCH 3/8] ipsec: Add IV generator information to xfrm_state

2015-05-27 Thread Herbert Xu
This patch adds IV generator information to xfrm_state. This is currently obtained from our own list of algorithm descriptions. Signed-off-by: Herbert Xu --- include/net/xfrm.h |1 + net/key/af_key.c |1 + net/xfrm/xfrm_user.c | 40 +++- 3

[v3 PATCH 1/8] crypto: testmgr - Switch to new AEAD interface

2015-05-27 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Signed-off-by: Herbert Xu --- crypto/testmgr.c | 87 ++- 1 file changed, 48 insertions(+), 39 deletions(-) diff

[v3 PATCH 0/8] crypto: Convert all AEAD users to new interface

2015-05-27 Thread Herbert Xu
we may in future wish to support different generation schemes for a single algorithm. Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev" in t

Re: [net-next PATCH RFC 0/3] Preserve skb->mark through VTI tunnels

2015-05-27 Thread Herbert Xu
good to me. Thanks for following up on this! -- Email: Herbert Xu 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 "unsubscribe netdev" in the body of a message to majord...@v

Re: [PATCH net-next] tcp: tcp_tso_autosize() minimum is one packet

2015-05-26 Thread Herbert Xu
on a second look, for the case where skb->len > mss. Acked-by: Herbert Xu Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev"

Re: [PATCH net-next] tcp: tcp_tso_autosize() minimum is one packet

2015-05-26 Thread Herbert Xu
On Wed, May 27, 2015 at 09:38:40AM +0800, Herbert Xu wrote: > > Not really. They're not identical. For example, before your > patch a packet greater than MSS with TSO disabled would call > tcp_nagle_test, with your patch it will call tcp_tso_should_defer > instead. > &g

Re: [PATCH net-next] tcp: tcp_tso_autosize() minimum is one packet

2015-05-26 Thread Herbert Xu
t, with your patch it will call tcp_tso_should_defer instead. Maybe this is OK but it is far from obvious. Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev

Re: [PATCH net-next] tcp: tcp_tso_autosize() minimum is one packet

2015-05-26 Thread Herbert Xu
disabled. Now this may or may not trigger the original bug that I was trying to fix but it still feels unsafe. So please convince me that it is totally safe to take the TSO code path with TSO disabled, e.g., when PMTU causes tso_segs to be greater than one. Thanks, -- Email: Her

Re: [PATCH 5/7] esp6: Switch to new AEAD interface

2015-05-26 Thread Herbert Xu
IV generation to user-space. If and when we do that we can easily set a default IV generator. This is all in the patch series that you're responding. So please actually read it rather than making assumptions :) Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP

Re: [v2 PATCH 13/13] crypto: algif_aead - Switch to new AEAD interface

2015-05-26 Thread Herbert Xu
On Tue, May 26, 2015 at 09:57:51AM +0200, Stephan Mueller wrote: > > Ok. Would you look into that one or shall I do that? I'll reenable it immediately after the patch to convert it to the new interface is merged. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~h

Re: [PATCH 5/7] esp6: Switch to new AEAD interface

2015-05-26 Thread Herbert Xu
e old behaviour. Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordo

Re: [PATCH 5/7] esp6: Switch to new AEAD interface

2015-05-26 Thread Herbert Xu
On Tue, May 26, 2015 at 03:38:58PM +0800, Herbert Xu wrote: > On Tue, May 26, 2015 at 09:37:09AM +0200, Stephan Mueller wrote: > > > > - the current IKE implementations use rfc4106(gcm(aes)). They would need to > > use seqniv(rfc4106(gcm(aes))) depending on the kernel versio

Re: [PATCH 5/7] esp6: Switch to new AEAD interface

2015-05-26 Thread Herbert Xu
uration even works > (i.e. no error), but does not produce the correct encryption that is required. You mean through the user-space AEAD interface? That's not a problem because I'm going to disable it for 4.1 :) Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.a

Re: [v2 PATCH 13/13] crypto: algif_aead - Switch to new AEAD interface

2015-05-26 Thread Herbert Xu
one I'm going to disable the AEAD user-space interface in 4.1 so that we have time to fix it properly for 4.2. Cheers, -- Email: Herbert Xu 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 &q

Re: [PATCH 5/7] esp6: Switch to new AEAD interface

2015-05-26 Thread Herbert Xu
On Tue, May 26, 2015 at 08:39:56AM +0200, Stephan Mueller wrote: > > May I also ask where I can find the generated IV when using > rfc4106(gcm(aes))? You need to use the IV generator, seqniv(rfc4106(gcm(aes))) Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~her

Re: [v2 PATCH 13/13] crypto: algif_aead - Switch to new AEAD interface

2015-05-25 Thread Herbert Xu
On Mon, May 25, 2015 at 07:53:41PM +0800, Herbert Xu wrote: > On Mon, May 25, 2015 at 01:50:55PM +0200, Stephan Mueller wrote: > > > > When you have my code local, simply execute libkcapi/test/kcapi -y twice or > > three times. That triggered the crash. > > Aha that&

Re: [v2 PATCH 13/13] crypto: algif_aead - Switch to new AEAD interface

2015-05-25 Thread Herbert Xu
On Mon, May 25, 2015 at 01:50:55PM +0200, Stephan Mueller wrote: > > When you have my code local, simply execute libkcapi/test/kcapi -y twice or > three times. That triggered the crash. Aha that's what I was missing. I'll look into the crash. Thanks, -- Email: Herbert

Re: [v2 PATCH 13/13] crypto: algif_aead - Switch to new AEAD interface

2015-05-25 Thread Herbert Xu
to retest. Thanks, -- Email: Herbert Xu 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 "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo in

Re: [v2 PATCH 13/13] crypto: algif_aead - Switch to new AEAD interface

2015-05-23 Thread Herbert Xu
On Sat, May 23, 2015 at 08:04:19PM +0200, Stephan Mueller wrote: > Am Freitag, 22. Mai 2015, 16:31:04 schrieb Herbert Xu: > > Hi Herbert, > > > This patch makes use of the new AEAD interface which uses a single > > SG list instead of separate lists for the AD and plain t

Re: [v2 PATCH 13/13] crypto: algif_aead - Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
the lookup to use the instance we just registered. */ err = -EAGAIN; -- Email: Herbert Xu 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 "unsubscribe netdev" in the body of

[PATCH 0/2] crypto: Use tmpl->create when registering geniv

2015-05-22 Thread Herbert Xu
On Fri, May 22, 2015 at 11:04:39PM +0200, Stephan Mueller wrote: > Am Freitag, 22. Mai 2015, 22:59:34 schrieb Stephan Mueller: > > Hi Stephan, > > > Am Freitag, 22. Mai 2015, 16:31:04 schrieb Herbert Xu: > > > > Hi Herbert, > > > > > This patch mak

[v2 PATCH 3/13] crypto: echainiv - Use aead_register_instance

2015-05-22 Thread Herbert Xu
. Signed-off-by: Herbert Xu --- crypto/echainiv.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/crypto/echainiv.c b/crypto/echainiv.c index e5a9878..86e92fa 100644 --- a/crypto/echainiv.c +++ b/crypto/echainiv.c @@ -430,26 +430,24

[v2 PATCH 1/13] crypto: aead - Add crypto_aead_alg_ivsize/maxauthsize

2015-05-22 Thread Herbert Xu
AEAD algorithm implementors need to figure out a given algorithm's IV size and maximum authentication size. During the transition this is difficult to do as an algorithm could be new style or old style. This patch creates two helpers to make this easier. Signed-off-by: Herbert Xu --- c

[v2 PATCH 6/13] xfrm: Add IV generator information to xfrm_algo_desc

2015-05-22 Thread Herbert Xu
This patch adds IV generator information for each AEAD and block cipher to xfrm_algo_desc. This will be used to access the new AEAD interface. Signed-off-by: Herbert Xu --- include/net/xfrm.h |2 ++ net/xfrm/xfrm_algo.c | 16 2 files changed, 18 insertions(+) diff

[v2 PATCH 12/13] crypto: tcrypt - Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Signed-off-by: Herbert Xu --- crypto/tcrypt.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c

[v2 PATCH 4/13] crypto: aead - Do not set cra_type for new style instances

2015-05-22 Thread Herbert Xu
The function aead_geniv_alloc currently sets cra_type even for new style instances. This is unnecessary and may hide bugs such as when our caller uses crypto_register_instance instead of the correct aead_register_instance. Signed-off-by: Herbert Xu --- crypto/aead.c |4 +--- 1 file

[v2 PATCH 11/13] mac80211: Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Tested-by: Johannes Berg Signed-off-by: Herbert Xu --- net/mac80211/aes_ccm.c | 30 ++ net/mac80211/aes_gcm.c | 30

[v2 PATCH 8/13] esp4: Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. The IV generation is also now carried out through normal AEAD methods. Signed-off-by: Herbert Xu --- net/ipv4/esp4.c | 197

[v2 PATCH 13/13] crypto: algif_aead - Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Signed-off-by: Herbert Xu --- crypto/algif_aead.c | 61 ++-- 1 file changed, 36 insertions(+), 25 deletions(-) diff

[v2 PATCH 9/13] esp6: Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. The IV generation is also now carried out through normal AEAD methods. Signed-off-by: Herbert Xu --- net/ipv6/esp6.c | 197

[v2 PATCH 5/13] crypto: testmgr - Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Signed-off-by: Herbert Xu --- crypto/testmgr.c | 84 +++ 1 file changed, 48 insertions(+), 36 deletions(-) diff

[v2 PATCH 7/13] ipsec: Add IV generator information to xfrm_state

2015-05-22 Thread Herbert Xu
This patch adds IV generator information to xfrm_state. This is currently obtained from our own list of algorithm descriptions. Signed-off-by: Herbert Xu --- include/net/xfrm.h |1 + net/key/af_key.c |1 + net/xfrm/xfrm_user.c | 40 +++- 3

[v2 PATCH 2/13] crypto: seqiv - Use aead_register_instance

2015-05-22 Thread Herbert Xu
. Signed-off-by: Herbert Xu --- crypto/seqiv.c | 135 + 1 file changed, 79 insertions(+), 56 deletions(-) diff --git a/crypto/seqiv.c b/crypto/seqiv.c index a9bfbda..2680e94 100644 --- a/crypto/seqiv.c +++ b/crypto/seqiv.c @@ -38,6 +38,8

[v2 PATCH 10/13] mac802154: Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Signed-off-by: Herbert Xu --- net/mac802154/llsec.c | 41 ++--- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a

[v2 PATCH 0/13] crypto: Convert all AEAD users to new interface

2015-05-22 Thread Herbert Xu
7;m taking this opportunity to move the IV generation knowledge into IPsec as that's where it belongs since we may in future wish to support different generation schemes for a single algorithm. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gond

Re: [PATCH 7/7] mac80211: Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
On Fri, May 22, 2015 at 10:18:03AM +0200, Johannes Berg wrote: > > Yep, that fixes things. Great I will respin the patches. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from thi

Re: [PATCH 7/7] mac80211: Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
en - GMAC_MIC_LEN); - sg_set_buf(&sg[2], mic, GMAC_MIC_LEN); + sg_set_buf(&sg[2], zero, GMAC_MIC_LEN); + sg_set_buf(&sg[3], mic, GMAC_MIC_LEN); memcpy(iv, nonce, GMAC_NONCE_LEN); memset(iv + GMAC_NONCE_LEN, 0, sizeof(iv) - GMAC_NONCE_LEN); -- Email

Re: [PATCH 7/7] mac80211: Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
encrypt+0x67/0x77 > [ 26.153481] [] invoke_tx_handlers+0xe6/0x1b0 Did this have a code section at the end? Without it it's difficult to pin-point the crash because your compiler produces different output than mine. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~h

Re: [PATCH 5/7] esp6: Switch to new AEAD interface

2015-05-22 Thread Herbert Xu
tion. Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 5/7] esp6: Switch to new AEAD interface

2015-05-21 Thread Herbert Xu
/msg14270.html > Do I understand it correctly that you want to retire the givcrypt API > entirely? Correct. IV generation will be carried as normal AEAD algorithms. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~her

Re: [PATCH 7/7] mac80211: Switch to new AEAD interface

2015-05-21 Thread Herbert Xu
On Thu, May 21, 2015 at 02:17:44PM +0200, Johannes Berg wrote: > > Do you have a branch somewhere with all of that? OK the prerequisite patches are now in cryptodev. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~h

Re: [PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-21 Thread Herbert Xu
On Thu, May 21, 2015 at 08:11:32PM -0700, Cong Wang wrote: > > For me it looks like we do use p->rlist in BH context, but I could easily > miss something here. Because the caller disables BH for us. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ P

Re: [PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-21 Thread Herbert Xu
get active after > the bridge is set up. > > With this patch hash_max and multicast_router attributes can be > changed even if the according bridge (port) is down, just like other > other bridge (port) attributes allow too. > > Signed-off-by: Linus Lüssing Acked-b

Re: [PATCH 0/7] crypto: Convert all AEAD users to new interface

2015-05-21 Thread Herbert Xu
On Thu, May 21, 2015 at 12:03:47PM -0400, David Miller wrote: > > No objections on my end. > > I assume since the dependencies exist in the crypto tree, you'll > want to merge this series there right? Yes that's probably the easiest path. Thanks, -- Email: He

Re: [PATCH 0/7] crypto: Convert all AEAD users to new interface

2015-05-21 Thread Herbert Xu
of course, that's what inspired this :) I just want to do the users outside crypto first before the rest. Cheers, -- Email: Herbert Xu 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 "

Re: [PATCH 7/7] mac80211: Switch to new AEAD interface

2015-05-21 Thread Herbert Xu
On Thu, May 21, 2015 at 01:20:49PM +0200, Johannes Berg wrote: > On Thu, 2015-05-21 at 18:44 +0800, Herbert Xu wrote: > > This patch makes use of the new AEAD interface which uses a single > > SG list instead of separate lists for the AD and plain text. > > Looks fine - wan

[PATCH 3/7] ipsec: Add IV generator information to xfrm_state

2015-05-21 Thread Herbert Xu
This patch adds IV generator information to xfrm_state. This is currently obtained from our own list of algorithm descriptions. Signed-off-by: Herbert Xu --- include/net/xfrm.h |1 + net/key/af_key.c |1 + net/xfrm/xfrm_user.c | 40 +++- 3

[PATCH 4/7] esp4: Switch to new AEAD interface

2015-05-21 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. The IV generation is also now carried out through normal AEAD methods. Signed-off-by: Herbert Xu --- net/ipv4/esp4.c | 197

[PATCH 7/7] mac80211: Switch to new AEAD interface

2015-05-21 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Signed-off-by: Herbert Xu --- net/mac80211/aes_ccm.c | 30 ++ net/mac80211/aes_gcm.c | 30 ++ net

[PATCH 5/7] esp6: Switch to new AEAD interface

2015-05-21 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. The IV generation is also now carried out through normal AEAD methods. Signed-off-by: Herbert Xu --- net/ipv6/esp6.c | 197

[PATCH 1/7] crypto: testmgr - Switch to new AEAD interface

2015-05-21 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Signed-off-by: Herbert Xu --- crypto/testmgr.c | 84 +++ 1 file changed, 48 insertions(+), 36 deletions(-) diff

[PATCH 6/7] mac802154: Switch to new AEAD interface

2015-05-21 Thread Herbert Xu
This patch makes use of the new AEAD interface which uses a single SG list instead of separate lists for the AD and plain text. Signed-off-by: Herbert Xu --- net/mac802154/llsec.c | 41 ++--- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a

[PATCH 2/7] xfrm: Add IV generator information to xfrm_algo_desc

2015-05-21 Thread Herbert Xu
This patch adds IV generator information for each AEAD and block cipher to xfrm_algo_desc. This will be used to access the new AEAD interface. Signed-off-by: Herbert Xu --- include/net/xfrm.h |2 ++ net/xfrm/xfrm_algo.c | 16 2 files changed, 18 insertions(+) diff

[PATCH 0/7] crypto: Convert all AEAD users to new interface

2015-05-21 Thread Herbert Xu
ase do not apply them. Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More maj

Re: [RFC PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-20 Thread Herbert Xu
when we're calling del_timer_sync. del_timer_sync has to be called without the multicast lock so that's why we need another mechanism to prevent the timers from being readded. AFAICS the spots you patched aren't adding timers so they *should* be OK. Cheers, -- Email: Herbert Xu Home

xfrm: Always zero high-order sequence number bits

2015-05-20 Thread Herbert Xu
As we're now always including the high bits of the sequence number in the IV generation process we need to ensure that they don't contain crap. This patch ensures that the high sequence bits are always zeroed so that we don't leak random data into the IV. Signed-off-by: Herbert Xu

Re: rhashtable: Add cap on number of elements in hash table

2015-05-18 Thread Herbert Xu
nly the maximum chain length that grows at logN loglogN. Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev" in the body of a message

Re: [net PATCH] ip_vti/ip6_vti: Clear skb->mark when resetting skb->dev in receive path

2015-05-18 Thread Herbert Xu
lookup. So is it possible to restore the original mark after the lookups? At least that way it is still possible to use the mark before and after the encapsulation. 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 net-next 00/11] netns: don't switch namespace while creating kernel sockets

2015-05-08 Thread Herbert Xu
emporary reference taken by a third party. It doesn't even have to be a socket. We must hide this subtlety from ops implementors since they have no knowledge of our implementation. Expecting them to deal with this is going to result in bugs, and we have already had multiple bugs in

Re: [PATCH net-next 1/2] rhashtable: Simplify iterator code

2015-04-30 Thread Herbert Xu
Thomas Graf wrote: > Remove useless obj variable and goto logic. > > Signed-off-by: Thomas Graf Acked-by: Herbert Xu Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this l

Re: [bisected] ICMP fragmentation needed ignored / PMTU discovery broken since 3.19-rc7

2015-04-27 Thread Herbert Xu
alue. This obsolete rt_pmtu then prevents the new PMTU value from being installed. Fixes: 3cdaa5be9e81 ("ipv4: Don't increase PMTU with Datagram Too Big message") Reported-by: Gerd v. Egidy Signed-off-by: Herbert Xu diff --git a/net/ipv4/route.c b/net/ipv4/route.c index a78540f..bff6

Re: rhashtable: Add cap on number of elements in hash table

2015-04-24 Thread Herbert Xu
it. In that case I'm OK with Johannes's original patch. Cheers, -- Email: Herbert Xu 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 "unsubscribe netdev" in the body of a

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