Re: [PATCH net] tcp: fix potential huge kmalloc() calls in TCP_REPAIR

2015-11-19 Thread Pavel Emelyanov
On 11/19/2015 08:03 AM, Eric Dumazet wrote: > From: Eric Dumazet > > tcp_send_rcvq() is used for re-injecting data into tcp receive queue. > > Problems : > > - No check against size is performed, allowed user to fool kernel in > attempting very large memory allocations,

Re: [PATCH net-next 1/2] net: dsa: Add support for a switch reset gpio

2015-11-19 Thread Neil Armstrong
Hi Andrew, On 11/19/2015 12:29 AM, Andrew Lunn wrote: > + gpio = of_get_named_gpio_flags(child, "reset-gpios", 0, > +); > + if (gpio_is_valid(gpio)) { > + ret = devm_gpio_request_one(dev, gpio, flags, > +

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Florian Weimer
On 11/18/2015 10:23 PM, Stefan Priebe wrote: >> please try to get a backtrace with debugging information. It is likely >> that this is the make_request/__check_pf functionality in glibc, but it >> would be nice to get some certainty. >> >> Which glibc version do you use? Has it got a fix for

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Stefan Priebe - Profihost AG
Am 19.11.2015 um 10:44 schrieb Florian Weimer: > On 11/18/2015 10:36 PM, Stefan Priebe wrote: > >>> please try to get a backtrace with debugging information. It is likely >>> that this is the make_request/__check_pf functionality in glibc, but it >>> would be nice to get some certainty. >> >>

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Stefan Priebe - Profihost AG
Am 18.11.2015 um 22:22 schrieb Hannes Frederic Sowa: > On Wed, Nov 18, 2015, at 22:20, Stefan Priebe wrote: >> you mean just: >> la /proc/$pid/fd > > ls -l /proc/pid/fd/ > > the numbers in brackets in return from readlink are the inode numbers. > >> and >> >> cat /proc/net/netlink > >

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Florian Weimer
On 11/18/2015 10:36 PM, Stefan Priebe wrote: >> please try to get a backtrace with debugging information. It is likely >> that this is the make_request/__check_pf functionality in glibc, but it >> would be nice to get some certainty. > > sorry here it is. What I'm wondering is why is there ipv6

[PATCH net] bnx2x: Fix vxlan removal

2015-11-19 Thread Yuval Mintz
Commmit ac7eccd4d48fc "bnx2x: track vxlan port count" contains a bug - Instead of achieving the required goal, vxlan configuration would not be removed since we're decrementing the port instead of the counter. CC: Jiri Benc Signed-off-by: Yuval Mintz

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Stefan Priebe - Profihost AG
OK it had a livelock again. It just took more time. So here is the data: # la /proc/2598/fd total 0 dr-x-- 2 root root0 Nov 19 06:53 . dr-xr-xr-x 7 callweaver callweaver 0 Nov 18 22:38 .. lrwx-- 1 root root 64 Nov 19 06:54 0 -> /dev/null lrwx-- 1 root

[PATCH net-next] net: remove useless check in napi_gro_frags()

2015-11-19 Thread Eric Dumazet
From: Eric Dumazet Checking if skb is NULL in napi_gro_frags() is too late. If skb was NULL, we would crash earlier in napi_frags_skb() Drivers normally catch napi_get_frags() NULL return value before calling napi_gro_frags() Signed-off-by: Eric Dumazet

Re: Asterisk deadlocks since Kernel 4.1

2015-11-19 Thread Stefan Priebe
Am 19.11.2015 um 14:19 schrieb Florian Weimer: On 11/19/2015 01:46 PM, Stefan Priebe - Profihost AG wrote: I can try Kernel 4.4-rc1 next week. Or something else? I found this bug report which indicates that 4.1.10 works: But in

Re: [PATCH net-next] net: remove useless check in napi_gro_frags()

2015-11-19 Thread Alexei Starovoitov
On Thu, Nov 19, 2015 at 11:42:50AM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > Checking if skb is NULL in napi_gro_frags() is too late. > > If skb was NULL, we would crash earlier in napi_frags_skb() > > Drivers normally catch napi_get_frags() NULL return value >

[PATCH 09/15] bnx2x: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 15 +-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 6 +++--- 2 files

[PATCH 12/15] fm10k: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 16 ++-- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 5 ++--- 2 files

[PATCH 02/15] sctp: Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC

2015-11-19 Thread Tom Herbert
The SCTP checksum is really a CRC and is very different from the standards 1's complement checksum that serves as the checksum for IP protocols. This offload interface is also very different. Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC to highlight these differences. The term CSUM should be

[PATCH 15/15] qlogic: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 10 +++--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 16 ++--

[PATCH 13/15] ixgbe: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 41 +++ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git

[PATCH 03/15] fcoe: Use CHECKSUM_PARTIAL to indicate CRC offload

2015-11-19 Thread Tom Herbert
When setting up CRC offload set ip_summed to CHECKSUM_PARTIAL instead of CHECKSUM_UNNECESSARY. This is consistent with the definition of CHECKSUM_PARTIAL. The only driver that seems to be advertising NETIF_F_FCOE_CRC is ixgbe. AFICT the driver does not look at ip_summed for FCOE and just assumes

[PATCH 07/15] net: Add driver helper functions to determine checksum offloadability

2015-11-19 Thread Tom Herbert
Add skb_csum_offload_chk driver helper function to determine if a device with limited checksum offload capabilities is able to offload the checksum for a given packet. This patch includes: - The skb_csum_offload_chk function. Returns true if checksum is offloadable, else false. Optionally,

[PATCH 01/15] net: Add skb_inner_transport_offset function

2015-11-19 Thread Tom Herbert
Same thing as skb_transport_offset but returns the offset of the inner transport header (when skb->encpasulation is set). Signed-off-by: Tom Herbert --- include/linux/skbuff.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/skbuff.h

[PATCH 11/15] emulex: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/emulex/benet/be.h | 1 + drivers/net/ethernet/emulex/benet/be_main.c | 30 + 2 files

[PATCH RFC 00/15] net: The beginning of the end for NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM

2015-11-19 Thread Tom Herbert
Background: This patch set starts to address one front in the battle against protocol ossification. Protocol ossification describes the state that we have arrived at in the evolution of the Internet where we are materially limited to only using a very narrow range of protocols and protocol

[PATCH 08/15] net: Elaborate on checksum offload interface description

2015-11-19 Thread Tom Herbert
Add specifics and details the description of the interface between the stack and drivers for doing checksum offload. This description is meant to be as specific and complete as possible. Signed-off-by: Tom Herbert --- include/linux/skbuff.h | 138

[PATCH 14/15] mlx4: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 16 ++-- 2 files

[PATCH 05/15] net: Eliminate NETIF_F_GEN_CSUM and NETIF_F_V[46]_CSUM

2015-11-19 Thread Tom Herbert
These netif flags are unnecessary convolutions. It is more straightforward to just use NETIF_F_HW_CSUM, NETIF_F_IP_CSUM, and NETIF_F_IPV6_CSUM directly. This patch also: - Cleans up can_checksum_protocol - Simplifies netdev_intersect_features Signed-off-by: Tom Herbert

[PATCH 06/15] tcp: Fix conditions to determine checksum offload

2015-11-19 Thread Tom Herbert
In tcp_send_sendpage and tcp_sendmsg we check the route capabilities to determine if checksum offload can be performed. This check currently does not take the IP protocol into account for devices that advertise only one of NETIF_F_IPV6_CSUM or NETIF_F_IP_CSUM. This patch adds a function to check

[PATCH 04/15] net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK

2015-11-19 Thread Tom Herbert
The name NETIF_F_ALL_CSUM is a misnomer. This does not correspond to the set of features for offloading all checksums. This a mask of the checksum offload related features bits. It is incorrect to set both NETIF_F_HW_CSUM and NETIF_F_IP_CSUM or NETIF_F_IPV6 at the same time for features of a

[PATCH 10/15] bnxt: Convert to advertise NETIF_F_HW_CSUM

2015-11-19 Thread Tom Herbert
The skb_csum_offload_chk is used to resolve checksums that are unable to be offloaded to the device. Signed-off-by: Tom Herbert --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git

[PATCH 5/7] net: wrap sock->sk_cgrp_prioidx and ->sk_classid inside a struct

2015-11-19 Thread Tejun Heo
Introduce sock->sk_cgrp_data which is a struct sock_cgroup_data. ->sk_cgroup_prioidx and ->sk_classid are moved into it. The struct and its accessors are defined in cgroup-defs.h. This is to prepare for overloading the fields with a cgroup pointer. This patch mostly performs equivalent

[PATCH net-next 8/8] tipc: eliminate remnants of hungarian notation

2015-11-19 Thread Jon Maloy
The number of variables with Hungarian notation (l_ptr, n_ptr etc.) has been significantly reduced over the last couple of years. We now root out the last traces of this practice. There are no functional changes in this commit. Reviewed-by: Ying Xue Signed-off-by: Jon

[PATCH net-next 4/8] tipc: introduce per-link spinlock

2015-11-19 Thread Jon Maloy
As a preparation to allow parallel links to work more independently from each other we introduce a per-link spinlock, to be stored in the struct nodes's link entry area. Since the node lock still is a regular spinlock there is no increase in parallellism at this stage. Reviewed-by: Ying Xue

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 19:09, David Miller wrote: > From: Tom Herbert > Date: Thu, 19 Nov 2015 09:38:37 -0800 > > > 1) We need transparency. If a third party kills a TCP connection then > > the application should be informed of specifically that. This seems > > easy

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Daniel Borkmann
On 11/19/2015 07:19 PM, Hannes Frederic Sowa wrote: On Thu, Nov 19, 2015, at 11:56, Daniel Borkmann wrote: Add a handler for show_fdinfo() to be used by the anon-inodes backend for eBPF maps, and dump the map specification there. Not only useful for admins, but also it provides a minimal way to

[PATCH 3/7] cgroup: implement cgroup_get_from_path() and expose cgroup_put()

2015-11-19 Thread Tejun Heo
Implement cgroup_get_from_path() using kernfs_walk_and_get() which obtains a default hierarchy cgroup from its path. This will be used to allow cgroup path based matching from outside cgroup proper - e.g. networking and perf. v2: Add EXPORT_SYMBOL_GPL(cgroup_get_from_path). Signed-off-by: Tejun

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 11:56, Daniel Borkmann wrote: > Add a handler for show_fdinfo() to be used by the anon-inodes > backend for eBPF maps, and dump the map specification there. Not > only useful for admins, but also it provides a minimal way to > compare specs from ELF vs pinned object. > >

[PATCHSET v2] netfilter, cgroup: implement xt_cgroup2 match

2015-11-19 Thread Tejun Heo
Hello, This is the second take of the xt_cgroup2 patchset. Changes from the last take are * Instead of adding sock->sk_cgroup separately, sock->sk_cgrp_data now carries either (prioidx, classid) pair or cgroup2 pointer. This avoids inflating struct sock with yet another cgroup related

[PATCH 1/7] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

2015-11-19 Thread Tejun Heo
cgroup_is_descendant() currently walks up the hierarchy and compares each ancestor to the cgroup in question. While enough for cgroup core usages, this can't be used in hot paths to test cgroup membership. This patch adds cgroup->ancestor_ids[] which records the IDs of all ancestors including

[PATCH net 1/1] tipc: correct settings of broadcast link state

2015-11-19 Thread Jon Maloy
Since commit 5266698661401afc5e ("tipc: let broadcast packet reception use new link receive function") the broadcast send link state was meant to always be set to LINK_ESTABLISHED, since we don't need this link to follow the regular link FSM rules. It was also the intention that this state anyway

[PATCH v2 iptables] libxt_cgroup2: add support for cgroup2 path matching

2015-11-19 Thread Tejun Heo
This patch adds the extension for the xt_cgroup2 which matches packets based on the v2 cgroup path of the associated socket. v2: cgroup2_match->userspacesize and ->save and man page updated as per Jan. Signed-off-by: Tejun Heo Cc: Daniel Borkmann Cc:

[PATCH iptables] libxt_cgroup: improve wording in the man page

2015-11-19 Thread Tejun Heo
Replace "disadviced" with "not advised" as suggested by Jan. Signed-off-by: Tejun Heo Cc: Daniel Borkmann Cc: Jan Engelhardt --- extensions/libxt_cgroup.man |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---

[PATCH 1/3 v2] dl2k: Handle memory allocation errors in alloc_list

2015-11-19 Thread Ondrej Zary
If memory allocation fails in alloc_list(), free the already allocated memory and return -ENOMEM. In rio_open(), call alloc_list() first and abort if it fails. Move HW access (set RFDListPtr) out ot alloc_list(). Signed-off-by: Ondrej Zary ---

[PATCH 2/3] dl2k: Reorder and cleanup initialization

2015-11-19 Thread Ondrej Zary
Move HW init and stop into separate functions. Request IRQ only after the HW has been reset (so interrupts are disabled and no stale interrupts are pending). Signed-off-by: Ondrej Zary --- drivers/net/ethernet/dlink/dl2k.c | 95 ++---

[PATCH 3/3 v3] dl2k: Implement suspend

2015-11-19 Thread Ondrej Zary
Add suspend/resume support to dl2k driver. This requires RX/TX rings to be reset so split out the required functionality from alloc_list() into new rio_reset_ring(). Tested on Asus NX1101 (IP1000A) and D-Link DGE-550T (DL-2000). Signed-off-by: Ondrej Zary ---

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread David Miller
From: Tom Herbert Date: Thu, 19 Nov 2015 09:38:37 -0800 > 1) We need transparency. If a third party kills a TCP connection then > the application should be informed of specifically that. This seems > easy enough to just pick an appropriate error number as I suggested.

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Alexei Starovoitov
On Thu, Nov 19, 2015 at 07:19:24PM +0100, Hannes Frederic Sowa wrote: > On Thu, Nov 19, 2015, at 11:56, Daniel Borkmann wrote: > > Add a handler for show_fdinfo() to be used by the anon-inodes > > backend for eBPF maps, and dump the map specification there. Not > > only useful for admins, but also

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Alexei Starovoitov
On Thu, Nov 19, 2015 at 07:36:10PM +0100, Daniel Borkmann wrote: > On 11/19/2015 07:19 PM, Hannes Frederic Sowa wrote: > >On Thu, Nov 19, 2015, at 11:56, Daniel Borkmann wrote: > >>Add a handler for show_fdinfo() to be used by the anon-inodes > >>backend for eBPF maps, and dump the map

