[PATCH net-next V2 9/9] liquidio CN23XX: fix for new check patch errors

2016-10-19 Thread Raghu Vatsavayi
New checkpatch script shows some errors with pre-existing driver. This patch provides fix for those errors. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla

[PATCH net-next V2 6/9] liquidio CN23XX: device states

2016-10-19 Thread Raghu Vatsavayi
Cleaned up resource leaks during destroy resources by introducing more device states. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla

[PATCH net-next V2 8/9] liquidio CN23XX: copyrights changes and alignment

2016-10-19 Thread Raghu Vatsavayi
Updated copyrights comments and also changed some other comments alignments. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by:

[PATCH net-next V2 7/9] liquidio CN23XX: code cleanup

2016-10-19 Thread Raghu Vatsavayi
Cleaned up unnecessary comments and added some minor macros. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas

[PATCH net-next V2 5/9] liquidio CN23XX: VF related operations

2016-10-19 Thread Raghu Vatsavayi
Adds support for VF related operations like mac address vlan and link changes. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by:

[PATCH net-next V2 4/9] liquidio CN23XX: mailbox interrupt processing

2016-10-19 Thread Raghu Vatsavayi
Adds support for mailbox interrupt processing of various commands. Signed-off-by: Raghu Vatsavayi Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas

Re: [PATCH net-next v4 2/3] udp: implement memory accounting helpers

2016-10-19 Thread Eric Dumazet
On Wed, 2016-10-19 at 14:47 +0200, Paolo Abeni wrote: > Avoid using the generic helpers. > Adds a new spinlock_t to the udp_sock structure and use > it to protect the memory accounting operation, both on > enqueue and on dequeue. > > On dequeue perform partial memory reclaiming, trying to > leave

[PATCH net-next] tcp: relax listening_hash operations

2016-10-19 Thread Eric Dumazet
From: Eric Dumazet softirq handlers use RCU protection to lookup listeners, and write operations all happen from process context. We do not need to block BH for dump operations. Also SYN_RECV since request sockets are stored in the ehash table : 1) inet_diag_dump_icsk()

Re: Intel Wireless 7260 Microcode SW error detected

2016-10-19 Thread Luca Coelho
Hi Tibor, On Sun, 2016-10-16 at 20:08 +0200, Billes Tibor wrote: > I have Lenovo laptop with an Intel Wireless 7260 wifi module and the > latest stable kernel 4.8.1. I was playing a movie from an sshfs mounted > file system, when the movie just froze and my network stopped working. > Dmesg

Re: [PATCH net-next 6/6] net: use core MTU range checking in misc drivers

2016-10-19 Thread Jarod Wilson
On Thu, Oct 20, 2016 at 12:38:46AM +0200, Stefan Richter wrote: > On Oct 19 Sabrina Dubroca wrote: > > 2016-10-18, 22:33:33 -0400, Jarod Wilson wrote: > > [...] > > > diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c > > > index 309311b..b5f125c 100644 > > > --- a/drivers/firewire/net.c

Re: [PATCH v4 net-next 1/7] ipv6: Fix Makefile conditional to use CONFIG_INET

2016-10-19 Thread Tom Herbert
Dave, Please don't apply this. It's like whack-a-mole trying to resolve all the dependencies. I'll resubmit the series without this. Tom On Wed, Oct 19, 2016 at 4:03 PM, Tom Herbert wrote: > ipv6 directory was being built based on CONFIG_NET not CONFIG_INET. > >

Re: [PATCH net-next v4 3/3] udp: use it's own memory accounting schema

2016-10-19 Thread Eric Dumazet
On Wed, 2016-10-19 at 14:47 +0200, Paolo Abeni wrote: > Completely avoid default sock memory accounting and replace it > with udp-specific accounting. > > Since the new memory accounting model encapsulates completely > the required locking, remove the socket lock on both enqueue and > dequeue,

Re: [RFC 2/6] qed: Add iSCSI out of order packet handling.

2016-10-19 Thread Arun Easi
On Wed, 19 Oct 2016, 2:39am, Johannes Thumshirn wrote: > On Wed, Oct 19, 2016 at 01:01:09AM -0400, manish.rangan...@cavium.com wrote: > > From: Yuval Mintz > > > > This patch adds out of order packet handling for hardware offloaded > > iSCSI. Out of order packet handling

Re: [PATCH net 0/5] net/ncsi: More bug fixes

2016-10-19 Thread Gavin Shan
On Fri, Oct 14, 2016 at 01:53:29PM +1100, Gavin Shan wrote: >This series fixes 2 issues that were found during NCSI's availability >testing on BCM5718 and improves HNCDSC AEN handler: > > * PATCH[1] and PATCH[2] refactors the code so that minimal code > change is put to PATCH[3]. > *

[PATCH v2 net 1/4] net/ncsi: Avoid if statements in ncsi_suspend_channel()

2016-10-19 Thread Gavin Shan
There are several if/else statements in the state machine implemented by switch/case in ncsi_suspend_channel() to avoid duplicated code. It makes the code a bit hard to be understood. This drops if/else statements in ncsi_suspend_channel() to improve the code readability as Joel Stanley

