pull request: batman-adv 20151216

2015-12-15 Thread Antonio Quartulli
Hello David, here you have our batch of patches intended for net-next. Marek Lindner is introducing a list of direct neighbours per interface and is exporting it via debugfs. This comes very handy in case of network debugging or simple topology analysis. Add lock protection for CRC computation i

[PATCH 05/12] batman-adv: export single hop neighbor list via debugfs

2015-12-15 Thread Antonio Quartulli
From: Marek Lindner Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/bat_iv_ogm.c | 53 + net/batman-adv/debugfs.c| 9 net/batman-adv/originator.c | 34 + net/batman-adv/origin

[PATCH 04/12] batman-adv: add bat_hardif_neigh_init algo ops call

2015-12-15 Thread Antonio Quartulli
From: Marek Lindner Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/originator.c | 4 net/batman-adv/types.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index a8671c6..27dd326 100644

[PATCH 03/12] batman-adv: add list of unique single hop neighbors per hard-interface

2015-12-15 Thread Antonio Quartulli
From: Marek Lindner Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/hard-interface.c | 4 + net/batman-adv/originator.c | 157 net/batman-adv/originator.h | 5 ++ net/batman-adv/types.h | 22 ++

[PATCH 06/12] batman-adv: update last seen field of single hop originators

2015-12-15 Thread Antonio Quartulli
From: Marek Lindner Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/bat_iv_ogm.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 1efdb5c..3738a2f 100644 --- a/net/batman-adv/bat_iv_

[PATCH 08/12] batman-adv: detect local excess vlans in TT request

2015-12-15 Thread Antonio Quartulli
From: Simon Wunderlich If the local representation of the global TT table of one originator has more VLAN entries than the respective TT update, there is some inconsistency present. By detecting and reporting this inconsistency, the global table gets updated and the excess VLAN will get removed i

[PATCH 09/12] batman-adv: unify flags access style in tt global add

2015-12-15 Thread Antonio Quartulli
From: Simon Wunderlich This should slightly improve readability Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/translation-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/translation-

[PATCH 02/12] Doc: update email address

2015-12-15 Thread Antonio Quartulli
My personal email address has changed. Update it in the doc files Signed-off-by: Antonio Quartulli --- Documentation/ABI/testing/sysfs-class-net-mesh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-net-mesh b/Documentation/ABI/testin

[PATCH 07/12] batman-adv: rename equiv/equal or better to similar or better

2015-12-15 Thread Antonio Quartulli
From: Simon Wunderlich Since the function applies a threshold and also slightly worse values are accepted, ''equal or better'' does not represent the intention of the function. ''Similar or better'' represents that better. Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner Signed-off

[PATCH 01/12] MAINTAINERS: update email address

2015-12-15 Thread Antonio Quartulli
My personal email address has changed. Update it in the MAINTAINERS file Signed-off-by: Antonio Quartulli --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 04e8d18..2bd095b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2111,7 +21

[PATCH net-next 3/4] cxgb4: Use t4_mgmt_tx() API for sending write l2t request ctrl packets.

2015-12-15 Thread Hariprasad Shenai
Based on original work by Michael Werner Signed-off-by: Hariprasad Shenai --- drivers/net/ethernet/chelsio/cxgb4/l2t.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/l2t.c b/drivers/net/ethernet/chelsio/cxgb4/l2t.c index f7e3775..0eab82

[PATCH net-next 2/4] cxgb4: Add API to alloc l2t entry; also update existing ones

2015-12-15 Thread Hariprasad Shenai
Based on original work by Kumar Sanghvi Signed-off-by: Hariprasad Shenai --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 10 +- drivers/net/ethernet/chelsio/cxgb4/l2t.c| 125 +--- drivers/net/ethernet/chelsio/cxgb4/l2t.h| 7 +- 3 files changed, 117 i

[PATCH net-next 0/4] Few l2 table related enhancements for cxgb4

2015-12-15 Thread Hariprasad Shenai
Hi This series adds a new API to allocate and update l2t entry, replaces arpq_head/arpq_tail with double skb double linked list. Use t4_mgmt_tx() to send control packets of l2t write request. Remove some magical values used in calculating vlan priority. This patch series has been created against

[PATCH net-next 1/4] cxgb4: Use mask & shift while returning vlan_prio

2015-12-15 Thread Hariprasad Shenai
Signed-off-by: Hariprasad Shenai --- drivers/net/ethernet/chelsio/cxgb4/l2t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/l2t.c b/drivers/net/ethernet/chelsio/cxgb4/l2t.c index ac27898..aa5fbad 100644 --- a/drivers/net/ethernet/chelsio/c

[PATCH net-next 4/4] cxgb4: Replace arpq_head/arpq_tail with SKB double link-list code

