Re: [PATCH net] bpf: fix verifier memory corruption

2015-04-15 Thread Hannes Frederic Sowa
On Wed, Apr 15, 2015, at 18:07, Alexei Starovoitov wrote: On 4/15/15 8:59 AM, Hannes Frederic Sowa wrote: On Di, 2015-04-14 at 15:57 -0700, Alexei Starovoitov wrote: Due to missing bounds check the DAG pass of the BPF verifier can corrupt the memory which can cause random crashes during

Re: [PATCH net] bpf: fix verifier memory corruption

2015-04-15 Thread Hannes Frederic Sowa
On Di, 2015-04-14 at 15:57 -0700, Alexei Starovoitov wrote: Due to missing bounds check the DAG pass of the BPF verifier can corrupt the memory which can cause random crashes during program loading: [8.449451] BUG: unable to handle kernel paging request at [8.451293] IP:

Re: [PATCH iproute2 -next] tc: built-in eBPF exec proxy

2015-04-15 Thread Hannes Frederic Sowa
On Wed, Apr 15, 2015, at 16:52, Daniel Borkmann wrote: This work follows upon commit 6256f8c9e45f (tc, bpf: finalize eBPF support for cls and act front-end) and takes up the idea proposed by Hannes Frederic Sowa to spawn a shell (or any other command) that holds generated eBPF map file

Re: [PATCH -next 0/3] net: cap size to original frag size when refragmenting

2015-04-16 Thread Hannes Frederic Sowa
On Thu, Apr 16, 2015, at 07:29, Herbert Xu wrote: On Thu, Apr 16, 2015 at 06:24:00AM +0100, Patrick McHardy wrote: Netfilter may change the contents of the packet, even change its size. It is *really* hard to do this while keeping the original fragments intact. Perhaps we should

Re: [PATCH -next 0/3] net: cap size to original frag size when refragmenting

2015-04-16 Thread Hannes Frederic Sowa
Hi David, On Thu, Apr 16, 2015, at 17:43, David Miller wrote: From: Hannes Frederic Sowa han...@stressinduktion.org Date: Thu, 16 Apr 2015 14:11:42 +0200 On Thu, Apr 16, 2015, at 07:29, Herbert Xu wrote: On Thu, Apr 16, 2015 at 06:24:00AM +0100, Patrick McHardy wrote: Netfilter may

Re: [PATCH -next 0/3] net: cap size to original frag size when refragmenting

2015-04-16 Thread Hannes Frederic Sowa
On Thu, Apr 16, 2015, at 22:56, Patrick McHardy wrote: On 17.04, Herbert Xu wrote: On Thu, Apr 16, 2015 at 06:13:25PM +0200, Hannes Frederic Sowa wrote: So currently we have one fast path, that is: we are not fragmented, we get out non-fragmented, none of this code is ever touched

[PATCH v2 net-next 3/4] net: make skb_splice_bits more configureable

2015-05-21 Thread Hannes Frederic Sowa
Prepare skb_splice_bits to be able to deal with AF_UNIX sockets. AF_UNIX sockets don't use lock_sock/release_sock and thus we have to use a callback to make the locking and unlocking configureable. Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org Acked-by: Eric Dumazet eduma

[PATCH net-next 4/4] net: af_unix: implement splice for stream af_unix sockets

2015-05-20 Thread Hannes Frederic Sowa
unix_stream_recvmsg is refactored to unix_stream_read_generic in this patch and enhanced to deal with pipe splicing. The refactoring is inneglible, we mostly have to deal with a non-existing struct msghdr argument. Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org --- net/unix

[PATCH net-next 2/4] net: af_unix: implement stream sendpage support

2015-05-20 Thread Hannes Frederic Sowa
of the sk_receive_queue. Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org --- net/unix/af_unix.c | 105 - 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 941b3d2..9bb880a

[PATCH net-next 1/4] net: skbuff: add skb_append_pagefrags and use it

2015-05-20 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org --- include/linux/skbuff.h | 3 +++ net/core/skbuff.c | 18 ++ net/ipv4/ip_output.c | 8 ++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h

[PATCH net-next 0/4] net: af_unix: zerocopy stream bits

2015-05-20 Thread Hannes Frederic Sowa
This series implements zerocopy support for AF_UNIX SOCK_STREAM sockets. Hannes Frederic Sowa (4): net: skbuff: add skb_append_pagefrags and use it net: af_unix: implement stream sendpage support net: make skb_splice_bits more configureable net: af_unix: implement splice for stream

[PATCH net-next 3/4] net: make skb_splice_bits more configureable

2015-05-20 Thread Hannes Frederic Sowa
Prepare skb_splice_bits to be able to deal with AF_UNIX sockets. AF_UNIX sockets don't use lock_sock/release_sock and thus we have to use a callback to make the locking and unlocking configureable. Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org --- include/linux/skbuff.h | 11

Re: [PATCH net-next] Better handling of transition to NUD_PROBE state

2015-05-20 Thread Hannes Frederic Sowa
-By: Lorenzo Colitti lore...@google.com I agree with Lorenzo, these changes look fine. Acked-by: Hannes Frederic Sowa han...@stressinduktion.org -- 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

Re: [PATCH net-next 4/4] net: af_unix: implement splice for stream af_unix sockets

2015-05-20 Thread Hannes Frederic Sowa
Hi Cong, On Wed, May 20, 2015, at 22:59, Cong Wang wrote: On Wed, May 20, 2015 at 8:35 AM, Hannes Frederic Sowa han...@stressinduktion.org wrote: -static int unix_stream_recvmsg(struct socket *sock, struct msghdr *msg, - size_t size, int flags) +struct