[PATCH net-next 2/8] tipc: small cleanup of function tipc_node_check_state()

2015-11-19 Thread Jon Maloy
The function tipc_node_check_state() contains the core logics for handling link synchronization and failover. For this reason, it is important to keep it as comprehensible as possible. In this commit, we make three small cleanups. 1) If the node is in state SELF_DOWN_PEER_LEAVING and the

[PATCH net-next 5/8] tipc: convert node lock to rwlock

2015-11-19 Thread Jon Maloy
According to the node FSM a node in state SELF_UP_PEER_UP cannot change state inside a lock context, except when a TUNNEL_PROTOCOL (SYNCH or FAILOVER) packet arrives. However, the node's individual links may still change state. Since each link now is protected by its own spinlock, we finally have

[PATCH net-next 0/8] tipc: some cleanups and improvements

2015-11-19 Thread Jon Maloy
This series mostly contains cleanups and cosmetic code changes. The only real functional change is in #4 and #5, where we change the locking structure for nodes and links in order to permit full concurrency between links working in parallel on different interfaces. Since the groundwork for this

[PATCH net-next 6/8] tipc: narrow down exposure of struct tipc_node

2015-11-19 Thread Jon Maloy
In our effort to have less code and include dependencies between entities such as node, link and bearer, we try to narrow down the exposed interface towards the node as much as possible. In this commit, we move the definition of struct tipc_node, along with many of its associated function