2015-12-15 Thread Hariprasad Shenai
Based on original work by Michael Werner Signed-off-by: Hariprasad Shenai --- drivers/net/ethernet/chelsio/cxgb4/l2t.c | 61 drivers/net/ethernet/chelsio/cxgb4/l2t.h | 3 +- 2 files changed, 24 insertions(+), 40 deletions(-) diff --git a/drivers/net/ethernet/c

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-12-15 Thread Willy Tarreau
On Tue, Dec 15, 2015 at 01:21:15PM -0800, Eric Dumazet wrote: > On Tue, 2015-12-15 at 20:44 +0100, Willy Tarreau wrote: > > > Thus do you think it's worth adding a new option as Tolga proposed ? > > > I thought we tried hard to avoid adding the option but determined > we could not avoid it ;) N

Re: [PATCH] rhashtable: Always allocate at least one bucket lock

2015-12-15 Thread William Hua
On 12/16/2015 12:53 AM, Herbert Xu wrote: > William Hua wrote: >> No bucket locks are allocated when an rhashtable is initialized with >> fewer than two elements. In this special case, we should allocate at >> least one to prevent a segfault. >> >> Signed-off-by: William Hua > > Huh? The minimum

Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog

2015-12-15 Thread Ming Lei
On Wed, Dec 16, 2015 at 7:10 AM, Alexei Starovoitov wrote: > On Tue, Dec 15, 2015 at 07:21:03PM +0800, Ming Lei wrote: >> kmalloc() is often a bit time-consuming, also >> one atomic counter has to be used to track the total >> allocated elements, which is also not good. >> >> This patch pre-alloca

Re: [PATCH 4/6] bpf: hash: convert per-hashtable lock into per-bucket bit spinlock

2015-12-15 Thread Ming Lei
On Wed, Dec 16, 2015 at 1:01 PM, Yang Shi wrote: > > I recalled Steven confirmed raw_spin_lock has the lockdep benefit too in the > patch review for changing to raw lock. > > Please check this thread out > http://lists.openwall.net/netdev/2015/10/31/7 OK, looks I was wrong about the lockdep ben

Re: [PATCH] drivers: net: cpsw: fix RMII/RGMII mode when used with fixed-link PHY

2015-12-15 Thread Markus Brunner
On Monday 14 December 2015 13:04:46 David Rivshin wrote: > On Sat, 12 Dec 2015 16:44:19 +0100 ... > > Your patch works fine on my board, which uses MII and dual_emac with > > a fixed_phy and a real one. > > Thanks for checking. The only dual_emac board I have available is the > EVMSK, which has tw

[PATCH 1/1] net: sctp: dynamically enable or disable pf state

2015-12-15 Thread zyjzyj2000
From: Zhu Yanjun As we all know, the value of pf_retrans >= max_retrans_path can disable pf state. The variables of pf_retrans and max_retrans_path can be changed by the userspace application. Sometimes the user expects to disable pf state while the 2 variables are changed to enable pf state. So

[V4 PATCH 1/1] net: sctp: dynamically enable or disable pf state

2015-12-15 Thread zyjzyj2000
Hi, vlad Sorry. There is a typo in Documentation/networking/ip-sysctl.txt of V3 patch. Now I correct it. Best Regards! Zhu Yanjun -- 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.

Re: [PATCH] rhashtable: Always allocate at least one bucket lock

2015-12-15 Thread Herbert Xu
William Hua wrote: > No bucket locks are allocated when an rhashtable is initialized with > fewer than two elements. In this special case, we should allocate at > least one to prevent a segfault. > > Signed-off-by: William Hua Huh? The minimum hash table size is 4. How are you getting an rhash

[V3 PATCH 1/1] net: sctp: dynamically enable or disable pf state

2015-12-15 Thread zyjzyj2000
Hi, vlad Thanks for your ack. The latest patch is in the attachment. Changes: Modify Documentation/networking/ip-sysctl.txt according to Marcelo and David. Best Regards! Zhu Yanjun -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.k

[PATCH 1/1] net: sctp: dynamically enable or disable pf state

2015-12-15 Thread zyjzyj2000
From: Zhu Yanjun As we all know, the value of pf_retrans >= max_retrans_path can disable pf state. The variables of pf_retrans and max_retrans_path can be changed by the userspace application. Sometimes the user expects to disable pf state while the 2 variables are changed to enable pf state. So

Re: [PATCH net] inet: tcp: fix inetpeer_set_addr_v4()

2015-12-15 Thread David Miller
From: Eric Dumazet Date: Tue, 15 Dec 2015 20:56:44 -0800 > From: Eric Dumazet > > David Ahern added a vif field in the a4 part of inetpeer_addr struct. > > This broke IPv4 TCP fast open client side and more generally tcp metrics > cache, because inetpeer_addr_cmp() is now comparing two u32 ins

[PATCH net] inet: tcp: fix inetpeer_set_addr_v4()

2015-12-15 Thread Eric Dumazet
From: Eric Dumazet David Ahern added a vif field in the a4 part of inetpeer_addr struct. This broke IPv4 TCP fast open client side and more generally tcp metrics cache, because inetpeer_addr_cmp() is now comparing two u32 instead of one. inetpeer_set_addr_v4() needs to properly init vif field,

Re: [PATCH net] ipv6: automatically enable stable privacy mode if stable_secret set