[PATCH v2 net 2/4] net/ncsi: Fix stale link state of inactive channels on failover

2016-10-19 Thread Gavin Shan
The issue was found on BCM5718 which has two NCSI channels in one package: C0 and C1. Both of them are connected to different LANs, means they are in link-up state and C0 is chosen as the active one until resetting BCM5718 happens as below. Resetting BCM5718 results in LSC (Link State Change) AEN

[PATCH v2 net 4/4] net/ncsi: Improve HNCDSC AEN handler

2016-10-19 Thread Gavin Shan
This improves AEN handler for Host Network Controller Driver Status Change (HNCDSC): * The channel's lock should be hold when accessing its state. * Do failover when host driver isn't ready. * Configure channel when host driver becomes ready. Signed-off-by: Gavin Shan

[PATCH v2 net 3/4] net/ncsi: Choose hot channel as active one if necessary

2016-10-19 Thread Gavin Shan
The issue was found on BCM5718 which has two NCSI channels in one package: C0 and C1. C0 is in link-up state while C1 is in link-down state. C0 is chosen as active channel until unplugging and plugging C0's cable: On unplugging C0's cable, LSC (Link State Change) AEN packet received on C0 to

[PATCH v2 net 0/4] net/ncsi: More bug fixes

2016-10-19 Thread Gavin Shan
This series fixes 2 issues that were found during NCSI's availability testing on BCM5718 and improves HNCDSC AEN handler: * PATCH[1] refactors the code so that minimal code change is put to PATCH[2]. * PATCH[2] fixes the NCSI channel's stale link state before doing failover. *

Re: [RFC 1/6] qed: Add support for hardware offloaded iSCSI.

2016-10-19 Thread Arun Easi
Thanks Johannes for the review, please see my response below. On Wed, 19 Oct 2016, 2:09am, Johannes Thumshirn wrote: > Hi Manish, > > Some initital comments > > On Wed, Oct 19, 2016 at 01:01:08AM -0400, manish.rangan...@cavium.com wrote: > > From: Yuval Mintz > > > >

linux-next: manual merge of the net-next tree with the net tree