[PATCH net-next 0/8] tipc: some cleanups and improvements

2015-11-19 Thread Jon Maloy
This series mostly contains cleanups and cosmetic code changes. The only real functional change is in #3 and #4, where we change the locking structure for nodes and links in order to permit full concurrency between links working in parallel on different interfaces. Since the groundwork for this

[PATCH net-next 1/8] tipc: move linearization of buffers to generic code

2015-11-19 Thread Jon Maloy
In commit 5cbb28a4bf65c7e4 ("tipc: linearize arriving NAME_DISTR and LINK_PROTO buffers") we added linearization of NAME_DISTRIBUTOR, LINK_PROTOCOL/RESET and LINK_PROTOCOL/ACTIVATE to the function tipc_udp_recv(). The location of the change was selected in order to make the commit easily appliable

[PATCH net-next] net: IPv6 fib lookup tracepoint

2015-11-19 Thread David Ahern
Add tracepoint to show fib6 table lookups and result. Signed-off-by: David Ahern --- include/trace/events/fib6.h | 76 + net/core/net-traces.c | 4 +++ net/ipv6/route.c| 10 ++ 3 files changed, 90

[PATCH net-next 2/2] net: Add support for vrf-global TCP servers

2015-11-19 Thread David Ahern
Allow a process to have a "VRF-global" listen socket. In this case the listen socket is not bound to a VRF device but child sockets derived from it are bound to the VRF device the original packet was received on. This avoids the need to replicate services or create additional listen sockets as VRF