2015-12-15 Thread David Miller
From: Hannes Frederic Sowa Date: Tue, 15 Dec 2015 22:59:12 +0100 > Bjørn reported that while we switch all interfaces to privacy stable mode > when setting the secret, we don't set this mode for new interfaces. This > does not make sense, so change this behaviour. > > Fixes: 622c81d57b392cc ("ip

Re: [PATCH net-next] sctp: use GFP_KERNEL in sctp_init()

2015-12-15 Thread David Miller
From: Eric Dumazet Date: Tue, 15 Dec 2015 15:33:39 -0800 > From: Eric Dumazet > > modules init functions being called from process context, we better > use GFP_KERNEL allocations to increase our chances to get these > high-order pages we want for SCTP hash tables. > > This mostly matters if SC

Re: [PATCH v7 0/4] Support administratively closing application sockets

2015-12-15 Thread David Miller
From: Lorenzo Colitti Date: Wed, 16 Dec 2015 12:30:01 +0900 > This patchset adds the ability to administratively close a socket > without any action from the process owning the socket or the > socket protocol. Series applied, thanks for sticking with this. -- To unsubscribe from this list: send

Re: [PATCH v6 net-next 0/4] ila: Optimization to preserve value of early demux

2015-12-15 Thread David Miller
From: Tom Herbert Date: Tue, 15 Dec 2015 15:41:34 -0800 > In the current implementation of ILA, LWT is used to perform > translation on both the input and output paths. This is functional, > however there is a big performance hit in the receive path. Early > demux occurs before the routing lookup

Re: Information leak in sco_sock_bind

2015-12-15 Thread Marcel Holtmann
Hi Dave, >> The following program leads to leak of 6 bytes from kernel stack: > > This should fix it: > > > [PATCH] bluetooth: Validate socket address length in sco_sock_bind(). > > Signed-off-by: David S. Miller > --- > net/bluetooth/sco.c | 3 +++ > 1 file changed, 3 inse

Re: [PATCH] net: emac: emac gigabit ethernet controller driver

2015-12-15 Thread Timur Tabi
David Miller wrote: I think you did something much worse. You quoted the entire huge patch which is entirely inappropriate given the feedback you were trying to give. Sorry about that. I usually do trim it, but I got tired and forgot before I hit send. -- Sent by an employee of the Qualcom

[PATCH v7 2/4] net: diag: Add the ability to destroy a socket.

2015-12-15 Thread Lorenzo Colitti
This patch adds a SOCK_DESTROY operation, a destroy function pointer to sock_diag_handler, and a diag_destroy function pointer. It does not include any implementation code. Signed-off-by: Lorenzo Colitti Acked-by: Eric Dumazet --- include/linux/sock_diag.h | 2 ++ include/net/sock.h

[PATCH v7 4/4] net: diag: Support destroying TCP sockets.

2015-12-15 Thread Lorenzo Colitti
This implements SOCK_DESTROY for TCP sockets. It causes all blocking calls on the socket to fail fast with ECONNABORTED and causes a protocol close of the socket. It informs the other end of the connection by sending a RST, i.e., initiating a TCP ABORT as per RFC 793. ECONNABORTED was chosen for co

[PATCH v7 3/4] net: diag: Support SOCK_DESTROY for inet sockets.

2015-12-15 Thread Lorenzo Colitti
This passes the SOCK_DESTROY operation to the underlying protocol diag handler, or returns -EOPNOTSUPP if that handler does not define a destroy operation. Most of this patch is just renaming functions. This is not strictly necessary, but it would be fairly counterintuitive to have the code to des

[PATCH v7 1/4] net: diag: split inet_diag_dump_one_icsk into two

2015-12-15 Thread Lorenzo Colitti
Currently, inet_diag_dump_one_icsk finds a socket and then dumps its information to userspace. Split it into a part that finds the socket and a part that dumps the information. Signed-off-by: Lorenzo Colitti Acked-by: Eric Dumazet --- include/linux/inet_diag.h | 5 + net/ipv4/inet_diag.c

[PATCH v7 0/4] Support administratively closing application sockets

2015-12-15 Thread Lorenzo Colitti
This patchset adds the ability to administratively close a socket without any action from the process owning the socket or the socket protocol. It implements this by adding a new diag_destroy function pointer to struct proto. In-kernel callers can access this functionality directly by calling sk->

Re: [PATCH] net: emac: emac gigabit ethernet controller driver

2015-12-15 Thread David Miller
From: Timur Tabi Date: Tue, 15 Dec 2015 18:15:50 -0600 > You forgot to add "[v2]" to the subject line of this email. I think you did something much worse. You quoted the entire huge patch which is entirely inappropriate given the feedback you were trying to give. Thanks. -- To unsubscribe from

Re: [PATCH 4/6] bpf: hash: convert per-hashtable lock into per-bucket bit spinlock

2015-12-15 Thread Ming Lei
Hi Alexei, On Wed, Dec 16, 2015 at 6:51 AM, Alexei Starovoitov wrote: > On Tue, Dec 15, 2015 at 07:21:02PM +0800, Ming Lei wrote: >> Both htab_map_update_elem() and htab_map_delete_elem() can be >> called from eBPF program, and they may be in kernel hot path, >> so it isn't efficient to use a per