Re: [PATCH -next] ipv6: reject locally assigned nexthop addresses

2015-05-20 Thread Hannes Frederic Sowa
hopefully be public soon. :/ Signed-off-by: Florian Westphal f...@strlen.de Acked-by: Hannes Frederic Sowa han...@stressinduktion.org Thanks! -- 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

Re: [PATCH net-next 4/4] net: af_unix: implement splice for stream af_unix sockets

2015-05-20 Thread Hannes Frederic Sowa
On Thu, May 21, 2015, at 01:50, Eric Dumazet wrote: On Wed, 2015-05-20 at 17:35 +0200, Hannes Frederic Sowa wrote: + +static int unix_stream_splice_actor(struct sk_buff *skb, + int skip, int chunk, + struct

Re: [PATCH net-next 2/4] net: af_unix: implement stream sendpage support

2015-05-20 Thread Hannes Frederic Sowa
On Thu, May 21, 2015, at 01:21, Eric Dumazet wrote: On Wed, 2015-05-20 at 17:35 +0200, Hannes Frederic Sowa wrote: This patch implements sendpage support for AF_UNIX SOCK_STREAM + + if (newskb) + skb_queue_tail(other-sk_receive_queue, newskb); Are you sure we need

[PATCH v2 net-next 4/4] net: af_unix: implement splice for stream af_unix sockets

2015-05-21 Thread Hannes Frederic Sowa
unix_stream_recvmsg is refactored to unix_stream_read_generic in this patch and enhanced to deal with pipe splicing. The refactoring is inneglible, we mostly have to deal with a non-existing struct msghdr argument. Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org --- v2: * checked

[PATCH v2 net-next 1/4] net: skbuff: add skb_append_pagefrags and use it

2015-05-21 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org --- v2: * remove now unused variable i in ip_append_page (thanks, Cong!) * switched to EXPORT_SYMBOL_GPL for skb_append_pagefrags include/linux/skbuff.h | 3 +++ net/core/skbuff.c | 18 ++ net/ipv4/ip_output.c

[PATCH v2 net-next 2/4] net: af_unix: implement stream sendpage support

2015-05-21 Thread Hannes Frederic Sowa
UNIXCB.consumed or freeing the skb at the socket receive tail. Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org --- v2: * replaced skb_queue_tail with the unlocked version, __skb_queue_tail (thanks, Eric!) * folded variable declaration and initialization (thanks, Cong!) net/unix

[PATCH v2 net-next 0/4] net: af_unix: zerocopy stream bits

2015-05-21 Thread Hannes Frederic Sowa
This series implements zerocopy support for AF_UNIX SOCK_STREAM sockets. Changelog in the specific patches. Thanks to all the reviewers! Hannes Frederic Sowa (4): net: skbuff: add skb_append_pagefrags and use it net: af_unix: implement stream sendpage support net: make skb_splice_bits more

Re: [PATCH net-next] net: change fib behavior based on interface link status

2015-06-03 Thread Hannes Frederic Sowa
On Wed, Jun 3, 2015, at 20:27, Andy Gospodarek wrote: On Wed, Jun 03, 2015 at 11:15:55AM -0700, Scott Feldman wrote: On Tue, Jun 2, 2015 at 8:07 PM, Andy Gospodarek go...@cumulusnetworks.com wrote: This feature is only enabled with the new sysctl set (default is off):

Re: [RFC net-next 3/3] rcv path changes for vrf traffic

2015-06-08 Thread Hannes Frederic Sowa
On Mo, 2015-06-08 at 21:58 +0200, Hannes Frederic Sowa wrote: Hi Shrijeet, On Mo, 2015-06-08 at 11:35 -0700, Shrijeet Mukherjee wrote: From: Shrijeet Mukherjee s...@cumulusnetworks.com Incoming frames for IP protocol stacks need the IIF to be changed from the actual interface

Re: [RFC net-next 3/3] rcv path changes for vrf traffic

2015-06-08 Thread Hannes Frederic Sowa
of that interface. This patch covers only the forwarding path. Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org --- include/linux/inetdevice.h| 19 --- include/net/flow.h| 2 ++ include/uapi/linux/fib_rules.h| 1 + include/uapi/linux/if_addr.h

Re: [RFC net-next 0/3] Proposal for VRF-lite

2015-06-08 Thread Hannes Frederic Sowa
On Mon, Jun 8, 2015, at 21:13, David Ahern wrote: On 6/8/15 12:35 PM, Shrijeet Mukherjee wrote: 5. Debugging is built-in as tcpdump and counters on the VRF device works as is. Is the intent that something like this tcpdump -i vrf0 can be used to see vrf traffic?

Re: [RFC net-next 3/3] rcv path changes for vrf traffic

2015-06-08 Thread Hannes Frederic Sowa
On Mon, Jun 8, 2015, at 22:22, Shrijeet Mukherjee wrote: On Mon, Jun 8, 2015 at 12:58 PM, Hannes Frederic Sowa han...@stressinduktion.org wrote: Hi Shrijeet, From an architectural level I think the output path looks good. For the input path I would also to propose my (I think) more

Re: [RFC net-next 3/3] rcv path changes for vrf traffic

2015-06-08 Thread Hannes Frederic Sowa
On Tue, Jun 9, 2015, at 00:05, David Miller wrote: From: Hannes Frederic Sowa han...@stressinduktion.org Date: Mon, 08 Jun 2015 21:58:37 +0200 +static inline u32 ipv4_idev_rt_table(const struct net_device *dev) +{ + u32 table_id; + + rcu_read_lock(); + table_id

Re: [RFC net-next 2/3] VRF driver and needed infrastructure

2015-06-08 Thread Hannes Frederic Sowa
Hi, On Mo, 2015-06-08 at 11:35 -0700, Shrijeet Mukherjee wrote: From: Shrijeet Mukherjee s...@cumulusnetworks.com This driver borrows heavily from IPvlan and teaming drivers. Routing domains (VRF-lite) are created by instantiating a device and enslaving all routed interfaces that

Re: [RFC net-next 3/3] rcv path changes for vrf traffic

2015-06-08 Thread Hannes Frederic Sowa
Hi, On Tue, Jun 9, 2015, at 03:03, David Ahern wrote: On 6/8/15 1:58 PM, Hannes Frederic Sowa wrote: For rx layer I want to also propose my try: [PATCH net-next RFC] net: ipv4: arp: strong end system model semantics by per-interface local table override I applied only the first 2

Re: [RFC net-next 3/3] rcv path changes for vrf traffic

2015-06-08 Thread Hannes Frederic Sowa
On Tue, Jun 9, 2015, at 00:44, Shrijeet Mukherjee wrote: On Mon, Jun 8, 2015 at 1:33 PM, Hannes Frederic Sowa han...@stressinduktion.org wrote: On Mon, Jun 8, 2015, at 22:22, Shrijeet Mukherjee wrote: On Mon, Jun 8, 2015 at 12:58 PM, Hannes Frederic Sowa han...@stressinduktion.org wrote

Re: [PATCH v3 1/2] sctp: rcu-ify addr_waitq

2015-06-08 Thread Hannes Frederic Sowa
On Mon, Jun 8, 2015, at 16:46, Hannes Frederic Sowa wrote: Hi Marcelo, a few hints on rcuification, sorry I reviewed the code so late: On Fri, Jun 5, 2015, at 19:08, mleit...@redhat.com wrote: From: Marcelo Ricardo Leitner marcelo.leit...@gmail.com That's needed for the next patch

Re: [PATCH v3 1/2] sctp: rcu-ify addr_waitq

2015-06-08 Thread Hannes Frederic Sowa
On Mo, 2015-06-08 at 11:19 -0400, Neil Horman wrote: On Mon, Jun 08, 2015 at 04:59:18PM +0200, Hannes Frederic Sowa wrote: On Mon, Jun 8, 2015, at 16:46, Hannes Frederic Sowa wrote: Hi Marcelo, a few hints on rcuification, sorry I reviewed the code so late: On Fri, Jun 5, 2015

Re: [PATCH net] ipv6: fix possible use after free of dev stats

2015-06-08 Thread Hannes Frederic Sowa
...@brocade.com Acked-by: Hannes Frederic Sowa han...@stressinduktion.org Thanks! -- 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 v3 1/2] sctp: rcu-ify addr_waitq

2015-06-08 Thread Hannes Frederic Sowa
Hi Marcelo, a few hints on rcuification, sorry I reviewed the code so late: On Fri, Jun 5, 2015, at 19:08, mleit...@redhat.com wrote: From: Marcelo Ricardo Leitner marcelo.leit...@gmail.com That's needed for the next patch, so we break the lock inversion between netns_sctp-addr_wq_lock and

Re: [PATCH net-next] net: change fib behavior based on interface link status

2015-06-03 Thread Hannes Frederic Sowa
On Wed, Jun 3, 2015, at 05:07, Andy Gospodarek wrote: This patch adds the ability to have the Linux kernel track whether or not a particular route should be used based on the link-status of the interface associated with the next-hop. Before this patch any link-failure on an interface that

Re: [PATCH net-next] net: change fib behavior based on interface link status

2015-06-03 Thread Hannes Frederic Sowa
On Mi, 2015-06-03 at 10:21 -0400, Neil Horman wrote: On Wed, Jun 03, 2015 at 04:13:08PM +0200, Hannes Frederic Sowa wrote: On Mi, 2015-06-03 at 09:53 -0400, Neil Horman wrote: On Tue, Jun 02, 2015 at 11:07:19PM -0400, Andy Gospodarek wrote: This patch adds the ability to have the Linux

Re: [PATCH net-next] net: change fib behavior based on interface link status

2015-06-03 Thread Hannes Frederic Sowa
On Mi, 2015-06-03 at 09:53 -0400, Neil Horman wrote: On Tue, Jun 02, 2015 at 11:07:19PM -0400, Andy Gospodarek wrote: This patch adds the ability to have the Linux kernel track whether or not a particular route should be used based on the link-status of the interface associated with the

Re: [PATCH net-next] net: change fib behavior based on interface link status

2015-06-03 Thread Hannes Frederic Sowa
On Di, 2015-06-02 at 23:07 -0400, Andy Gospodarek wrote: diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 6f5f71f..5bd953c 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2986,6 +2986,7 @@ int dev_forward_skb(struct net_device *dev, struct

Re: How do I avoid recvmsg races with IP_RECVERR?

2015-06-02 Thread Hannes Frederic Sowa
On Tue, Jun 2, 2015, at 21:40, Andy Lutomirski wrote: As far as I can tell, enabling IP_RECVERR causes the presence of a queued error to cause recvmsg, etc to return an error (once). It's worse, though: a new error can be queued asynchronously at any time, this setting sk_err to a nonzero

Re: [PATCH net-next] net: change fib behavior based on interface link status

2015-06-03 Thread Hannes Frederic Sowa
On Mi, 2015-06-03 at 11:02 -0400, Neil Horman wrote: On Wed, Jun 03, 2015 at 10:46:22AM -0400, Andy Gospodarek wrote: On Wed, Jun 03, 2015 at 10:21:31AM -0400, Neil Horman wrote: On Wed, Jun 03, 2015 at 04:13:08PM +0200, Hannes Frederic Sowa wrote: On Mi, 2015-06-03 at 09:53 -0400, Neil

Re: How do I avoid recvmsg races with IP_RECVERR?

2015-06-02 Thread Hannes Frederic Sowa
On Wed, Jun 3, 2015, at 02:03, Andy Lutomirski wrote: On Tue, Jun 2, 2015 at 2:50 PM, Hannes Frederic Sowa han...@stressinduktion.org wrote: My proposal would be to make the error conversion lazy: Keeping duplicate data is not a good idea in general: So we shouldn't use sk-sk_err

Re: [net-next v2] ipv4: inet_bind: check the addr_len first

2015-06-02 Thread Hannes Frederic Sowa
On Tue, Jun 2, 2015, at 17:13, Denis Kirjanov wrote: On 6/2/15, Hannes Frederic Sowa han...@stressinduktion.org wrote: Hello, On Tue, Jun 2, 2015, at 14:21, Denis Kirjanov wrote: Perform the address length check first, before calling the proto specific bind() function Can you give

Re: How do I avoid recvmsg races with IP_RECVERR?

2015-06-02 Thread Hannes Frederic Sowa
On Tue, Jun 2, 2015, at 23:33, Andy Lutomirski wrote: On Tue, Jun 2, 2015 at 2:17 PM, Hannes Frederic Sowa han...@stressinduktion.org wrote: On Tue, Jun 2, 2015, at 21:40, Andy Lutomirski wrote: As far as I can tell, enabling IP_RECVERR causes the presence of a queued error to cause

Re: How do I avoid recvmsg races with IP_RECVERR?

2015-06-02 Thread Hannes Frederic Sowa
On Tue, Jun 2, 2015, at 23:42, Hannes Frederic Sowa wrote: On Tue, Jun 2, 2015, at 23:33, Andy Lutomirski wrote: On Tue, Jun 2, 2015 at 2:17 PM, Hannes Frederic Sowa han...@stressinduktion.org wrote: On Tue, Jun 2, 2015, at 21:40, Andy Lutomirski wrote: [...] I do this already

Re: [RFC net-next 3/6] net: Special routing hook

2015-06-04 Thread Hannes Frederic Sowa
Hi, On Wed, Jun 3, 2015, at 21:58, Tom Herbert wrote: A hack to provide an ultra light weight hook to do translations. Would it be possible to use ip6_ila_input hooks in dst_entry to do those translations? It really seems like a hack ;) Bye, Hannes -- To unsubscribe from this list: send the

Re: [RFC net-next 2/6] net: Identfier Locator Addressing module

2015-06-04 Thread Hannes Frederic Sowa
On Wed, Jun 3, 2015, at 21:58, Tom Herbert wrote: +static u32 hashrnd __read_mostly; +static __always_inline void ila_init_secret(void) +{ + net_get_random_once(hashrnd, sizeof(hashrnd)); +} + +static inline unsigned int ila_hash(u64 id) +{ + u32 *words = (u32 *)id; + +

Re: [RFC net-next 0/3] Proposal for VRF-lite

2015-06-09 Thread Hannes Frederic Sowa
On Tue, Jun 9, 2015, at 14:30, Nicolas Dichtel wrote: Le 09/06/2015 12:15, Thomas Graf a écrit : On 06/08/15 at 11:35am, Shrijeet Mukherjee wrote: [...] model with some performance paths that need optimization. (Specifically the output route selector that Roopa, Robert, Thomas and EricB

Re: [PATCH ipv6 0/1] ipv6: addrconf: routes are not deleted if last ipv6 address is removed

2015-06-18 Thread Hannes Frederic Sowa
On Thu, 2015-06-18 at 14:59 +0530, Mazhar Rana wrote: Hi, After 'commit 876fd05ddbae03166e7037fca957b55bb3be6594 (ipv6: don't disable interface if last ipv6 address is removed)' it is not clearing ipv6 interface configurations(routes, neighbours, etc) when last ipv6 address of interface is

Re: [PATCH net] Revert tcp: switch tcp_fastopen key generation to net_get_random_once

2015-06-18 Thread Hannes Frederic Sowa
Hello Christoph, On Wed, 2015-06-17 at 17:28 -0700, Christoph Paasch wrote: This reverts commit 222e83d2e0aecb6a5e8d42b1a8d51332a1eba960. tcp_fastopen_reset_cipher really cannot be called from interrupt context. It allocates the tcp_fastopen_context with GFP_KERNEL and calls

Re: [net-next v2] ipv4: inet_bind: check the addr_len first

2015-06-02 Thread Hannes Frederic Sowa
Hello, On Tue, Jun 2, 2015, at 14:21, Denis Kirjanov wrote: Perform the address length check first, before calling the proto specific bind() function Can you give more detail why you did this change and what bug it fixes? Thanks, Hannes -- To unsubscribe from this list: send the line

Re: [PATCH -next, V3 0/2] net: force refragmentation for DF reassembed skbs

2015-05-22 Thread Hannes Frederic Sowa
On Fri, May 22, 2015, at 21:03, David Miller wrote: From: Florian Westphal f...@strlen.de Date: Fri, 22 May 2015 16:32:49 +0200 IP (ttl 64, id 12345, offset 0, flags [+, DF], proto UDP (17), length 1204) 192.168.7.1.42 10.23.42.2.42: UDP, length 1400 IP (ttl 64, id 12345, offset

Re: [PATCH 2/3] ipvlan: grab rcu_read_lock on xmit path

2015-05-21 Thread Hannes Frederic Sowa
On Thu, May 21, 2015, at 11:51, Konstantin Khlebnikov wrote: On 20.05.2015 02:33, Mahesh Bandewar wrote: On Thu, May 14, 2015 at 6:56 AM, Konstantin Khlebnikov khlebni...@yandex-team.ru wrote: ipvlan_start_xmit() is called with rcu_read_lock_bh() while its internal structures requre

Re: [PATCH 3/3] ipvlan: set dev_id for l2 ports to generate unique IPv6 addresses

2015-05-21 Thread Hannes Frederic Sowa
On Thu, May 21, 2015, at 13:38, Konstantin Khlebnikov wrote: On 20.05.2015 02:59, Mahesh Bandewar wrote: On Thu, May 14, 2015 at 6:56 AM, Konstantin Khlebnikov khlebni...@yandex-team.ru wrote: All ipvlan ports use one MAC address, this way ipv6 RA tries to assign one ipv6 address to all

[PATCH v3 net-next 4/4] net: af_unix: implement splice for stream af_unix sockets

2015-05-21 Thread Hannes Frederic Sowa
unix_stream_recvmsg is refactored to unix_stream_read_generic in this patch and enhanced to deal with pipe splicing. The refactoring is inneglible, we mostly have to deal with a non-existing struct msghdr argument. Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org --- v2: * checked

[PATCH v3 net-next 1/4] net: skbuff: add skb_append_pagefrags and use it

2015-05-21 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org Acked-by: Eric Dumazet eduma...@google.com --- v2: * remove now unused variable i in ip_append_page (thanks, Cong!) * switched to EXPORT_SYMBOL_GPL for skb_append_pagefrags v3: * unchanged include/linux/skbuff.h | 3 +++ net/core

[PATCH v3 net-next 2/4] net: af_unix: implement stream sendpage support

2015-05-21 Thread Hannes Frederic Sowa
UNIXCB.consumed or freeing the skb at the socket receive tail. Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org Acked-by: Eric Dumazet eduma...@google.com --- v2: * replaced skb_queue_tail with the unlocked version, __skb_queue_tail (thanks, Eric!) * folded variable declaration

[PATCH v3 net-next 0/4] net: af_unix: zerocopy stream bits

2015-05-21 Thread Hannes Frederic Sowa
This series implements zerocopy support for AF_UNIX SOCK_STREAM sockets. Changelog in the specific patches. Thanks to all the reviewers! Hannes Frederic Sowa (4): net: skbuff: add skb_append_pagefrags and use it net: af_unix: implement stream sendpage support net: make skb_splice_bits more

Re: [PATCH v2 net-next 4/4] net: af_unix: implement splice for stream af_unix sockets

2015-05-21 Thread Hannes Frederic Sowa
On Thu, May 21, 2015, at 16:23, Eric Dumazet wrote: On Thu, 2015-05-21 at 11:39 +0200, Hannes Frederic Sowa wrote: unix_stream_recvmsg is refactored to unix_stream_read_generic in this patch and enhanced to deal with pipe splicing. The refactoring is inneglible, we mostly have to deal

[PATCH v3 net-next 3/4] net: make skb_splice_bits more configureable

2015-05-21 Thread Hannes Frederic Sowa
Prepare skb_splice_bits to be able to deal with AF_UNIX sockets. AF_UNIX sockets don't use lock_sock/release_sock and thus we have to use a callback to make the locking and unlocking configureable. Signed-off-by: Hannes Frederic Sowa han...@stressinduktion.org Acked-by: Eric Dumazet eduma

Re: net/unix: sk_socket can disappear when state is unlocked

2015-05-22 Thread Hannes Frederic Sowa
On Do, 2015-05-21 at 09:25 -0700, Mark Salyzyn wrote: got a rare NULL pointer dereference in clear_bit Signed-off-by: Mark Salyzyn saly...@android.com --- net/unix/af_unix.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index

Re: [PATCH -next 2/2] ip_fragment: don't forward defragmented DF packet

2015-05-22 Thread Hannes Frederic Sowa
IPCB flag to force refragmentation even if skb fits outdev mtu. We will also set DF bit on each fragment in this case. Joint work with Hannes Frederic Sowa. Reported-by: Jesse Gross je...@nicira.com Signed-off-by: Florian Westphal f...@strlen.de And also: Acked-by: Hannes Frederic Sowa

Re: [PATCH -next 1/2] net: ipv4: avoid repeated calls to ip_skb_dst_mtu helper

2015-05-22 Thread Hannes Frederic Sowa
Westphal f...@strlen.de Acked-by: Hannes Frederic Sowa han...@stressinduktion.org This also does reduce some dst_mtu === dst-ops-mtu() indirect calls, maybe also giving a tiny speed-up. :) Bye, Hannes -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message

Re: net/unix: sk_socket can disappear when state is unlocked

2015-05-22 Thread Hannes Frederic Sowa
On Fr, 2015-05-22 at 07:51 -0700, Mark Salyzyn wrote: On 05/22/2015 02:50 AM, Hannes Frederic Sowa wrote: On Do, 2015-05-21 at 09:25 -0700, Mark Salyzyn wrote: got a rare NULL pointer dereference in clear_bit Signed-off-by: Mark Salyzyn saly...@android.com --- net/unix/af_unix.c | 5

Re: net/unix: sk_socket can disappear when state is unlocked

2015-05-22 Thread Hannes Frederic Sowa
On Fri, May 22, 2015, at 18:24, Mark Salyzyn wrote: On 05/22/2015 08:35 AM, Hannes Frederic Sowa wrote: I still wonder if we need to actually recheck the condition and not simply break out of unix_stream_data_wait: We return to the unix_stream_recvmsg loop and recheck

Re: [PATCH net-next v5 00/11] ipv6: Only create RTF_CACHE route after encountering pmtu exception

2015-05-26 Thread Hannes Frederic Sowa
we see a pmtu exception. Looks great, nice work. Series applied to net-next, thanks! I also went over the changes to the last version and such, albeit a bit late: Reviewed-by: Hannes Frederic Sowa han...@stressinduktion.org Thanks! -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v3] net/unix: sk_socket can disappear when state is unlocked

2015-05-26 Thread Hannes Frederic Sowa
Hi, On Tue, May 26, 2015, at 17:22, Mark Salyzyn wrote: got a rare NULL pointer dereference in clear_bit Signed-off-by: Mark Salyzyn saly...@android.com IMHO, this is the right approach, I didn't came up with something easier, thanks! Acked-by: Hannes Frederic Sowa han

Re: [PATCH v2] add stealth mode

2015-07-07 Thread Hannes Frederic Sowa
On Mon, Jul 6, 2015, at 21:44, Matteo Croce wrote: 2015-07-06 12:49 GMT+02:00 valdis.kletni...@vt.edu: On Thu, 02 Jul 2015 10:56:01 +0200, Matteo Croce said: Add option to disable any reply not related to a listening socket, like RST/ACK for TCP and ICMP Port-Unreachable for UDP. Also

Re: [PATCH net-next v4] af_mpls: fix undefined reference to ip6_route_output

2015-07-28 Thread Hannes Frederic Sowa
Hi roopa, On Tue, Jul 28, 2015, at 21:28, roopa wrote: On 7/28/15, 6:04 AM, Hannes Frederic Sowa wrote: Can't you simply use ipv6_stub_impl.ipv6_dst_lookup with sk=NULL to do that and don't have a run-time dependency on IPv6 at all (for the cost of a function pointer

Re: [PATCH net-next 14/16] net: Add sk_bind_dev_if to task_struct

2015-07-28 Thread Hannes Frederic Sowa
On Tue, 2015-07-28 at 08:54 -0500, Eric W. Biederman wrote: Hannes Frederic Sowa han...@stressinduktion.org writes: Hello Eric, On Mon, 2015-07-27 at 15:33 -0500, Eric W. Biederman wrote: David Ahern d...@cumulusnetworks.com writes: Allow tasks to have a default device index

Re: [PATCH net-next v5 0/2] af_mpls: fix undefined reference to ip6_route_output with CONFIG_IPV6=n

2015-07-30 Thread Hannes Frederic Sowa
On Thu, 2015-07-30 at 06:22 -0700, roopa wrote: On 7/29/15, 10:42 PM, David Miller wrote: From: Roopa Prabhu ro...@cumulusnetworks.com Date: Tue, 28 Jul 2015 15:27:39 -0700 v4 - v5: Use ipv6_stub_impl.ipv6_dst_lookup as suggested by Hannes I think this might not work. The

Re: [PATCH net-next 1/9] openvswitch: Scrub packet in ovs_vport_receive()

2015-07-31 Thread Hannes Frederic Sowa
On Thu, 2015-07-30 at 11:12 -0700, Joe Stringer wrote: Signed-off-by: Joe Stringer joestrin...@nicira.com --- net/openvswitch/vport.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c index d14f594..baa018f 100644 ---

Re: [PATCH net-next 5/9] openvswitch: Add conntrack action

2015-07-31 Thread Hannes Frederic Sowa
Hi, On Thu, 2015-07-30 at 11:12 -0700, Joe Stringer wrote: diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index e50678d..4a62ed4 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -22,6 +22,7 @@ #include linux/in.h #include linux/ip.h #include

Re: [PATCH net-next 5/9] openvswitch: Add conntrack action

2015-07-31 Thread Hannes Frederic Sowa
On Thu, 2015-07-30 at 11:12 -0700, Joe Stringer wrote: +static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port, + struct sw_flow_key *key) { struct vport *vport = ovs_vport_rcu(dp, out_port); - if (likely(vport)) -

Re: [PATCH net-next 14/16] net: Add sk_bind_dev_if to task_struct

2015-07-28 Thread Hannes Frederic Sowa
Hello Eric, On Mon, 2015-07-27 at 15:33 -0500, Eric W. Biederman wrote: David Ahern d...@cumulusnetworks.com writes: Allow tasks to have a default device index for binding sockets. If set the value is passed to all AF_INET/AF_INET6 sockets when they are created. The task setting

Re: [PATCH net-next v4] af_mpls: fix undefined reference to ip6_route_output

2015-07-28 Thread Hannes Frederic Sowa
On Mon, 2015-07-27 at 23:40 -0700, Roopa Prabhu wrote: From: Roopa Prabhu ro...@cumulusnetworks.com Undefined reference to ip6_route_output and ip_route_output was reported with CONFIG_INET=n and CONFIG_IPV6=n. This patch adds new CONFIG_MPLS_NEXTHOP_DEVLOOKUP to lookup nexthop device if

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-07 Thread Hannes Frederic Sowa
Hello, Alexander Duyck alexander.h.du...@redhat.com writes: On 08/07/2015 01:23 AM, Zang MingJie wrote: IMO, the routing decision is determined, given a specific routing table and local network the result MUST be determined, independence of how/what order the routing entry is added. Now

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-10 Thread Hannes Frederic Sowa
consider this a kernel bug. On Sat, Aug 8, 2015, 1:00 AM Hannes Frederic Sowa han...@stressinduktion.org wrote: If we could rewind time, we could make local nexthops -EINVAL. I don't think this is the proper solution. As almost all network OS considers the routing table recursive, and it's next hop

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-10 Thread Hannes Frederic Sowa
Hello, Zang MingJie zealot0...@gmail.com writes: Here comes several options: 1. reject local next hop w/ EINVAL 2. delete route when local next hop removed Will also cause some people to complain. 3. transition between RT_SCOPE_HOST amd RT_SCOPE_LINK I don't understand the scope

Re: [PATCH net] ipv6: no CHECKSUM_PARTIAL on skbs with extension headers and recalc checksum during fragmentation

2015-10-24 Thread Hannes Frederic Sowa
Hi Tom, On Sat, Oct 24, 2015, at 18:46, Tom Herbert wrote: > On Sat, Oct 24, 2015 at 12:28 PM, Hannes Frederic Sowa > <han...@stressinduktion.org> wrote: > > Hi Tom, > > > > On Sat, Oct 24, 2015, at 18:21, Tom Herbert wrote: > >> On Fri, Oct 23, 2015 at

Re: [PATCH net] ipv6: no CHECKSUM_PARTIAL on skbs with extension headers and recalc checksum during fragmentation

2015-10-24 Thread Hannes Frederic Sowa
Hi Tom, On Sat, Oct 24, 2015, at 18:21, Tom Herbert wrote: > On Fri, Oct 23, 2015 at 9:13 AM, Hannes Frederic Sowa > <han...@stressinduktion.org> wrote: > > CHECKSUM_PARTIAL should only be used on plain vanilla IPv6 + UDP packets > > in ip6_append_data. Some driver

Re: [PATCH net] ipv6: no CHECKSUM_PARTIAL on skbs with extension headers and recalc checksum during fragmentation

2015-10-24 Thread Hannes Frederic Sowa
Hi, On Sat, Oct 24, 2015, at 00:48, Eric Dumazet wrote: > On Fri, 2015-10-23 at 15:13 +0200, Hannes Frederic Sowa wrote: > > CHECKSUM_PARTIAL should only be used on plain vanilla IPv6 + UDP packets > > in ip6_append_data. Some drivers don't correctly handle extension headers,

Re: [PATCH net] net: try harder to not reuse ifindex when moving interfaces

2015-10-22 Thread Hannes Frederic Sowa
Hi Thomas, On Thu, Oct 22, 2015, at 18:45, Thomas Graf wrote: > On 10/22/15 at 05:00pm, Jiri Benc wrote: > > On Thu, 22 Oct 2015 16:52:13 +0200, Nicolas Dichtel wrote: > > > With the proposed scenario: > > > 1. create netns 'new_netns' > > > 2. in root netns, move the interface with ifindex 2 to

[PATCH net] ipv6: no CHECKSUM_PARTIAL on skbs with extension headers and recalc checksum during fragmentation

2015-10-23 Thread Hannes Frederic Sowa
; Cc: Benjamin Coddington <bcodd...@redhat.com> Signed-off-by: Hannes Frederic Sowa <han...@stressinduktion.org> --- net/ipv6/ip6_output.c | 78 --- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/net/ipv6/ip6_output.c b/

Re: [PATCH net] net: try harder to not reuse ifindex when moving interfaces

2015-10-21 Thread Hannes Frederic Sowa
Hello, On Wed, Oct 21, 2015, at 17:56, David Miller wrote: > From: Jiri Benc > Date: Wed, 21 Oct 2015 17:25:02 +0200 > > > On Wed, 21 Oct 2015 08:32:14 -0700 (PDT), David Miller wrote: > >> As you say the apps are broken, so file a bug and have them fixed. > >> > >> The

Re: [PATCH net] ipv6: no CHECKSUM_PARTIAL on skbs with extension headers and recalc checksum during fragmentation

2015-10-26 Thread Hannes Frederic Sowa
On Sun, Oct 25, 2015, at 14:32, Tom Herbert wrote: > > Anyway, currently it is easy to generate broken checksums on the wire > > and would like to solve that for net, we certainly can improve that in > > net-next. > > > Hannes, > > The IPv4 fragment code is very similar to IPv6 in that both will

Re: [PATCH net-next] ipv6: recreate ipv6 link-local addresses when increasing MTU over IPV6_MIN_MTU

2015-10-26 Thread Hannes Frederic Sowa
Hi, On Mon, Oct 26, 2015, at 20:16, Jay Vosburgh wrote: > Hannes Frederic Sowa <han...@stressinduktion.org> wrote: > > >Hello Alex, > > > >On Mon, Oct 26, 2015, at 16:52, Alexander Duyck wrote: > >> Seems like this code isn't quite correct. You are calli

Re: [PATCH net] ipv6: no CHECKSUM_PARTIAL on skbs with extension headers and recalc checksum during fragmentation

2015-10-26 Thread Hannes Frederic Sowa
On Mon, Oct 26, 2015, at 20:39, Tom Herbert wrote: > On Mon, Oct 26, 2015 at 11:44 AM, Hannes Frederic Sowa > <han...@stressinduktion.org> wrote: > > > > > > On Mon, Oct 26, 2015, at 15:19, Tom Herbert wrote: > >> > We already concluded that driv

Re: [PATCH net-next] ipv6: recreate ipv6 link-local addresses when increasing MTU over IPV6_MIN_MTU

2015-10-26 Thread Hannes Frederic Sowa
Hi Alex, On Mon, Oct 26, 2015, at 18:07, Alexander Duyck wrote: > Might be a bit longer. I just realized that I think there is another > bug here where you are going through the NETDEV_UP path even though the > interface isn't up. I'll run through some testing this morning to work > out the

Re: ip_no_pmtu_disc and UDP

2015-10-26 Thread Hannes Frederic Sowa
On Mon, Oct 26, 2015, at 23:53, Vincent Li wrote: > ok, I observed if i increase the UDP client packet size > local > interface MTU 1500, the client will fragment the packet first and > then send it out, if the UDP client packet size < local interface MTU > 1500, the DF bit will be set when

Re: ip_no_pmtu_disc and UDP

2015-10-26 Thread Hannes Frederic Sowa
Hello, On Mon, Oct 26, 2015, at 23:00, Vincent Li wrote: > the UDP packet size is about 768, here is how packet path like: > > client > server > (eth0 mtu 1500 ip 10.3.72.69) (eth0 mtu 1500 ip

Re: [PATCH net-next] sock: don't enable netstamp for af_unix sockets

2015-10-27 Thread Hannes Frederic Sowa
On Tue, Oct 27, 2015, at 12:09, Hannes Frederic Sowa wrote: > Hi Richard, > > On Tue, Oct 27, 2015, at 11:11, Richard Cochran wrote: > > On Mon, Oct 26, 2015 at 02:32:59PM +0100, Hannes Frederic Sowa wrote: > > > On Mon, Oct 26, 2015, at 14:19, Richard Cochran wrote

Re: [PATCH net-next] sock: don't enable netstamp for af_unix sockets

2015-10-27 Thread Hannes Frederic Sowa
Hi Richard, On Tue, Oct 27, 2015, at 11:11, Richard Cochran wrote: > On Mon, Oct 26, 2015 at 02:32:59PM +0100, Hannes Frederic Sowa wrote: > > On Mon, Oct 26, 2015, at 14:19, Richard Cochran wrote: > > > On Mon, Oct 26, 2015 at 01:51:37PM +0100, Hannes Frederic Sowa wrote: >

[PATCH net 2/2] ipv6: protect mtu calculation of wrap-around and infinite loop by rounding issues

2015-10-28 Thread Hannes Frederic Sowa
, which got reverted for now. Suggested-by: Linus Torvalds <torva...@linux-foundation.org> Cc: Linus Torvalds <torva...@linux-foundation.org> Reported-by: Dmitry Vyukov <dvyu...@google.com> Cc: Dmitry Vyukov <dvyu...@google.com> Signed-off-by: Hannes Frederic Sowa <

[PATCH net 1/2] Revert "Merge branch 'ipv6-overflow-arith'"

2015-10-28 Thread Hannes Frederic Sowa
nux-foundation.org> Signed-off-by: Hannes Frederic Sowa <han...@stressinduktion.org> --- Sorry for delaying the net pull request! include/linux/compiler-gcc.h | 4 include/linux/overflow-arith.h | 18 -- net/ipv6/ip6_output.c | 6 +- 3 files changed, 1 inse

Re: [PATCH] xfrm: dst_entries_init() per-net dst_ops

2015-10-28 Thread Hannes Frederic Sowa
Hello, On Wed, Oct 28, 2015, at 14:32, Dan Streetman wrote: > On Tue, Oct 27, 2015 at 12:15 PM, wrote: > > From: Dan Streetman > > > > The ipv4 and ipv6 xfrms each create a template dst_ops object, and > > perform dst_entries_init() on

Re: [BUG] Any-IP IPv6 support broken

2015-10-29 Thread Hannes Frederic Sowa
Hello, On Thu, Oct 29, 2015, at 16:00, Gilberto Bertin wrote: > 2- note that it's not actually working with IPv6 addresses: > > # ip -6 route add local abcd:abcd:abcd:abcd::/64 dev eth0 Try the loopback interface: ip -6 route add local abcd:abcd:abcd:abcd::/64 dev *lo* Otherwise packets

Re: [BUG] Any-IP IPv6 support broken

2015-10-29 Thread Hannes Frederic Sowa
On Thu, Oct 29, 2015, at 19:58, Gilberto Bertin wrote: > > > On 29 Oct 2015, at 18:39, Hannes Frederic Sowa <han...@stressinduktion.org> > > wrote: > > > > Try the loopback interface: > > > > ip -6 route add local abcd:abcd:abcd:abcd::/64 dev

Re: [PATCH net v2 1/4] ipv4: no CHECKSUM_PARTIAL on MSG_MORE corked sockets

2015-10-27 Thread Hannes Frederic Sowa
On Tue, Oct 27, 2015, at 17:04, Tom Herbert wrote: > On Tue, Oct 27, 2015 at 8:02 AM, Hannes Frederic Sowa > <han...@stressinduktion.org> wrote: > > We cannot reliable calculate packet size on MSG_MORE corked sockets > > and thus cannot decide if they are going to be fra

[PATCH net v2 2/4] ipv4: add defensive check for CHECKSUM_PARTIAL skbs in ip_fragment

2015-10-27 Thread Hannes Frederic Sowa
at.com> Cc: Tom Herbert <t...@herbertland.com> Signed-off-by: Hannes Frederic Sowa <han...@stressinduktion.org> --- net/ipv4/ip_output.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 0b02417..3f94a3b 100644 --

[PATCH net v2 1/4] ipv4: no CHECKSUM_PARTIAL on MSG_MORE corked sockets

2015-10-27 Thread Hannes Frederic Sowa
n Coddington <bcodd...@redhat.com> Cc: Tom Herbert <t...@herbertland.com> Signed-off-by: Hannes Frederic Sowa <han...@stressinduktion.org> --- net/ipv4/ip_output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 50e2973.

  1   2   3   4   5   6   7   8   9   >