[PATCH V3 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem

2015-11-19 Thread Salil Mehta
This patchset adds support of Hisilicon Hip06 SoC to the existing HNS ethernet driver. The changes in the driver are mainly due to changes in the DMA descriptor provided by the Hip06 ethernet hardware. These changes need to co-exist with already present Hip05 DMA descriptor and its operating

Re: [PATCH] phylib: Make PHYs children of their MDIO bus, not the bus' parent.

2015-11-19 Thread Sergei Shtylyov
Hello. On 11/20/2015 12:06 AM, Andrew Lunn wrote: From: David Daney commit 18ee49ddb0d2 ("phylib: rename mii_bus::dev to mii_bus::parent") changed the parent of PHY devices from the bus to the bus parent. Then, commit 4dea547fef1b ("phylib: rework to prepare for OF

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue (w/ Fixes:)

2015-11-19 Thread Rainer Weikusat
Rainer Weikusat writes: > Rainer Weikusat writes: > > [...] > >> The basic options would be >> >> - return EAGAIN even if sending became possible (Jason's most >> recent suggestions) >> >> - retry

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Lorenzo Colitti
On Thu, Nov 19, 2015 at 2:53 PM, David Miller wrote: > What I object to is userspace making reachability decisions, not > whether SOCK_DESTROY closes the socket in one way or the other. To be fair: userspace already makes reachability decisions. Using iptables and ip rules,

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Maciej Żenczykowski
>> In this case, userspace knows that that app's connections are now >> unusable because it configured an iptables rule to block them. The >> kernel doesn't really know until it the time comes to send a packet, >> and maybe not even then. > > Netfilter could perform signalling on skb->sk when it

Re: [PATCH] net: tulip: turn compile-time warning into dev_warn()

2015-11-19 Thread Grant Grundler
On Thu, Nov 19, 2015 at 3:50 PM, Francois Romieu wrote: > Grant Grundler : > [...] >> Some additional minor refactoring of the code could convert this into >> a "multi-bus driver" if there is any system that could incorporate >> both a platform

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Tom Herbert
On Thu, Nov 19, 2015 at 2:33 PM, Eric Dumazet wrote: > On Thu, 2015-11-19 at 14:14 -0800, Tom Herbert wrote: >> On Thu, Nov 19, 2015 at 2:07 PM, Eric Dumazet wrote: >> > On Thu, 2015-11-19 at 13:53 -0800, Tom Herbert wrote: >> > >> >> That covers

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Lorenzo Colitti
On Fri, Nov 20, 2015 at 8:02 AM, Hannes Frederic Sowa wrote: > On Thu, Nov 19, 2015, at 19:27, Hannes Frederic Sowa wrote: >> I will research the semantics behind tcpdrop: >> > >

Re: [PATCH] net: tulip: turn compile-time warning into dev_warn()

2015-11-19 Thread Francois Romieu
Grant Grundler : [...] > Some additional minor refactoring of the code could convert this into > a "multi-bus driver" if there is any system that could incorporate > both a platform device and a PCI device. > > I expect the conversion to DMA API to be straight forward as

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Maciej Żenczykowski
> Ack. With emphasis of *application*. :) The problem with application anything is that changing apps is outright impossible. There are far too many of them written by far too many people. And until you fix them all (which is infeasible) and roll those changes out (unlikely) users will continue

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Lorenzo Colitti
On Fri, Nov 20, 2015 at 9:04 AM, Tom Herbert wrote: > or to start killing connections based on some arbitrary policy when > under memory pressure. You mean like the OOM killer starts killing entire processes based on some arbitrary policy when under memory pressure? :-) --

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Lorenzo Colitti
On Fri, Nov 20, 2015 at 9:55 AM, David Miller wrote: > Netfilter could perform signalling on skb->sk when it drops packets. > > Your example is actually a argument _for_ doing this in the kernel. > > :-) Well, I did say that was a simple example. :-) How do I make the VPN