Re: [PATCH net-next 0/8] net: The beginning of the end for NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM

2015-12-15 Thread David Miller
From: Tom Herbert Date: Tue, 15 Dec 2015 14:11:05 -0800 > Looks like I may have missed a NETIF_F_ALL_CSUM in netronome driver, > will post fix shortly. I fixed it up for you when I applied that patch. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message t

[PATCH] Add tcindex to conntrack and add netfilter target/matches

2015-12-15 Thread Luuk Paulussen
This patch implements support for setting/matching the skb->tc_index field from Xtables, as well as allowing it to be saved/restored using connection tracking. This provides 16 extra bits of mark space that can be saved/restored from the connection (for performance benefits) when the marking is be

Add tcindex to conntrack and add netfilter target/matches

2015-12-15 Thread Luuk Paulussen
I recently posted this patch to the netfilter-devel and lartc mailing lists. The feedback I have had so far has mostly been questions around how we would use this, and some suggestions that don't solve the issues. I haven't had any negative feedback. The key use case is to mark first packet i

Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog

2015-12-15 Thread Daniel Borkmann
On 12/16/2015 12:35 AM, Daniel Borkmann wrote: On 12/15/2015 12:21 PM, Ming Lei wrote: ... +static int htab_init_elems_allocator(struct bpf_htab *htab) +{ +int ret = htab_pre_alloc_elems(htab); + +if (ret) +return ret; + +ret = percpu_ida_init(&htab->elems_pool, htab->map.max

Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog

2015-12-15 Thread Daniel Borkmann
On 12/16/2015 12:10 AM, Alexei Starovoitov wrote: ... this rounding to cache line is great for performance, but it's extra memory upfront which may not be needed. The per-allocation is a classic performance vs memory trade-off. In other cases it may hurt. So could you change the patch to do pre-a

[PATCH v6 net-next 4/4] ila: Add generic ILA translation facility

2015-12-15 Thread Tom Herbert
This patch implements an ILA tanslation table. This table can be configured with identifier to locator mappings, and can be be queried to resolve a mapping. Queries can be parameterized based on interface, direction (incoming or outoing), and matching locator. The table is implemented using rhasht

[PATCH v6 net-next 3/4] netlink: add a start callback for starting a netlink dump

2015-12-15 Thread Tom Herbert
The start callback allows the caller to set up a context for the dump callbacks. Presumably, the context can then be destroyed in the done callback. Signed-off-by: Tom Herbert --- include/linux/netlink.h | 2 ++ include/net/genetlink.h | 2 ++ net/netlink/af_netlink.c | 4 net/netlink/

[PATCH v6 net-next 2/4] rhashtable: add function to replace an element

2015-12-15 Thread Tom Herbert
Add the rhashtable_replace_fast function. This replaces one object in the table with another atomically. The hashes of the new and old objects must be equal. Signed-off-by: Tom Herbert --- include/linux/rhashtable.h | 82 ++ 1 file changed, 82 insertio

[PATCH v6 net-next 0/4] ila: Optimization to preserve value of early demux

2015-12-15 Thread Tom Herbert
In the current implementation of ILA, LWT is used to perform translation on both the input and output paths. This is functional, however there is a big performance hit in the receive path. Early demux occurs before the routing lookup (a hit actually obviates the route lookup). Therefore the stack c

[PATCH v6 net-next 1/4] ila: Create net/ipv6/ila directory

2015-12-15 Thread Tom Herbert
Create ila directory in preparation for supporting other hooks in the kernel than LWT for doing ILA. This includes: - Moving ila.c to ila/ila_lwt.c - Splitting out some common functions into ila_common.c Signed-off-by: Tom Herbert --- net/ipv6/Makefile | 2 +- net/ipv6/ila.c

Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog

2015-12-15 Thread Daniel Borkmann
On 12/15/2015 12:21 PM, Ming Lei wrote: ... +static int htab_init_elems_allocator(struct bpf_htab *htab) +{ + int ret = htab_pre_alloc_elems(htab); + + if (ret) + return ret; + + ret = percpu_ida_init(&htab->elems_pool, htab->map.max_entries); + if (ret) +

[PATCH net-next] sctp: use GFP_KERNEL in sctp_init()

2015-12-15 Thread Eric Dumazet
From: Eric Dumazet modules init functions being called from process context, we better use GFP_KERNEL allocations to increase our chances to get these high-order pages we want for SCTP hash tables. This mostly matters if SCTP module is loaded once memory got fragmented. Signed-off-by: Eric Duma

Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog

2015-12-15 Thread Daniel Borkmann
On 12/15/2015 12:21 PM, Ming Lei wrote: ... +/* Called from syscall, and the code is borrowed from blk_mq */ +static int htab_pre_alloc_elems(struct bpf_htab *htab) +{ + const unsigned max_order = 4; + unsigned elem_size = htab->elem_size, i; + unsigned nr_entries = htab->map.ma

Re: [PATCH] net: fix uninitialized variable issue

2015-12-15 Thread Eric Dumazet
On Tue, 2015-12-15 at 14:42 -0800, Tadeusz Struk wrote: > It was added in this commit: 0345f93138b2 ("net: socket: add support for > async operations") > Thanks ! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More ma

Re: [PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog

2015-12-15 Thread Alexei Starovoitov
On Tue, Dec 15, 2015 at 07:21:03PM +0800, Ming Lei wrote: > kmalloc() is often a bit time-consuming, also > one atomic counter has to be used to track the total > allocated elements, which is also not good. > > This patch pre-allocates element pool in htab_map_alloc(), > then use percpu_ida to all

Re: [PATCH 4/6] bpf: hash: convert per-hashtable lock into per-bucket bit spinlock

2015-12-15 Thread Alexei Starovoitov
On Tue, Dec 15, 2015 at 07:21:02PM +0800, Ming Lei wrote: > Both htab_map_update_elem() and htab_map_delete_elem() can be > called from eBPF program, and they may be in kernel hot path, > so it isn't efficient to use a per-hashtable lock in this two > helpers. > > The per-hashtable spinlock is use

Re: [PATCH] net: emac: emac gigabit ethernet controller driver

2015-12-15 Thread Gilad Avidov
On Mon, 14 Dec 2015 17:39:09 -0800 Florian Fainelli wrote: > On 14/12/15 16:19, Gilad Avidov wrote: > > [snip] > > > + "sgmii_irq"; > > + qcom,emac-gpio-mdc = <&msmgpio 123 0>; > > + qcom,emac-gpio-mdio = <&msmgpio 124 0>; > > + qcom,emac-tstamp-e

[PATCH] rhashtable: Always allocate at least one bucket lock

2015-12-15 Thread William Hua
No bucket locks are allocated when an rhashtable is initialized with fewer than two elements. In this special case, we should allocate at least one to prevent a segfault. Signed-off-by: William Hua --- lib/rhashtable.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rhashtable.c b/lib

Re: [PATCH] net: fix uninitialized variable issue

2015-12-15 Thread Tadeusz Struk
On 12/15/2015 11:02 AM, Eric Dumazet wrote: > On Tue, 2015-12-15 at 10:46 -0800, Tadeusz Struk wrote: >> msg_iocb needs to be initialized on the recv/recvfrom path. >> Otherwise afalg will wrongly interpret it as an async call. >> >> Cc: sta...@vger.kernel.org >> Reported-by: Harald Freudenberger

Re: [PATCH net 2/2] udp: restrict offloads to one namespace

2015-12-15 Thread Tom Herbert
On Tue, Dec 15, 2015 at 12:46 PM, Hannes Frederic Sowa wrote: > On 15.12.2015 21:26, Tom Herbert wrote: >> On Tue, Dec 15, 2015 at 12:01 PM, Hannes Frederic Sowa >> wrote: >>> udp tunnel offloads tend to aggregate datagrams based on inner >>> headers. gro engine gets notified by tunnel implementa

Re: [PATCH net-next 0/8] net: The beginning of the end for NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM

2015-12-15 Thread Tom Herbert
On Tue, Dec 15, 2015 at 2:11 PM, Tom Herbert wrote: > On Tue, Dec 15, 2015 at 1:32 PM, David Miller wrote: >> From: Tom Herbert >> Date: Mon, 14 Dec 2015 11:19:39 -0800 >> >>> This patch set starts to address one front in the battle against >>> protocol ossification. >> >> Looks good series appl

Re: [PATCH net-next 0/8] net: The beginning of the end for NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM

2015-12-15 Thread Tom Herbert
On Tue, Dec 15, 2015 at 1:32 PM, David Miller wrote: > From: Tom Herbert > Date: Mon, 14 Dec 2015 11:19:39 -0800 > >> This patch set starts to address one front in the battle against >> protocol ossification. > > Looks good series applied, thanks. > > Two things: > > 1) I'd ask you to reconsider

[PATCH net] ipv6: automatically enable stable privacy mode if stable_secret set

2015-12-15 Thread Hannes Frederic Sowa
Bjørn reported that while we switch all interfaces to privacy stable mode when setting the secret, we don't set this mode for new interfaces. This does not make sense, so change this behaviour. Fixes: 622c81d57b392cc ("ipv6: generation of stable privacy addresses for link-local and autoconf") Rep

Re: [PATCH] net: emac: emac gigabit ethernet controller driver

2015-12-15 Thread Arnd Bergmann
On Tuesday 15 December 2015 15:09:23 Timur Tabi wrote: > Arnd Bergmann wrote: > > If that's in the probe() called from it function, just use writel() > > everywhere, > > a few extra microseconds won't kill the boot time. In general, if a user > > would > > notice the difference, use the relaxed v

Re: [PATCH net-next 0/8] net: The beginning of the end for NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM

2015-12-15 Thread David Miller
From: Tom Herbert Date: Mon, 14 Dec 2015 11:19:39 -0800 > This patch set starts to address one front in the battle against > protocol ossification. Looks good series applied, thanks. Two things: 1) I'd ask you to reconsider passing that struct with the bit fields into the chk routines. Som

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-12-15 Thread Eric Dumazet
On Tue, 2015-12-15 at 20:44 +0100, Willy Tarreau wrote: > Thus do you think it's worth adding a new option as Tolga proposed ? I thought we tried hard to avoid adding the option but determined we could not avoid it ;) So I would simply resend the patch for another review. -- To unsubscribe fr

Re: [PATCH] net: add Qualcomm IPC router

2015-12-15 Thread Dan Williams
On Tue, 2015-12-15 at 15:13 -0600, Dan Williams wrote: > On Tue, 2015-12-15 at 16:01 -0500, David Miller wrote: > > From: Bjorn Andersson > > Date: Fri, 11 Dec 2015 12:41:59 -0800 > > > > > +static unsigned int qrtr_local_nid = 1; > > > +module_param_named(node_id, qrtr_local_nid, uint, S_IRUGO);

Re: [PATCH] net: add Qualcomm IPC router

2015-12-15 Thread Dan Williams
On Tue, 2015-12-15 at 16:01 -0500, David Miller wrote: > From: Bjorn Andersson > Date: Fri, 11 Dec 2015 12:41:59 -0800 > > > +static unsigned int qrtr_local_nid = 1; > > +module_param_named(node_id, qrtr_local_nid, uint, S_IRUGO); > > +MODULE_PARM_DESC(idVendor, "Local Node Identifier"); Also s/

Re: [PATCH] net: emac: emac gigabit ethernet controller driver

2015-12-15 Thread Timur Tabi
Arnd Bergmann wrote: If that's in the probe() called from it function, just use writel() everywhere, a few extra microseconds won't kill the boot time. In general, if a user would notice the difference, use the relaxed version and add a comment to explain how you proved it's correct, otherwise st

Re: [PATCH] net: add Qualcomm IPC router

2015-12-15 Thread David Miller
From: Bjorn Andersson Date: Fri, 11 Dec 2015 12:41:59 -0800 > +static unsigned int qrtr_local_nid = 1; > +module_param_named(node_id, qrtr_local_nid, uint, S_IRUGO); > +MODULE_PARM_DESC(idVendor, "Local Node Identifier"); Module parameters suck. Allow the user to choose this dynamically. You h

Re: Information leak in llcp_sock_bind/llcp_raw_sock_bind

2015-12-15 Thread David Miller
From: Dmitry Vyukov Date: Tue, 15 Dec 2015 21:55:37 +0100 > I've seen a kernel address at least in pptp_bind, We're not talking about pptp_bind. We're talking about llcp_{,raw}_sock_bind(). If your hex dump doesn't show it, don't report anything unless you are absolutely sure via code inspecti

Re: Information leak in llcp_sock_bind/llcp_raw_sock_bind

2015-12-15 Thread Dmitry Vyukov
On Tue, Dec 15, 2015 at 9:48 PM, David Miller wrote: > From: Dmitry Vyukov > Date: Tue, 15 Dec 2015 21:45:16 +0100 > >> On Tue, Dec 15, 2015 at 9:36 PM, David Miller wrote: >>> From: Dmitry Vyukov >>> Date: Tue, 15 Dec 2015 21:00:20 +0100 >>> The problem is that llcp_sock_bind/llcp_raw_soc

Re: Information leak in llcp_sock_bind/llcp_raw_sock_bind

2015-12-15 Thread David Miller
From: Dmitry Vyukov Date: Tue, 15 Dec 2015 21:45:16 +0100 > On Tue, Dec 15, 2015 at 9:36 PM, David Miller wrote: >> From: Dmitry Vyukov >> Date: Tue, 15 Dec 2015 21:00:20 +0100 >> >>> The problem is that llcp_sock_bind/llcp_raw_sock_bind do not check >>> sockaddr_len passed in, so they copy sta

Re: [PATCH] net: fix uninitialized variable issue

2015-12-15 Thread David Miller
From: Tadeusz Struk Date: Tue, 15 Dec 2015 10:46:17 -0800 > msg_iocb needs to be initialized on the recv/recvfrom path. > Otherwise afalg will wrongly interpret it as an async call. > > Cc: sta...@vger.kernel.org > Reported-by: Harald Freudenberger > Signed-off-by: Tadeusz Struk Looks good, a

Re: [PATCH net 2/2] udp: restrict offloads to one namespace

2015-12-15 Thread Hannes Frederic Sowa
On 15.12.2015 21:26, Tom Herbert wrote: > On Tue, Dec 15, 2015 at 12:01 PM, Hannes Frederic Sowa > wrote: >> udp tunnel offloads tend to aggregate datagrams based on inner >> headers. gro engine gets notified by tunnel implementations about >> possible offloads. The match is solely based on the po

Re: Information leak in llcp_sock_bind/llcp_raw_sock_bind

2015-12-15 Thread Dmitry Vyukov
On Tue, Dec 15, 2015 at 9:36 PM, David Miller wrote: > From: Dmitry Vyukov > Date: Tue, 15 Dec 2015 21:00:20 +0100 > >> The problem is that llcp_sock_bind/llcp_raw_sock_bind do not check >> sockaddr_len passed in, so they copy stack garbage from stack into the >> socket and then return it in gets

Re: Information leak in sco_sock_bind

2015-12-15 Thread David Miller
From: Dmitry Vyukov Date: Tue, 15 Dec 2015 21:02:30 +0100 > The following program leads to leak of 6 bytes from kernel stack: This should fix it: [PATCH] bluetooth: Validate socket address length in sco_sock_bind(). Signed-off-by: David S. Miller --- net/bluetooth/sco.c

Re: Information leak in llcp_sock_bind/llcp_raw_sock_bind

2015-12-15 Thread David Miller
From: Dmitry Vyukov Date: Tue, 15 Dec 2015 21:00:20 +0100 > The problem is that llcp_sock_bind/llcp_raw_sock_bind do not check > sockaddr_len passed in, so they copy stack garbage from stack into the > socket and then return it in getsockname. > This can defeat ASLR, leak crypto keys, etc. That'

Re: [PATCH net 2/2] udp: restrict offloads to one namespace

2015-12-15 Thread Tom Herbert
On Tue, Dec 15, 2015 at 12:01 PM, Hannes Frederic Sowa wrote: > udp tunnel offloads tend to aggregate datagrams based on inner > headers. gro engine gets notified by tunnel implementations about > possible offloads. The match is solely based on the port number. > > Imagine a tunnel bound to port 5

Re: [patch v2] qlcnic: fix a timeout loop

2015-12-15 Thread Dan Carpenter
On Tue, Dec 15, 2015 at 11:13:50PM +0300, Dan Carpenter wrote: > On Tue, Dec 15, 2015 at 01:13:41PM -0500, David Miller wrote: > > From: Dan Carpenter > > Date: Tue, 15 Dec 2015 16:56:16 +0300 > > > > > The problem here is that at the end of the loop we test for if > > > idc->vnic_wait_limit is z

Re: [patch v2] qlcnic: fix a timeout loop

2015-12-15 Thread Dan Carpenter
On Tue, Dec 15, 2015 at 01:13:41PM -0500, David Miller wrote: > From: Dan Carpenter > Date: Tue, 15 Dec 2015 16:56:16 +0300 > > > The problem here is that at the end of the loop we test for if > > idc->vnic_wait_limit is zero, but since idc->vnic_wait_limit-- is a > > post-op, it actually ends up

Information leak in sco_sock_bind

2015-12-15 Thread Dmitry Vyukov
Hello, The following program leads to leak of 6 bytes from kernel stack: #include #include #include #include #include #include #include #include #include #include #include #include struct sockaddr_sco { sa_family_t sco_family; charsco_bdaddr[6]; }; #define BTPROTO_SCO 2

[PATCH net 2/2] udp: restrict offloads to one namespace

2015-12-15 Thread Hannes Frederic Sowa
udp tunnel offloads tend to aggregate datagrams based on inner headers. gro engine gets notified by tunnel implementations about possible offloads. The match is solely based on the port number. Imagine a tunnel bound to port 53, the offloading will look into all DNS packets and tries to aggregate

[PATCH net 1/2] fou: clean up socket with kfree_rcu

2015-12-15 Thread Hannes Frederic Sowa
fou->udp_offloads is managed by RCU. As it is actually included inside the fou sockets, we cannot let the memory go out of scope before a grace period. We either can synchronize_rcu or switch over to kfree_rcu to manage the sockets. kfree_rcu seems appropriate as it is used by vxlan and geneve. Fi

Information leak in llcp_sock_bind/llcp_raw_sock_bind

2015-12-15 Thread Dmitry Vyukov
Hello, The following program leads to leak of unint bytes from kernel stack: #include #include #include #include #include #include #include #include #include #include #include #include #define NFC_SOCKPROTO_LLCP 1 int main(void) { struct sockaddr sa; unsigned len, i,

Re: [PATCH 12/14] mm: memcontrol: account socket memory in unified hierarchy memory controller

2015-12-15 Thread Michal Hocko
On Tue 08-12-15 10:30:22, Johannes Weiner wrote: > Socket memory can be a significant share of overall memory consumed by > common workloads. In order to provide reasonable resource isolation in > the unified hierarchy, this type of memory needs to be included in the > tracking/accounting of a cgro

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-12-15 Thread Willy Tarreau
On Tue, Dec 15, 2015 at 10:21:52AM -0800, Eric Dumazet wrote: > On Tue, 2015-12-15 at 18:43 +0100, Willy Tarreau wrote: > > > Ah ? but what does it bring in this case ? I'm not seeing it used > > anywhere on a listening socket. The code took care of not breaking > > them though (ie they still acce

Re: [PATCH] sh_eth: fix descriptor access endianness

2015-12-15 Thread Sergei Shtylyov
Hello. On 12/15/2015 09:06 PM, Sergei Shtylyov wrote: The driver never calls cpu_to_edmac() when writing the descriptor address and edmac_to_cpu() when reading it, although it should -- fix this. Note that the frame/buffer length descriptor field accesses also need fixing but since they are bo

Re: [PATCH] net: fix uninitialized variable issue

2015-12-15 Thread Eric Dumazet
On Tue, 2015-12-15 at 10:46 -0800, Tadeusz Struk wrote: > msg_iocb needs to be initialized on the recv/recvfrom path. > Otherwise afalg will wrongly interpret it as an async call. > > Cc: sta...@vger.kernel.org > Reported-by: Harald Freudenberger > Signed-off-by: Tadeusz Struk > --- > net/socke

Re: [PATCH/RFC net-next] ravb: Add dma queue interrupt support

2015-12-15 Thread Sergei Shtylyov
Hello. On 12/15/2015 03:23 PM, Yoshihiro Kaneko wrote: From: Kazuya Mizuguchi This patch supports the following interrupts. - One interrupt for multiple (descriptor, error, management) - One interrupt for emac - Four interrupts for dma queue (best effort rx/tx, network control rx/tx) Yo

Re: [PATCH/RFC net-next] ravb: Add dma queue interrupt support

2015-12-15 Thread Sergei Shtylyov
Hello. On 12/15/2015 03:23 PM, Yoshihiro Kaneko wrote: From: Kazuya Mizuguchi This patch supports the following interrupts. - One interrupt for multiple (descriptor, error, management) - One interrupt for emac - Four interrupts for dma queue (best effort rx/tx, network control rx/tx) Yo

Re: [PATCH v2 net-next] ravb: Add fixed-link support

2015-12-15 Thread David Miller
From: Yoshihiro Kaneko Date: Tue, 15 Dec 2015 19:44:13 +0900 > From: Kazuya Mizuguchi > > This patch adds support of the fixed PHY. > This patch is based on commit 87009814cdbb ("ucc_geth: use the new fixed > PHY helpers"). > > Signed-off-by: Kazuya Mizuguchi > Signed-off-by: Yoshihiro Kaneko

Re: [patch -mainline] qlge: fix a timeout loop in ql_change_rx_buffers()

2015-12-15 Thread David Miller
From: Dan Carpenter Date: Tue, 15 Dec 2015 13:52:36 +0300 > The problem here is that after the loop we test for "if (!i) " but > because "i--" is a post-op we exit with i set to -1. I have fixed this > by changing it to a pre-op instead. I had to change the starting value > from 3 to 4 so that

Re: [PATCH net-next] sched/cls_flow.c make nfct-* keys working on ingress with NAT

2015-12-15 Thread David Miller
Do not use attachments to post patches. You must post them inline. I know why you did this, you did it because you couldn't figure out how to get your email client to not molest the patch if it's inline. But you must get that working in order to contribute changes and post them on this mailing l

Re: [patch -mainline] sfc: fix a timeout loop

2015-12-15 Thread David Miller
From: Dan Carpenter Date: Tue, 15 Dec 2015 14:06:08 +0300 > We test for if "tries" is zero at the end but "tries--" is a post-op so > it will end with "tries" set to -1. I have changed it to a pre-op > instead. > > Signed-off-by: Dan Carpenter Applied. -- To unsubscribe from this list: send t

Re: [PATCH] sh_eth: fix descriptor access endianness

2015-12-15 Thread David Miller
From: Sergei Shtylyov Date: Tue, 15 Dec 2015 14:26:51 +0300 > Hello. > > On 12/15/2015 8:25 AM, David Miller wrote: > >>> The driver never calls cpu_to_edmac() when writing the descriptor >>> address >>> and edmac_to_cpu() when reading it, although it should -- fix this. >>> >>> Note that the f

[PATCH] net: fix uninitialized variable issue

2015-12-15 Thread Tadeusz Struk
msg_iocb needs to be initialized on the recv/recvfrom path. Otherwise afalg will wrongly interpret it as an async call. Cc: sta...@vger.kernel.org Reported-by: Harald Freudenberger Signed-off-by: Tadeusz Struk --- net/socket.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/socket.c

Re: [PATCH v6 4/4] net: diag: Support destroying TCP sockets.

2015-12-15 Thread Eric Dumazet
On Wed, 2015-12-16 at 02:17 +0900, Lorenzo Colitti wrote: > This implements SOCK_DESTROY for TCP sockets. It causes all > blocking calls on the socket to fail fast with ECONNABORTED and > causes a protocol close of the socket. It informs the other end > of the connection by sending a RST, i.e., ini

Re: [PATCH v6 3/4] net: diag: Support SOCK_DESTROY for inet sockets.

2015-12-15 Thread Eric Dumazet
On Wed, 2015-12-16 at 02:17 +0900, Lorenzo Colitti wrote: > This passes the SOCK_DESTROY operation to the underlying protocol > diag handler, or returns -EOPNOTSUPP if that handler does not > define a destroy operation. > > Most of this patch is just renaming functions. This is not > strictly nece

Re: [PATCH v6 2/4] net: diag: Add the ability to destroy a socket.

2015-12-15 Thread Eric Dumazet
On Wed, 2015-12-16 at 02:17 +0900, Lorenzo Colitti wrote: > This adds a diag_destroy pointer to struct proto that allows a > socket to be administratively closed without any action from the > process owning the socket or the socket protocol. > > Signed-off-by: Lorenzo Colitti Acked-by: Eric Dum

  1   2   >