2016-10-19 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got conflicts in: include/linux/netdevice.h net/core/dev.c between commit: e4961b076885 ("net: core: Correctly iterate over lower adjacency list") from the net tree and commit: 1a3f060c1a47 ("net: Introduce new api for walking

[PATCH 1/4] kconfig: introduce the "imply" keyword

2016-10-19 Thread Nicolas Pitre
The "imply" keyword is a weak version of "select" where the target config symbol can still be turned off, avoiding those pitfalls that come with the "select" keyword. This is useful e.g. with multiple drivers that want to indicate their ability to hook into a given subsystem while still being

[PATCH 3/4] ptp_clock: allow for it to be optional

2016-10-19 Thread Nicolas Pitre
In order to break the hard dependency between the PTP clock subsystem and ethernet drivers capable of being clock providers, this patch provides simple PTP stub functions to allow linkage of those drivers into the kernel even when the PTP subsystem is configured out. Drivers must be ready to

[PATCH 2/4] kconfig: re-generate *.c_shipped files after previous change

2016-10-19 Thread Nicolas Pitre
Signed-off-by: Nicolas Pitre --- scripts/kconfig/zconf.hash.c_shipped | 30 +- scripts/kconfig/zconf.tab.c_shipped | 1581 -- 2 files changed, 753 insertions(+), 858 deletions(-) diff --git a/scripts/kconfig/zconf.hash.c_shipped

[PATCH 0/4] make POSIX timers optional with some Kconfig help

2016-10-19 Thread Nicolas Pitre
Many embedded systems don't need the full POSIX timer support. Configuring them out provides a nice kernel image size reduction. When POSIX timers are configured out, the PTP clock subsystem should be left out as well. However a bunch of ethernet drivers currently *select* the later in their

[PATCH 4/4] posix-timers: make it configurable

2016-10-19 Thread Nicolas Pitre
Many embedded systems typically don't need them. This removes about 22KB from the kernel binary size when configured out. Corresponding syscalls are routed to a stub logging the attempt to use those syscalls which should be enough of a clue if they were disabled without proper consideration.

Re: [Patch net] ipv6: fix a potential deadlock in do_ipv6_setsockopt()

2016-10-19 Thread Cong Wang
On Wed, Oct 19, 2016 at 4:38 PM, Eric Dumazet wrote: >> diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c >> index 46ad699..b8c8d20 100644 >> --- a/net/ipv6/af_inet6.c >> +++ b/net/ipv6/af_inet6.c >> @@ -414,7 +414,9 @@ int inet6_release(struct socket *sock) >>

Re: [Patch net] ipv6: fix a potential deadlock in do_ipv6_setsockopt()

2016-10-19 Thread Eric Dumazet
On Wed, 2016-10-19 at 11:20 -0700, Cong Wang wrote: > Baozeng reported this deadlock case: > >CPU0CPU1 > > lock([ 165.136033] sk_lock-AF_INET6); >lock([ 165.136033] rtnl_mutex); >

Re: [PATCH net-next 6/6] net: use core MTU range checking in misc drivers

2016-10-19 Thread Stefan Richter
On Oct 19 Sabrina Dubroca wrote: > 2016-10-18, 22:33:33 -0400, Jarod Wilson wrote: > [...] > > diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c > > index 309311b..b5f125c 100644 > > --- a/drivers/firewire/net.c > > +++ b/drivers/firewire/net.c > > @@ -1349,15 +1349,6 @@ static

[PATCH v4 net-next 4/7] udp: UDP flow dissector

2016-10-19 Thread Tom Herbert
Add infrastructure for performing per protocol flow dissection and support flow dissection in UDP payloads (e.g. flow dissection on a UDP encapsulated tunnel. The per protocol flow dissector is called by flow_dissect function in the offload_callbacks of a protocol. The arguments of this function

[PATCH v4 net-next 6/7] udp: UDP tunnel flow dissection infrastructure

2016-10-19 Thread Tom Herbert
Add infrastructure to allow UDP tunnels to setup flow dissecion. Signed-off-by: Tom Herbert --- include/net/udp_tunnel.h | 5 + net/ipv4/udp_tunnel.c| 5 + 2 files changed, 10 insertions(+) diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h index

[PATCH v4 net-next 2/7] flow_dissector: Limit processing of next encaps and extensions

2016-10-19 Thread Tom Herbert
Flow dissector does not limit the number of encapsulated packets or IPv6 header extensions that will be processed. This could easily be suceptible to DOS attack-- for instance a 1500 byte packet could contain 75 IPIP headers. This patch places limits on the number of encapsulations and IPv6

[PATCH v4 net-next 0/7] udp: Flow dissection for tunnels

2016-10-19 Thread Tom Herbert
Now that we have a means to perform a UDP socket lookup without taking a reference, it is feasible to have flow dissector crack open UDP encapsulated packets. Generally, we would expect that the UDP source port or the flow label in IPv6 would contain enough entropy about the encapsulated flow.

[PATCH v4 net-next 7/7] fou: Support flow dissection

2016-10-19 Thread Tom Herbert
This patch performs flow dissection for GUE and FOU. This is an optional feature on the receiver and is set by FOU_ATTR_DEEP_HASH netlink configuration. When enable the UDP socket flow_dissect function is set to fou_flow_dissect or gue_flow_dissect as appropriate. These functions return

[PATCH v4 net-next 5/7] udp: Add UDP flow dissection functions to IPv4 and IPv6

2016-10-19 Thread Tom Herbert
Add per protocol offload callbacks for flow_dissect to UDP for IPv4 and IPv6. The callback functions extract the port number information and with the packet addresses (given in an argument with type flow_dissector_key_addrs) it performs a lookup on the UDP socket. If a socket is found and

Re: [RFC 1/6] qed: Add support for hardware offloaded iSCSI.

2016-10-19 Thread Arun Easi
Thanks Hannes for the review. Please see my comments inline.. On Wed, 19 Oct 2016, 12:31am, Hannes Reinecke wrote: > On 10/19/2016 07:01 AM, manish.rangan...@cavium.com wrote: > > From: Yuval Mintz > > > > This adds the backbone required for the various HW

[PATCH v4 net-next 3/7] udp: Add socket lookup functions with noref

2016-10-19 Thread Tom Herbert
Create udp4_lib_lookup_noref and udp6_lib_lookup_noref. These perfrom a socket lookup on addresses and ports without taking a reference. Signed-off-by: Tom Herbert --- include/net/udp.h | 8 net/ipv4/udp.c| 8 net/ipv6/udp.c| 10 ++ 3

[PATCH v4 net-next 1/7] ipv6: Fix Makefile conditional to use CONFIG_INET

2016-10-19 Thread Tom Herbert
ipv6 directory was being built based on CONFIG_NET not CONFIG_INET. Signed-off-by: Tom Herbert --- drivers/net/usb/cdc_mbim.c | 4 include/net/ipv6.h | 15 +++ include/net/net_namespace.h | 2 ++ net/Makefile| 2 +- 4 files

Re: [RFC v3 06/22] landlock: Add LSM hooks

2016-10-19 Thread Mickaël Salaün
On 19/10/2016 17:19, Thomas Graf wrote: > On 09/14/16 at 09:23am, Mickaël Salaün wrote: >> diff --git a/include/linux/bpf.h b/include/linux/bpf.h >> index 9aa01d9d3d80..36c3e482239c 100644 >> --- a/include/linux/bpf.h >> +++ b/include/linux/bpf.h >> @@ -85,6 +85,8 @@ enum bpf_arg_type { >> >>

Re: [PATCH net-next 5/6] net: use core MTU range checking in virt drivers

2016-10-19 Thread Shrikrishna Khare
On Wed, 19 Oct 2016, Jarod Wilson wrote: > hyperv_net: > - set min/max_mtu > > virtio_net: > - set min/max_mtu > - remove virtnet_change_mtu > > vmxnet3: > - set min/max_mtu > > CC: netdev@vger.kernel.org > CC: virtualizat...@lists.linux-foundation.org > CC: "K. Y. Srinivasan"

[RFC net 1/3] net: bridge: add helper to offload ageing time

2016-10-19 Thread Vivien Didelot
The SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME switchdev attr is actually set when initializing a bridge port, and when configuring the bridge ageing time from ioctl/netlink/sysfs. Add a __set_ageing_time helper to offload the ageing time to physical switches, and add the SWITCHDEV_F_DEFER flag since

[RFC net 2/3] net: bridge: add helper to set topology change

2016-10-19 Thread Vivien Didelot
Add a __br_set_topology_change helper to set the topology change value. This can be later extended to add actions when the topology change flag is set or cleared. Signed-off-by: Vivien Didelot --- net/bridge/br_private_stp.h | 1 + net/bridge/br_stp.c

[RFC net 0/3] net: bridge: fast ageing on topology change

2016-10-19 Thread Vivien Didelot
802.1D [1] specifies that the bridges in a network must use a short value to age out dynamic entries in the Filtering Database for a period, once a topology change has been communicated by the root bridge. This patchset fixes this for the in-kernel STP implementation. Once the topology change

[RFC net 3/3] net: dsa: shorten ageing time on topology change

2016-10-19 Thread Vivien Didelot
802.1D [1] specifies that the bridges must use a short value to age out dynamic entries in the Filtering Database for a period, once a topology change has been communicated by the root bridge. Add a bridge_ageing_time member in the net_bridge structure to store the bridge ageing time value

[PATCH] net: smc91x: fix neponset breakage by pxa u16 writes

2016-10-19 Thread Robert Jarzmik
The patch isolating the u16 writes for pxa assumed all machine_is_*() calls were removed, and therefore removed the mach-types.h include which provided them. Unfortunately 2 machine_is_*() remained in smc91x.c file including smc91x.h from which the include was removed, triggering the error:

[PATCH net] ila: Fix tailroom allocation of lwtstate

2016-10-19 Thread Thomas Graf
Tailroom is supposed to be of length sizeof(struct ila_lwt) but sizeof(struct ila_params) is currently allocated. This leads to the dst_cache and connected member of ila_lwt being referenced out of bounds. struct ila_lwt { struct ila_params p; struct dst_cache dst_cache;

RE: [patch net-next RFC 4/6] Introduce sample tc action

2016-10-19 Thread Yotam Gigi
>-Original Message- >From: Roopa Prabhu [mailto:ro...@cumulusnetworks.com] >Sent: Wednesday, October 19, 2016 10:33 AM >To: Yotam Gigi >Cc: Jamal Hadi Salim ; Jiri Pirko ; >netdev@vger.kernel.org; da...@davemloft.net; Ido

Re: [linux-next:master 1436/1582] drivers/net/ethernet/smsc/smc91x.c:2378:6: error: implicit declaration of function 'machine_is_assabet'

2016-10-19 Thread Robert Jarzmik
David Miller writes: > Please send me a fixup follow-on patch. > > If changes are in my tree, they are part of the permanent record > and won't be rebased out. Ok, understood, I'm on it. Thanks. -- Robert

Re: [linux-next:master 1436/1582] drivers/net/ethernet/smsc/smc91x.c:2378:6: error: implicit declaration of function 'machine_is_assabet'

2016-10-19 Thread David Miller
From: Robert Jarzmik Date: Wed, 19 Oct 2016 21:58:06 +0200 > Hi David, > > Here is a little mess I created with my former serie : >>drivers/net/ethernet/smsc/smc91x.c: In function 'smc_drv_probe': drivers/net/ethernet/smsc/smc91x.c:2378:6: error: implicit

Re: [Patch net-next 2/2] netns: avoid disabling irq for netns id

2016-10-19 Thread Cong Wang
On Wed, Oct 19, 2016 at 8:21 AM, Elad Raz wrote: > On Fri, Sep 2, 2016 at 11:12 AM, Nicolas Dichtel > wrote: >> Le 02/09/2016 à 06:53, Cong Wang a écrit : >>> We never read or change netns id in hardirq context, >>> the only place we read netns id in

Re: [linux-next:master 1436/1582] drivers/net/ethernet/smsc/smc91x.c:2378:6: error: implicit declaration of function 'machine_is_assabet'

2016-10-19 Thread Robert Jarzmik
Hi David, Here is a little mess I created with my former serie : >drivers/net/ethernet/smsc/smc91x.c: In function 'smc_drv_probe': >>> drivers/net/ethernet/smsc/smc91x.c:2378:6: error: implicit declaration of >>> function 'machine_is_assabet' [-Werror=implicit-function-declaration] > if

Re: [PATCH net-next 0/6] net: use core MTU range checking everywhere

2016-10-19 Thread Jarod Wilson
On Wed, Oct 19, 2016 at 03:10:05PM -0400, David Miller wrote: > From: Jarod Wilson > Date: Tue, 18 Oct 2016 22:33:27 -0400 > > > This stack of patches should get absolutely everything in the kernel > > converted from doing their own MTU range checking to the core MTU range > >

Re: [PATCH 0/2] Add ethtool get_ringparam and set_ringparam to cadence

2016-10-19 Thread David Miller
From: Zach Brown Date: Wed, 19 Oct 2016 09:56:56 -0500 > There are use cases like RT that would benefit from being able to tune the > macb rx/tx ring sizes. The ethtool set_ringparam function is the standard way > of doing so. > > The first patch changes the hardcoded tx/rx

Re: [PATCH -next] net: arc_emac: use dev_kfree_skb_any instead of dev_kfree_skb

2016-10-19 Thread David Miller
From: Wei Yongjun Date: Wed, 19 Oct 2016 13:47:52 + > From: Wei Yongjun > > Replace dev_kfree_skb with dev_kfree_skb_any in arc_emac_tx() > which can be called from hard irq context (netpoll) and from > other contexts. arc_emac_tx() only frees

Re: [PATCH net-next v2 0/2] openvswitch: remove unused code

2016-10-19 Thread David Miller
From: Jiri Benc Date: Wed, 19 Oct 2016 11:26:35 +0200 > Removed unused functions and unnecessary EXPORT_SYMBOLs from openvswitch. Series applied, thanks.

Re: [PATCH (net.git)] stmmac: fix and review the ptp registration.

2016-10-19 Thread David Miller
From: Giuseppe Cavallaro Date: Wed, 19 Oct 2016 09:06:41 +0200 > The commit commit 7086605a6ab5 ("stmmac: fix error check when init ptp") > breaks the procedure added by the > commit efee95f42b5d ("ptp_clock: future-proofing drivers against PTP > subsystem becoming

Re: [PATCH net-next 0/6] net: use core MTU range checking everywhere

2016-10-19 Thread David Miller
From: Jarod Wilson Date: Tue, 18 Oct 2016 22:33:27 -0400 > This stack of patches should get absolutely everything in the kernel > converted from doing their own MTU range checking to the core MTU range > checking. I'm expecting a respin of this series.

Re: [PATCH net v2] net: add recursion limit to GRO

2016-10-19 Thread Tom Herbert
On Wed, Oct 19, 2016 at 9:29 AM, Sabrina Dubroca wrote: > Currently, GRO can do unlimited recursion through the gro_receive > handlers. This was fixed for tunneling protocols by limiting tunnel GRO > to one level with encap_mark, but both VLAN and TEB still have this >

Re: [PATCH] ipv6: fix signedness of tmp_prefered_lft underflow check

2016-10-19 Thread David Miller
From: Jiri Bohac Date: Wed, 19 Oct 2016 15:16:36 +0200 > The purpose was to guard against the user updating the > temp_prefered_lft sysctl after this: > > max_desync_factor = min_t(__u32, > idev->cnf.max_desync_factor, >

Re: [PATCH] net: limit a number of namespaces which can be cleaned up concurrently

2016-10-19 Thread Andrey Vagin
On Sat, Oct 15, 2016 at 9:36 AM, Eric W. Biederman wrote: > Andrei Vagin writes: > >> On Thu, Oct 13, 2016 at 10:06:28PM -0500, Eric W. Biederman wrote: >>> Andrei Vagin writes: >>> >>> > On Thu, Oct 13, 2016 at 10:49:38AM

Re: [PATCH net-next v2 1/2] openvswitch: remove unused functions

2016-10-19 Thread Pravin Shelar
On Wed, Oct 19, 2016 at 2:26 AM, Jiri Benc wrote: > ovs_vport_deferred_free is not used anywhere. It's the only caller of > free_vport_rcu thus this one can be removed, too. > > Signed-off-by: Jiri Benc Acked-by: Pravin B Shelar

Re: [PATCH net-next v2 2/2] openvswitch: remove unnecessary EXPORT_SYMBOLs

2016-10-19 Thread Pravin Shelar
On Wed, Oct 19, 2016 at 2:26 AM, Jiri Benc wrote: > Some symbols exported to other modules are really used only by > openvswitch.ko. Remove the exports. > > Tested by loading all 4 openvswitch modules, nothing breaks. > > Signed-off-by: Jiri Benc Acked-by:

[Patch net] ipv6: fix a potential deadlock in do_ipv6_setsockopt()

2016-10-19 Thread Cong Wang
Baozeng reported this deadlock case: CPU0CPU1 lock([ 165.136033] sk_lock-AF_INET6); lock([ 165.136033] rtnl_mutex); lock([ 165.136033] sk_lock-AF_INET6); lock([

Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-19 Thread Dave Hansen
On 10/19/2016 10:01 AM, Michal Hocko wrote: > The question I had earlier was whether this has to be an explicit FOLL > flag used by g-u-p users or we can just use it internally when mm != > current->mm The reason I chose not to do that was that deferred work gets run under a basically random

Re: [PATCH net] net: core: Correctly iterate over lower adjacency list

2016-10-19 Thread David Miller
From: Ido Schimmel Date: Wed, 19 Oct 2016 18:36:27 +0300 > Below the patch I noted "Please consider queueing this for 4.8.y", but > you didn't reply and I don't see it here: > https://patchwork.ozlabs.org/bundle/davem/stable/?state=* > > So I'm not sure if this was rejected

Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-19 Thread Michal Hocko
On Wed 19-10-16 09:49:43, Dave Hansen wrote: > On 10/19/2016 02:07 AM, Michal Hocko wrote: > > On Wed 19-10-16 09:58:15, Lorenzo Stoakes wrote: > >> On Tue, Oct 18, 2016 at 05:30:50PM +0200, Michal Hocko wrote: > >>> I am wondering whether we can go further. E.g. it is not really clear to > >>> me

Re: net/sctp: use-after-free in __sctp_connect

2016-10-19 Thread Marcelo Ricardo Leitner
On Wed, Oct 19, 2016 at 02:25:24PM +0200, Andrey Konovalov wrote: > Hi, > > I've got the following error report while running the syzkaller fuzzer: > > == > BUG: KASAN: use-after-free in __sctp_connect+0xabe/0xbf0 at addr >

Re: [PATCH net-next v12 0/9] openvswitch: support for layer 3 encapsulated packets

2016-10-19 Thread Jiri Benc
On Tue, 18 Oct 2016 22:11:21 -0700, Pravin Shelar wrote: > I have not finished the review yet, but most of patches looks good to > me. Can you send userspace patches against latest master so that I can > try the patches with tunnel setup? Will do in a few minutes. Thanks for the review, Jiri

Re: [PATCH net-next v12 9/9] openvswitch: use ipgre tunnel rather than gretap tunnel

2016-10-19 Thread Jiri Benc
On Tue, 18 Oct 2016 22:14:06 -0700, Pravin Shelar wrote: > This is OVS tunnel compatibility code. We are not suppose to add new > features to compat code. Just provide a way to configure such device > over rtnl. Makes sense. Please consider this a test-only patch for now. I won't include it in

Re: [PATCH net-next v12 5/9] openvswitch: add processing of L3 packets

2016-10-19 Thread Jiri Benc
On Tue, 18 Oct 2016 22:13:45 -0700, Pravin Shelar wrote: > On Mon, Oct 17, 2016 at 6:02 AM, Jiri Benc wrote: > > - skb_reset_network_header(skb); > > + skb->protocol = parse_ethertype(skb); > > I am not sure about changing skb->protocol here. > By changing

Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-19 Thread Dave Hansen
On 10/19/2016 02:07 AM, Michal Hocko wrote: > On Wed 19-10-16 09:58:15, Lorenzo Stoakes wrote: >> On Tue, Oct 18, 2016 at 05:30:50PM +0200, Michal Hocko wrote: >>> I am wondering whether we can go further. E.g. it is not really clear to >>> me whether we need an explicit FOLL_REMOTE when we can in

Re: net/ipv6: potential deadlock in do_ipv6_setsockopt

2016-10-19 Thread Cong Wang
On Wed, Oct 19, 2016 at 12:45 AM, Baozeng Ding wrote: > It fixes the issue for me. > Tested-by: Baozeng Ding Thanks for testing, I will send out the patch formally very soon. BTW, you can check mailing archive to see if your email succeeds or not, for

[PATCH net-next v2 1/2] openvswitch: remove unused functions

2016-10-19 Thread Jiri Benc
ovs_vport_deferred_free is not used anywhere. It's the only caller of free_vport_rcu thus this one can be removed, too. Signed-off-by: Jiri Benc --- new in v2 --- net/openvswitch/vport.c | 16 net/openvswitch/vport.h | 1 - 2 files changed, 17 deletions(-)

[PATCH net v2] net: add recursion limit to GRO

2016-10-19 Thread Sabrina Dubroca
Currently, GRO can do unlimited recursion through the gro_receive handlers. This was fixed for tunneling protocols by limiting tunnel GRO to one level with encap_mark, but both VLAN and TEB still have this problem. Thus, the kernel is vulnerable to a stack overflow, if we receive a packet

Re: [RFC 2/6] qed: Add iSCSI out of order packet handling.

2016-10-19 Thread Hannes Reinecke
On 10/19/2016 07:01 AM, manish.rangan...@cavium.com wrote: > From: Yuval Mintz > > This patch adds out of order packet handling for hardware offloaded > iSCSI. Out of order packet handling requires driver buffer allocation > and assistance. > > Signed-off-by: Arun Easi

Re: [PATCH 05/10] mm: replace get_vaddr_frames() write/force parameters with gup_flags

2016-10-19 Thread Jan Kara
On Thu 13-10-16 01:20:15, Lorenzo Stoakes wrote: > This patch removes the write and force parameters from get_vaddr_frames() and > replaces them with a gup_flags parameter to make the use of FOLL_FORCE > explicit > in callers as use of this flag can result in surprising behaviour (and hence >

[PATCH iproute2 net-next] tc: m_mirred: Add support for ingress redirect/mirror

2016-10-19 Thread Shmulik Ladkani
So far, only the 'egress' direction was implemented. Allow specifying 'ingress' as the direction packet appears on the target interface. For example, this takes incoming 802.1q frames on veth0 and redirects them for input on dummy0: # tc filter add dev veth0 parent : pref 1 protocol 802.1q

[PATCH net-next v2 2/2] openvswitch: remove unnecessary EXPORT_SYMBOLs

2016-10-19 Thread Jiri Benc
Some symbols exported to other modules are really used only by openvswitch.ko. Remove the exports. Tested by loading all 4 openvswitch modules, nothing breaks. Signed-off-by: Jiri Benc --- v2: ovs_vport_deferred_free is completely removed by the first patch ---

Re: [PATCH net] conntrack: restart gc immediately if GC_MAX_EVICTS is reached

2016-10-19 Thread Pablo Neira Ayuso
On Tue, Oct 18, 2016 at 02:37:32PM +0200, Nicolas Dichtel wrote: > When the maximum evictions number is reached, do not wait 5 seconds before > the next run. Applied, thanks Nicolas.

Re: [PATCH net-next 4/6] net: use core MTU range checking in core net infra

2016-10-19 Thread Sabrina Dubroca
2016-10-18, 22:33:31 -0400, Jarod Wilson wrote: > geneve: > - Merge __geneve_change_mtu back into geneve_change_mtu, set max_mtu > - This one isn't quite as straight-forward as others, could use some > closer inspection and testing > > macvlan: > - set min/max_mtu > > tun: > - set min/max_mtu,

Re: [PATCH net-next 5/6] net: use core MTU range checking in virt drivers

2016-10-19 Thread Michael S. Tsirkin
On Wed, Oct 19, 2016 at 04:59:46PM +0300, Michael S. Tsirkin wrote: > On Tue, Oct 18, 2016 at 10:33:32PM -0400, Jarod Wilson wrote: > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index fad84f3..4885a42 100644 > > --- a/drivers/net/virtio_net.c > > +++

net/ipx: null-ptr-deref in ipxrtr_route_packet

2016-10-19 Thread Andrey Konovalov
Hi, I've got the following error report while running the syzkaller fuzzer: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] SMP KASAN Modules linked in: CPU: 0 PID: 3953 Comm: syz-executor Not tainted

Re: [PATCH] ipv6: don't check for tmp_prefered_lft underflow

2016-10-19 Thread Jiri Bohac
The check for an underflow of tmp_prefered_lft is always false because tmp_prefered_lft is unsigned. The intention of the check was to guard against racing with an update of the temp_prefered_lft sysctl, potentially resulting in an underflow and a very large preferred lifetime. However, the

Re: [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified.

2016-10-19 Thread Eric Garver
On Wed, Oct 19, 2016 at 11:44:10AM +0300, Amir Vadai wrote: > On Tue, Oct 18, 2016 at 4:59 PM, Or Gerlitz wrote: > > On Mon, Oct 17, 2016 at 11:30 PM, Eric Garver wrote: > >> Fixes a panic when calling eth_get_headlen(). Noticed on i40e driver. > >> > >>

net/netlink: null-ptr-deref in netlink_dump/lock_acquire

2016-10-19 Thread Andrey Konovalov
Hi, I've got the following error report while running the syzkaller fuzzer: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] SMP KASAN Modules linked in: CPU: 1 PID: 3933 Comm: syz-executor Not tainted

Re: [PATCH] crypto: ccm - avoid scatterlist for MAC encryption

2016-10-19 Thread Johannes Berg
On Wed, 2016-10-19 at 08:59 -0700, Ben Greear wrote: >  > Do you actually expect performance regressions?  I'll be complaining > if so, but will test first :) I think we can expect this to use a bit more CPU time, but unless you're very tight on that you probably shouldn't expect any throughput

Re: [PATCH net] conntrack: restart gc immediately if GC_MAX_EVICTS is reached

2016-10-19 Thread Florian Westphal
Nicolas Dichtel wrote: > When the maximum evictions number is reached, do not wait 5 seconds before > the next run. > > CC: Florian Westphal Acked-by: Florian Westphal

Re: [PATCH 08/10] mm: replace __access_remote_vm() write parameter with gup_flags

2016-10-19 Thread Michal Hocko
On Wed 19-10-16 10:06:46, Lorenzo Stoakes wrote: > On Wed, Oct 19, 2016 at 10:52:05AM +0200, Michal Hocko wrote: > > yes this is the desirable and expected behavior. > > > > > wonder if this is desirable behaviour or whether this ought to be limited > > > to > > > ptrace system calls. Regardless,

Re: [PATCH net-next 6/6] net: use core MTU range checking in misc drivers

2016-10-19 Thread Sabrina Dubroca
2016-10-18, 22:33:33 -0400, Jarod Wilson wrote: [...] > diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c > index 309311b..b5f125c 100644 > --- a/drivers/firewire/net.c > +++ b/drivers/firewire/net.c > @@ -1349,15 +1349,6 @@ static netdev_tx_t fwnet_tx(struct sk_buff *skb, > struct

Re: [PATCH] crypto: ccm - avoid scatterlist for MAC encryption

2016-10-19 Thread Ben Greear
On 10/19/2016 08:08 AM, Ard Biesheuvel wrote: On 19 October 2016 at 08:43, Johannes Berg wrote: On Wed, 2016-10-19 at 11:31 +0800, Herbert Xu wrote: We could probably make mac80211 do that too, but can we guarantee in- order processing? Anyway, it's pretty low

Re: Useless debug warning "netlink: 16 bytes leftover after parsing attributes"

2016-10-19 Thread Nicolas Dichtel
Le 18/10/2016 à 07:06, Marcel Holtmann a écrit : > Hi, > > so lately I am seeing a bunch of these warnings: > > netlink: 16 bytes leftover after parsing attributes.. > > While they give you the process name, they are still useless to track down > the message that causes them. I find them even

Re: [PATCH net-next 4/6] net: use core MTU range checking in core net infra

2016-10-19 Thread Jarod Wilson
On Wed, Oct 19, 2016 at 05:28:00PM +0200, Sabrina Dubroca wrote: > 2016-10-19, 10:40:06 -0400, Jarod Wilson wrote: > > On Wed, Oct 19, 2016 at 03:55:29PM +0200, Sabrina Dubroca wrote: > > > 2016-10-18, 22:33:31 -0400, Jarod Wilson wrote: ... > > I'm thinking more and more that we ought to back out

Re: [PATCH net-next 2/6] net: use core MTU range checking in wireless drivers

2016-10-19 Thread Johannes Berg
On Tue, 2016-10-18 at 22:33 -0400, Jarod Wilson wrote: > - set max_mtu in wil6210 driver > - set max_mtu in atmel driver > - set min/max_mtu in cisco airo driver, remove airo_change_mtu > - set min/max_mtu in ipw2100/ipw2200 drivers, remove > libipw_change_mtu > - set min/max_mtu in p80211netdev,

Re: [PATCH] crypto: ccm - avoid scatterlist for MAC encryption

2016-10-19 Thread Johannes Berg
On Wed, 2016-10-19 at 11:31 +0800, Herbert Xu wrote: > On Mon, Oct 17, 2016 at 06:21:14PM +0100, Ard Biesheuvel wrote: > > > > > > Annoyingly, all this complication with scatterlists etc is for > > doing > > asynchronous crypto via DMA capable crypto accelerators, and the > > networking code

RE: [PATCH net-next 5/6] net: use core MTU range checking in virt drivers

2016-10-19 Thread Haiyang Zhang
> -Original Message- > From: Jarod Wilson [mailto:ja...@redhat.com] > Sent: Tuesday, October 18, 2016 10:34 PM > To: linux-ker...@vger.kernel.org > Cc: Jarod Wilson ; netdev@vger.kernel.org; > virtualizat...@lists.linux-foundation.org; KY Srinivasan >

Re: [PATCH net v2] flow_dissector: Check skb for VLAN only if skb specified.

2016-10-19 Thread Amir Vadai
On Tue, Oct 18, 2016 at 4:59 PM, Or Gerlitz wrote: > On Mon, Oct 17, 2016 at 11:30 PM, Eric Garver wrote: >> Fixes a panic when calling eth_get_headlen(). Noticed on i40e driver. >> >> Fixes: d5709f7ab776 ("flow_dissector: For stripped vlan, get vlan info from

Re: [PATCH net] net: core: Correctly iterate over lower adjacency list

2016-10-19 Thread Ido Schimmel
Hi Dave, On Wed, Oct 19, 2016 at 10:38:29AM -0400, David Miller wrote: > From: ido...@idosch.org > Date: Wed, 19 Oct 2016 16:57:08 +0300 > > > From: Ido Schimmel > > > > Tamir reported the following trace when processing ARP requests received > > via a vlan device on top

Re: [PATCH net-next 4/6] net: use core MTU range checking in core net infra

2016-10-19 Thread Sabrina Dubroca
2016-10-19, 10:40:06 -0400, Jarod Wilson wrote: > On Wed, Oct 19, 2016 at 03:55:29PM +0200, Sabrina Dubroca wrote: > > 2016-10-18, 22:33:31 -0400, Jarod Wilson wrote: > > > geneve: > > > - Merge __geneve_change_mtu back into geneve_change_mtu, set max_mtu > > > - This one isn't quite as

Re: [RFC PATCH net-next] bpf: fix potential percpu map overcopy to user.

2016-10-19 Thread Daniel Borkmann
On 10/19/2016 07:31 AM, William Tu wrote: ... - if (copy_to_user(uvalue, value, value_size) != 0) + if (copy_to_user(uvalue, value, min_t(u32, usize, value_size)) != 0) goto free_value; I think such approach won't actually fix anything. User space may lose some of the

Re: [Patch net-next 2/2] netns: avoid disabling irq for netns id

2016-10-19 Thread Elad Raz
On Fri, Sep 2, 2016 at 11:12 AM, Nicolas Dichtel wrote: > Le 02/09/2016 à 06:53, Cong Wang a écrit : >> We never read or change netns id in hardirq context, >> the only place we read netns id in softirq context >> is in vxlan_xmit(). So, it should be enough to just >>

  1   2   >