[PATCH] net: tulip: update MAINTAINER status to Orphan

2015-11-19 Thread Grant Grundler
From: Grant Grundler I haven't had any PCI tulip HW for the past ~5 years. I have been reviewing tulip patches and can continue doing that. Signed-off-by: Grant Grundler --- I'm also proposing to add linux-parisc to the list since AFAIK,

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue (w/ Fixes:)

2015-11-19 Thread Rainer Weikusat
An AF_UNIX datagram socket being the client in an n:1 association with some server socket is only allowed to send messages to the server if the receive queue of this socket contains at most sk_max_ack_backlog datagrams. This implies that prospective writers might be forced to go to sleep despite

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Maciej Żenczykowski
> Having comments like "look, just implement application keepalives" is > not going to work [1][2]. This is terrible, and show lack of > understanding of the problem. We are not dealing with DC communications > here. (I wish !) There's a 3rd reason: keepalives (tcp or application) are actually

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Tom Herbert
On Thu, Nov 19, 2015 at 4:09 PM, Lorenzo Colitti wrote: > On Fri, Nov 20, 2015 at 9:04 AM, Tom Herbert wrote: >> or to start killing connections based on some arbitrary policy when >> under memory pressure. > > You mean like the OOM killer starts killing

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread David Miller
From: Lorenzo Colitti Date: Fri, 20 Nov 2015 09:19:25 +0900 > In this case, userspace knows that that app's connections are now > unusable because it configured an iptables rule to block them. The > kernel doesn't really know until it the time comes to send a packet, > and

[PATCH net-next] net: avoid NULL deref in napi_get_frags()

2015-11-19 Thread Eric Dumazet
From: Eric Dumazet napi_alloc_skb() can return NULL. We should not crash should this happen. Fixes: 93f93a440415 ("net: move skb_mark_napi_id() into core networking stack") Signed-off-by: Eric Dumazet --- net/core/dev.c |6 -- 1 file changed,

Re: [PATCH net-next] net: remove useless check in napi_gro_frags()

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 21:20 +0100, Bjørn Mork wrote: > Eric Dumazet writes: > > > How many times should we crash before napi_frags_skb() returns NULL ? > .. > > return NULL; > > Huh? Now I'm lost here, too. Well, Ethernet drivers should not

[PATCH V3 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS

2015-11-19 Thread Salil Mehta
From: Salil This patch adds the support of ethtool TSO option to V1 patch, meant to add support of Hip06 SoC to HNS Signed-off-by: Salil Mehta Signed-off-by: lisheng --- drivers/net/ethernet/hisilicon/hns/hns_enet.c |

[PATCH V3 net-next 5/5] net:hns: Add the init code to disable Hip06 "Hardware VLAN assist"

2015-11-19 Thread Salil Mehta
This patch adds the initializzation code to disable the hardware vlan support for VLAN Tag stripping by default for now. Proper support of "hardware VLAN assitance" feature would soon come in the next coming patches. Signed-off-by: Salil Mehta ---

Re: [PATCH] phylib: Make PHYs children of their MDIO bus, not the bus' parent.

2015-11-19 Thread Sergei Shtylyov
Hello. On 08/22/2015 02:16 AM, David Daney wrote: From: David Daney commit 18ee49ddb0d2 ("phylib: rename mii_bus::dev to mii_bus::parent") changed the parent of PHY devices from the bus to the bus parent. Then, commit 4dea547fef1b ("phylib: rework to prepare for OF

Re: [PATCH net-next] net: remove useless check in napi_gro_frags()

2015-11-19 Thread Aaron Conole
Eric Dumazet writes: > On Thu, 2015-11-19 at 21:20 +0100, Bjørn Mork wrote: >> Eric Dumazet writes: >> >> > How many times should we crash before napi_frags_skb() returns NULL ? >> .. >> > return NULL; >> >> Huh? Now I'm

Re: [PATCH] phylib: Make PHYs children of their MDIO bus, not the bus' parent.

2015-11-19 Thread Andrew Lunn
On Thu, Nov 19, 2015 at 11:51:37PM +0300, Sergei Shtylyov wrote: > Hello. > > On 08/22/2015 02:16 AM, David Daney wrote: > > >From: David Daney > > > >commit 18ee49ddb0d2 ("phylib: rename mii_bus::dev to mii_bus::parent") > >changed the parent of PHY devices from the bus

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 19:32, Alexei Starovoitov wrote: > On Thu, Nov 19, 2015 at 07:19:24PM +0100, Hannes Frederic Sowa wrote: > > On Thu, Nov 19, 2015, at 11:56, Daniel Borkmann wrote: > > > Add a handler for show_fdinfo() to be used by the anon-inodes > > > backend for eBPF maps, and dump the

[PATCH V3 net-next 2/5] net:hns: Add Hip06 "RSS(Receive Side Scaling)" support to HNS Driver

2015-11-19 Thread Salil Mehta
This patch adds the support of "RSS (Receive Side Scaling)" feature provided by the Hip06 ethernet hardware to the HNS ethernet driver. This feature helps in distributing the different flows (mapped as hash by hardware using Toeplitz Hash) to different Queues asssociated with the processor cores.

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Tom Herbert
> We (TCP stack) compete with QUIC, based on UDP, which has no issues like > that. We need to allow TCP sessions being signaled of a non temporary > network disruption. > Eric, can you provide some detail on this statement? I don't understand why QUIC wouldn't have this same issue. Seems like it

Re: [PATCH RFT v2] sh_eth: fix kernel oops in skb_put()

2015-11-19 Thread Sergei Shtylyov
Hello. On 10/27/2015 01:52 AM, Yasushi SHOJI wrote: In a low memory situation the following kernel oops occurs: Unable to handle kernel NULL pointer dereference at virtual address 0050 pgd = 8490c000 [0050] *pgd=4651e831, *pte=, *ppte= Internal error: Oops: 17 [#1]

[PATCH 2/7] kernfs: implement kernfs_walk_and_get()

2015-11-19 Thread Tejun Heo
Implement kernfs_walk_and_get() which is similar to kernfs_find_and_get() but can walk a path instead of just a name. v2: Use strlcpy() instead of strlen() + memcpy() as suggested by David. Signed-off-by: Tejun Heo Cc: Greg Kroah-Hartman Cc:

[PATCH 6/7] sock, cgroup: add sock->sk_cgroup

2015-11-19 Thread Tejun Heo
In cgroup v1, dealing with cgroup membership was difficult because the number of membership associations was unbound. As a result, cgroup v1 grew several controllers whose primary purpose is either tagging membership or pull in configuration knobs from other subsystems so that cgroup membership

[PATCH 4/7] netprio_cgroup: limit the maximum css->id to USHRT_MAX

2015-11-19 Thread Tejun Heo
netprio builds per-netdev contiguous priomap array which is indexed by css->id. The array is allocated using kzalloc() effectively limiting the maximum ID supported to some thousand range. This patch caps the maximum supported css->id to USHRT_MAX which should be way above what is actually

[PATCH net-next 3/8] tipc: reduce code dependency between binding table and node layer

2015-11-19 Thread Jon Maloy
The file name_distr.c currently contains three functions, named_cluster_distribute(), tipc_publ_subcscribe() and tipc_publ_unsubscribe() that all directly access fields in struct tipc_node. We want to eliminate such dependencies, so we move those functions to the file node.c and rename them to

Re: [PATCH net-next] net: remove useless check in napi_gro_frags()

2015-11-19 Thread Bjørn Mork
Eric Dumazet writes: > How many times should we crash before napi_frags_skb() returns NULL ? .. > return NULL; Huh? Now I'm lost here, too. Bjørn -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to

[PATCH net-next 1/2] net: l3mdev: Add master device lookup by index

2015-11-19 Thread David Ahern
Add helper to lookup master index given a device index. Signed-off-by: David Ahern --- include/net/l3mdev.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h index 774d85b2d5d9..786226f8e77b 100644

Re: [PATCH] net: tulip: turn compile-time warning into dev_warn()

2015-11-19 Thread Florian Fainelli
On 19/11/15 04:26, Will Deacon wrote: > On Thu, Nov 19, 2015 at 11:42:26AM +0100, Arnd Bergmann wrote: >> The tulip driver causes annoying build-time warnings for allmodconfig >> builds for all recent architectures: >> >> dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture >>

[PATCH V3 net-next 3/5] net:hns: Add Hip06 "TSO(TCP Segment Offload)" support HNS Driver

2015-11-19 Thread Salil Mehta
This patch adds the support of "TSO (TCP Segment Offload)" feature provided by the Hip06 ethernet hardware to the HNS ethernet driver. Enabling this feature would help offload the TCP Segmentation process to the Hip06 ethernet hardware. This eventually would help in saving precious cpu cycles.

[PATCH iproute2 2/2] Add missing include

2015-11-19 Thread Thomas Petazzoni
The u_intXX_t types are defined in , so it should be included before using those types. Otherwise, with certain C libraries, the build fails with: In file included from ../include/iptables.h:4:0, from m_ipt.c:18: ../include/iptables_common.h:47:16: error: unknown type name

[PATCH iproute2 0/2] Build fixes for the musl C library

2015-11-19 Thread Thomas Petazzoni
Hello, The following two patches fixing build issues that occur when trying to build iproute2 with the musl C library (http://musl-libc.org). Thanks, Thomas Thomas Petazzoni (2): Avoid in6_addr redefinition Add missing include include/iptables_common.h| 2 ++

[PATCH iproute2 1/2] Avoid in6_addr redefinition

2015-11-19 Thread Thomas Petazzoni
Due to both and being included, the in6_addr is being redefined: once from the C library headers and once from the kernel headers. This causes some build failures with for example the musl C library: In file included from ../include/linux/xfrm.h:4:0, from xfrm.h:29,

Re: [PATCH net-next] net: remove useless check in napi_gro_frags()

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 11:54 -0800, Alexei Starovoitov wrote: > On Thu, Nov 19, 2015 at 11:42:50AM -0800, Eric Dumazet wrote: > > From: Eric Dumazet > > > > Checking if skb is NULL in napi_gro_frags() is too late. > > > > If skb was NULL, we would crash earlier in

Re: [PATCH] net: tulip: turn compile-time warning into dev_warn()

2015-11-19 Thread Grant Grundler
On Thu, Nov 19, 2015 at 4:26 AM, Will Deacon wrote: > On Thu, Nov 19, 2015 at 11:42:26AM +0100, Arnd Bergmann wrote: >> The tulip driver causes annoying build-time warnings for allmodconfig >> builds for all recent architectures: >> >> dec/tulip/winbond-840.c:910:2: warning:

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 22:41, Eric Dumazet wrote: > On Thu, 2015-11-19 at 13:29 -0800, Tom Herbert wrote: > > > We (TCP stack) compete with QUIC, based on UDP, which has no issues like > > > that. We need to allow TCP sessions being signaled of a non temporary > > > network disruption. > > > >

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Tom Herbert
On Thu, Nov 19, 2015 at 1:41 PM, Eric Dumazet wrote: > On Thu, 2015-11-19 at 13:29 -0800, Tom Herbert wrote: >> > We (TCP stack) compete with QUIC, based on UDP, which has no issues like >> > that. We need to allow TCP sessions being signaled of a non temporary >> >

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 22:53 +0100, Hannes Frederic Sowa wrote: > > You don't steer QUIC source addresses at all? I think most networking > failures are of transient nature thus the kernel routing subsystem is > not aware of link quality and packets get lost anyway e.g. in the air? > Thus binding

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Hannes Frederic Sowa
On Thu, Nov 19, 2015, at 23:04, Eric Dumazet wrote: > On Thu, 2015-11-19 at 22:53 +0100, Hannes Frederic Sowa wrote: > > > > > You don't steer QUIC source addresses at all? I think most networking > > failures are of transient nature thus the kernel routing subsystem is > > not aware of link

Re: [PATCH v2 23/27] rt2x00: move under ralink vendor directory

2015-11-19 Thread Jakub Kicinski
On Wed, 18 Nov 2015 16:46:02 +0200, Kalle Valo wrote: > Part of reorganising wireless drivers directory and Kconfig. > > Signed-off-by: Kalle Valo For Ralink you could probably drop the rt2x00 directory. RaLink Tech. doesn't exist any more and rt2x00 contains drivers for

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-19 Thread Eric Dumazet
On Thu, 2015-11-19 at 23:09 +0100, Hannes Frederic Sowa wrote: > My point is the "eventually" and the very much increased latency until > the kernel learns about new better source addresses it has available. I > would monitor link quality over time and decide source address based on > this on the

  1   2   >