Re: [PATCH] net: qmi_wwan: add Dell DW5818, DW5819

2017-11-20 Thread Shrirang Bagul
On Mon, 2017-11-20 at 10:41 +0100, Bjørn Mork wrote: > Shrirang Bagul writes: > > > Dell Wireless 5819/5818 devices are re-branded Sierra Wireless MC74 > > series modems which will by default boot with vid 0x413c and pid's > > 0x81cf, 0x81d0, 0x81d1,0x81d2. Along

Re: [PATCH 1/8] dt-bindings: can: rcar_can: document r8a774[35] can support

2017-11-20 Thread Simon Horman
On Tue, Nov 07, 2017 at 03:10:42PM +, Fabrizio Castro wrote: > Document "renesas,can-r8a7743" and "renesas,can-r8a7745" compatible > strings. Since the fallback compatible string ("renesas,rcar-gen2-can") > activates the right code in the driver, no driver change is needed. > > Signed-off-by:

Re: [PATCH v2 3/3] net: ethernet: fec: fix refclk enable for SMSC LAN8710/20

2017-11-20 Thread Richard Leitner
On 11/20/2017 10:47 AM, Andy Duan wrote: > From: Richard Leitner Sent: Monday, November 20, 2017 4:34 > PM >> To: f.faine...@gmail.com; Andy Duan ; >> and...@lunn.ch >> Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; >> richard.leit...@skidata.com

Re: [PATCH 0/8] Add CAN support to iwg2[02]d

2017-11-20 Thread Simon Horman
On Tue, Nov 07, 2017 at 03:10:41PM +, Fabrizio Castro wrote: > Hello, > > this series delivers all of the changes necessary to add CAN bus > support to the: > * iW-RainboW-G22D SODIMM, and > * iW-RainboW-G20M-Qseven-RZG1M > development platforms, including documentation, pinctrl driver, SoC >

[PATCH ipsec-next] net: xfrm: allow clearing socket xfrm policies.

2017-11-20 Thread Lorenzo Colitti
Currently it is possible to add or update socket policies, but not clear them. Therefore, once a socket policy has been applied, the socket cannot be used for unencrypted traffic. This patch allows (privileged) users to clear socket policies by passing in a NULL pointer and zero length argument

Re: [PATCH] net: qmi_wwan: add Dell DW5818, DW5819

2017-11-20 Thread Lars Melin
On 11/20/2017 16:27, Shrirang Bagul wrote: Dell Wireless 5819/5818 devices are re-branded Sierra Wireless MC74 series modems which will by default boot with vid 0x413c and pid's 0x81cf, 0x81d0, 0x81d1,0x81d2. Along with qcserial, these modems support qmi_wwan on the usb interface #12.

RE: [PATCH v2 3/3] net: ethernet: fec: fix refclk enable for SMSC LAN8710/20

2017-11-20 Thread Andy Duan
From: Richard Leitner Sent: Monday, November 20, 2017 5:57 PM >To: Andy Duan ; f.faine...@gmail.com; >and...@lunn.ch >Cc: Richard Leitner ; netdev@vger.kernel.org; linux- >ker...@vger.kernel.org >Subject: Re: [PATCH v2 3/3] net:

RE: [PATCH v2 1/3] net: ethernet: freescale: simplify fec_reset_phy

2017-11-20 Thread Andy Duan
From: Richard Leitner Sent: Monday, November 20, 2017 4:34 PM >The fec_reset_phy function allowed only one execution during probeing. >To make it more usable move the dt parsing and gpio allocation to the probe >function. The parameters of the phy reset are added to the

Re: [PATCH] net: qmi_wwan: add Dell DW5818, DW5819

2017-11-20 Thread Bjørn Mork
Shrirang Bagul writes: > Dell Wireless 5819/5818 devices are re-branded Sierra Wireless MC74 > series modems which will by default boot with vid 0x413c and pid's > 0x81cf, 0x81d0, 0x81d1,0x81d2. Along with qcserial, these modems support > qmi_wwan on the usb

RE: [PATCH v2 3/3] net: ethernet: fec: fix refclk enable for SMSC LAN8710/20

2017-11-20 Thread Andy Duan
From: Richard Leitner Sent: Monday, November 20, 2017 4:34 PM >To: f.faine...@gmail.com; Andy Duan ; >and...@lunn.ch >Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; >richard.leit...@skidata.com >Subject: [PATCH v2 3/3] net: ethernet: fec: fix

[PATCH v2 1/3] net: ethernet: freescale: simplify fec_reset_phy

2017-11-20 Thread Richard Leitner
From: Richard Leitner The fec_reset_phy function allowed only one execution during probeing. To make it more usable move the dt parsing and gpio allocation to the probe function. The parameters of the phy reset are added to the fec_enet_private struct. As a result

[PATCH v2 2/3] include: linux: phy: harmonize phy_id{,_mask} type

2017-11-20 Thread Richard Leitner
From: Richard Leitner Previously phy_id was u32 and phy_id_mask was unsigned int. As the phy_id_mask defines the important bits of the phy_id (and is therefore the same size) these two variables should be the same datatype. Signed-off-by: Richard Leitner

[PATCH v2 3/3] net: ethernet: fec: fix refclk enable for SMSC LAN8710/20

2017-11-20 Thread Richard Leitner
From: Richard Leitner Some PHYs (for example the SMSC LAN8710/LAN8720) doesn't allow turning the refclk on and off again during operation (according to their datasheet). Nonetheless exactly this behaviour was introduced for power saving reasons by commit e8fcfcd5684a

Re: Problem of changing the inline mode or turning on the encapsulation support of Mellanox NIC’s eswitch

2017-11-20 Thread Or Gerlitz
On Mon, Nov 20, 2017 at 5:29 AM, Junxue ZHANG wrote: > Hi all, > > I encountered a problem when I tried to change the inline mode or turn on the > encapsulation support of Mellanox NIC’s eswitch. I wonder if anyone could > help me with this. Thanks. > > I want to use

[PATCH v2 0/3] net: ethernet: fec: fix refclk enable for SMSC LAN8710/20

2017-11-20 Thread Richard Leitner
From: Richard Leitner This patch series fixes the use of the SMSC LAN8710/20 with a Freescale ETH when the refclk is generated by the FSL. Changes v2: - simplify and fix fec_reset_phy function to support multiple calls - include: linux: phy:

[PATCH] net: qmi_wwan: add Dell DW5818, DW5819

2017-11-20 Thread Shrirang Bagul
Dell Wireless 5819/5818 devices are re-branded Sierra Wireless MC74 series modems which will by default boot with vid 0x413c and pid's 0x81cf, 0x81d0, 0x81d1,0x81d2. Along with qcserial, these modems support qmi_wwan on the usb interface #12. Signed-off-by: Shrirang Bagul

Re: Bug in socket(7) man page

2017-11-20 Thread Michael Kerrisk (man-pages)
[CC widended] Tobias, On 7 August 2017 at 13:53, Tobias Klausmann wrote: > Hi! > > This bug pertains to the manpage as visible on man7.org right > now. > > The socket(7) man page has this paragraph: > >SO_RXQ_OVFL (since Linux 2.6.33) > Indicates

Re: Incorrect behaviour or documentation problem of SO_RXQ_OVFL

2017-11-20 Thread Michael Kerrisk (man-pages)
[Adding Neil, who wrote the original text. Maybe he has also some suggested improvement.] Hello Petr and Tobias, Thank you both for your reports about the incorrect documentation. See below. On 15 November 2017 at 16:14, Petr Malat wrote: > Hi! > Generic SO_RXQ_OVFL helpers

Re: [RFC PATCH net-next 0/2] Configuring PFC stall prevention via ethtool

2017-11-20 Thread Eran Ben Elisha
On Thu, Nov 16, 2017 at 5:42 PM, Andrew Lunn wrote: >> I don't like adding another ethtool_ops callback tightly tied to the >> structures passed via ioctl() but when I started to think what to >> suggest as an alternative, I started to wonder if it is really necessary >> to add a

Re: JOIN_ANYCAST breakage w. "net: ipv6: put host and anycast routes on device with address"

2017-11-20 Thread Florian Westphal
David Ahern wrote: > On 11/14/17 10:36 AM, Florian Westphal wrote: > > Hi David > > > > This test program no longer works with 4.14 > > (recvfrom: Resource temporarily unavailable) > > > > after reverting commit > > 4832c30d5458387ff2533ff66fbde26ad8bb5a2d > > (net: ipv6: put

Re: Linux ECN Handling

2017-11-20 Thread Eric Dumazet
On Mon, Nov 20, 2017 at 7:01 AM, Neal Cardwell wrote: > Going back to one of your Oct 19 trace snapshots (attached), AFAICT at the > time of the timeout there is actually almost 64KBytes (352553398 + 1448 - > 352489686 = 65160) of unacknowledged data. So there really does

[PATCH net,stable] net: qmi_wwan: add Quectel BG96 2c7c:0296

2017-11-20 Thread Sebastian Sjoholm
Quectel BG96 is an Qualcomm MDM9206 based IoT modem, supporting both CAT-M and NB-IoT. Tested hardware is BG96 mounted on Quectel development board (EVB). The USB id is added to qmi_wwan.c to allow QMI communication with the BG96. Signed-off-by: Sebastian Sjoholm ---

[PATCH v2 28/31] net: Convert addrconf_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations (un)register sysctl, which are not touched by anybody else. So, it's safe to make them async. Signed-off-by: Kirill Tkhai --- net/ipv6/addrconf.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index

[PATCH v2 29/31] net: Convert loopback_net_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations have only init() method. It allocates memory for net_device, calls register_netdev() and assigns net::loopback_dev. register_netdev() is allowed be used without additional locks, as it's synchronized on rtnl_lock(). There are many examples of using this functon directly

[PATCH v2 31/31] net: Convert diag_net_ops

2017-11-20 Thread Kirill Tkhai
These pernet operations just create and destroy netlink socket. The socket is pernet and else operations don't touch it. Signed-off-by: Kirill Tkhai --- net/core/sock_diag.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c

[PATCH v2 30/31] net: Convert default_device_ops

2017-11-20 Thread Kirill Tkhai
These pernet operations consist of exit() and exit_batch() methods. default_device_exit() moves not-local and virtual devices to init_net. There is nothing exiting, because this may happen in any time on a working system, and rtnl_lock() and synchronize_net() protect us from all cases of external

[PATCH v2 26/31] net: Convert packet_net_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations just create and destroy /proc entry, and another operations do not touch it. Also, nobody else are interested in foreign net::packet::sklist. Signed-off-by: Kirill Tkhai --- net/packet/af_packet.c |1 + 1 file changed, 1 insertion(+) diff

pull-request: mac80211 2017-11-20

2017-11-20 Thread Johannes Berg
Hi Dave, Sorry this is coming now, I had a super hectic time after travel since I had to catch up after two weeks of being away ... That's not really an excuse, but I'm asking you anyway to pull Kees's timer conversions with the fixes since he really wants to make more changes on top and clean

Re: [PATCH RFC 0/5] Support asynchronous crypto for IPsec GSO.

2017-11-20 Thread John Fastabend
On 11/20/2017 05:09 AM, David Miller wrote: > From: Steffen Klassert > Date: Mon, 20 Nov 2017 08:37:47 +0100 > >> This patchset implements asynchronous crypto handling >> in the layer 2 TX path. With this we can allow IPsec >> ESP GSO for software crypto. This also

[PATCH v2 10/31] net: Convert nf_log_net_ops

2017-11-20 Thread Kirill Tkhai
The pernet_operations would have had a problem in parallel execution with others, if init_net had been able to released. But it's not, and the rest is safe for that. There is memory allocation, which nobody else interested in, and sysctl registration. So, we make it async. Signed-off-by: Kirill

[PATCH v2 09/31] net: Convert netfilter_net_ops

2017-11-20 Thread Kirill Tkhai
Methods netfilter_net_init() and netfilter_net_exit() initialize net::nf::hooks and change net-related proc directory of net. Another pernet_operations are not interested in forein net::nf::hooks or proc entries, so it's safe to be execute them in parallel with methods of other pernet operations.

[PATCH v2 11/31] net: Convert net_inuse_ops

2017-11-20 Thread Kirill Tkhai
net_inuse_ops methods expose statistics in /proc. No one from the rest of pernet_subsys or pernet_device lists does not touch net::core::inuse. So, it's safe to make net_inuse_ops async. Signed-off-by: Kirill Tkhai --- net/core/sock.c |1 + 1 file changed, 1

[PATCH v2 12/31] net: Convert net_defaults_ops

2017-11-20 Thread Kirill Tkhai
net_defaults_ops introduces only net_defaults_init_net method, and it acts on net::core::sysctl_somaxconn, which is not interesting for the rest of pernet_subsys and pernet_device lists. Then, make it async. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c |1 +

[PATCH v2 13/31] net: Convert netlink_net_ops

2017-11-20 Thread Kirill Tkhai
The methods of netlink_net_ops create and destroy "netlink" file, which are not interesting for foreigh pernet_operations. So, netlink_net_ops may safely be made async. Signed-off-by: Kirill Tkhai --- net/netlink/af_netlink.c |1 + 1 file changed, 1 insertion(+) diff

[PATCH v2 14/31] net: Convert rtnetlink_net_ops

2017-11-20 Thread Kirill Tkhai
rtnetlink_net_init() and rtnetlink_net_exit() create and destroy netlink socket. It looks like, another pernet_operations are not interested in foreiner net::rtnl, so rtnetlink_net_ops may be safely made async. Signed-off-by: Kirill Tkhai --- net/core/rtnetlink.c |1 +

Re: wcn36xx: fix iris child-node lookup

2017-11-20 Thread Kalle Valo
Johan Hovold wrote: > Fix child-node lookup during probe, which ended up searching the whole > device tree depth-first starting at the parent rather than just matching > on its children. > > To make things worse, the parent mmio node was also prematurely freed. > > Fixes:

[PATCH v2 25/31] net: Convert unix_net_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations are just create and destroy /proc and sysctl entries, and are not touched by foreign pernet_operations. So, we are able to make them async. Signed-off-by: Kirill Tkhai --- net/unix/af_unix.c |1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v2 24/31] net: Convert pernet_subsys, registered from inet_init()

2017-11-20 Thread Kirill Tkhai
arp_net_ops just addr/removes /proc entry. devinet_ops allocates and frees duplicate of init_net tables and (un)registers sysctl entries. fib_net_ops allocates and frees pernet tables, creates/destroys netlink socket and (un)initializes /proc entries. Foreign pernet_operations do not touch them.

[PATCH v2 22/31] net: Convert wext_pernet_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations initialize and purge net::wext_nlevents queue, and are not touched by foreign pernet_operations. Mark them async. Signed-off-by: Kirill Tkhai --- net/wireless/wext-core.c |1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 5/8] crypto: remove unused hardirq.h

2017-11-20 Thread Yang Shi
The email to Herbert is returned, resent it. Yang On 11/17/17 3:02 PM, Yang Shi wrote: Preempt counter APIs have been split out, currently, hardirq.h just includes irq_enter/exit APIs which are not used by crypto at all. So, remove the unused hardirq.h. Signed-off-by: Yang Shi

Re: [PATCH][v4] uprobes/x86: emulate push insns for uprobe on x86

2017-11-20 Thread Oleg Nesterov
On 11/17, Yonghong Song wrote: > > On 11/17/17 9:25 AM, Oleg Nesterov wrote: > >On 11/15, Yonghong Song wrote: > >> > >>v3 -> v4: > >> . Revert most of v3 change as 32bit emulation is not really working > >> on x86_64 platform as among other issues, function emulate_push_stack() > >>

Re: [PATCH][v4] uprobes/x86: emulate push insns for uprobe on x86

2017-11-20 Thread Yonghong Song
On 11/20/17 8:41 AM, Oleg Nesterov wrote: On 11/17, Yonghong Song wrote: On 11/17/17 9:25 AM, Oleg Nesterov wrote: On 11/15, Yonghong Song wrote: v3 -> v4: . Revert most of v3 change as 32bit emulation is not really working on x86_64 platform as among other issues, function

[PATCH v2 27/31] net: Convert ipv4_sysctl_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations create and destroy sysctl, which are not touched by anybody else. Signed-off-by: Kirill Tkhai --- net/ipv4/sysctl_net_ipv4.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index

Request for queuing to stable: pci id's

2017-11-20 Thread Ganesh Goudar
Hi David, Can you please queue the below commits to 4.9 stable, which add pci id's of T5 and T6 cards. These commits apply as is. 5d071c24f0cb8ce9fb5642c2a65ab5ab7f5ad244 29db39841896de99dcb3b1deaed61a13cb9d8036 12eb070babbcab4b003e060933971089864a6a54 89ff67718c900754d2aa5c8e37efbe607be36154

[PATCH v2 23/31] net: Convert sysctl_core_ops

2017-11-20 Thread Kirill Tkhai
These pernet_operations register and destroy sysctl directory, and it's not interested for foreign pernet_operations. Signed-off-by: Kirill Tkhai --- net/core/sysctl_net_core.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/core/sysctl_net_core.c

[PATCH v2 21/31] net: Convert genl_pernet_ops

2017-11-20 Thread Kirill Tkhai
This pernet_operations create and destroy net::genl_sock. Foreign pernet_operations don't touch it. Signed-off-by: Kirill Tkhai --- net/netlink/genetlink.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index

[PATCH v2 06/31] net: Convert proc_net_ns_ops

2017-11-20 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from before initcalls. proc_net_ns_ops::proc_net_ns_init()/proc_net_ns_exit() register pernet net->proc_net and ->proc_net_stat. Constructors and destructors of another pernet_operations are not interested in foreign net's proc_net and

[PATCH v2 04/31] net: Move mutex_unlock() in cleanup_net() up

2017-11-20 Thread Kirill Tkhai
net_sem protects from pernet_list changing, while ops_free_list() makes simple kfree(), and it can't race with other pernet_operations callbacks. So we may release net_mutex earlier then it was. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c |3 ++- 1 file

[PATCH v2 03/31] net: Introduce net_sem for protection of pernet_list

2017-11-20 Thread Kirill Tkhai
Curently mutex is used to protect pernet operations list. It makes cleanup_net() to execute ->exit methods of the same operations set, which was used on the time of ->init, even after net namespace is unlinked from net_namespace_list. But the problem is it's need to synchronize_rcu() after net is

[PATCH v2 05/31] net: Allow pernet_operations to be executed in parallel

2017-11-20 Thread Kirill Tkhai
This adds new pernet_operations::async flag to indicate operations, which ->init(), ->exit() and ->exit_batch() methods are allowed to be executed in parallel with the methods of any other pernet_operations. When there are only asynchronous pernet_operations in the system, net_mutex won't be

Re: [PATCH] man: document ip route get mark

2017-11-20 Thread Stephen Hemminger
On Sat, 18 Nov 2017 22:56:49 +0100 Simon Ruderich wrote: > Signed-off-by: Simon Ruderich > --- > Hello, > > Just found this in an stackoverflow article from 2015 and it > really helped. So here as patch. > > Regards > Simon Applied man page patches,

[PATCH v2 08/31] net: Convert sysctl_pernet_ops

2017-11-20 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from core initcalls. Methods sysctl_net_init() and sysctl_net_exit() initialize net::sysctls table of a namespace. pernet_operations::init()/exit() methods from the rest of the list do not touch net::sysctls of strangers, so it's safe to

Re: [kernel-hardening] [PATCH v4] scripts: add leaking_addresses.pl

2017-11-20 Thread Petr Mladek
On Mon 2017-11-13 11:16:28, kaiwan.billimo...@gmail.com wrote: > On Mon, 2017-11-13 at 09:21 +1100, Tobin C. Harding wrote: > > On Fri, Nov 10, 2017 at 07:26:34PM +0530, kaiwan.billimo...@gmail.com > > > - it currently hard-codes a global 'PAGE_OFFSET_32BIT=0xc000' > > > , just > > > so I

Re: len = bpf_probe_read_str(); bpf_perf_event_output(... len) == FAIL

2017-11-20 Thread Yonghong Song
On 11/20/17 5:31 AM, Arnaldo Carvalho de Melo wrote: Em Tue, Nov 14, 2017 at 09:25:17PM +0100, Daniel Borkmann escreveu: On 11/14/2017 07:15 PM, Yonghong Song wrote: On 11/14/17 6:19 AM, Daniel Borkmann wrote: On 11/14/2017 02:42 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Nov 14, 2017 at

[PATCH v2 01/31] net: Assign net to net_namespace_list in setup_net()

2017-11-20 Thread Kirill Tkhai
This patch merges two repeating pieces of code in one, and they will live in setup_net() now. It acts as cleanup even despite init_net_initialized assignment is reordered with the linking of net now. This variable is need for proc_net_init() called from:

[PATCH v2 00/31] Replacing net_mutex with rw_semaphore

2017-11-20 Thread Kirill Tkhai
Hi, there is the second version of patchset introducing net_sem instead of net_mutex. The patchset adds net_sem in addition to net_mutex and allows pernet_operations to be async. This flag means, the pernet_operations methods are safe to be executed with any othor pernet_operations

[PATCH v2 07/31] net: Convert net_ns_ops methods

2017-11-20 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from pure initcalls. net_ns_ops::net_ns_net_init/net_ns_net_init, methods use only ida_simple_* functions, which are not need a synchronization. So, net_ns_ops methods are able to be executed in parallel with methods of other pernet

[PATCH v2 02/31] net: Cleanup copy_net_ns()

2017-11-20 Thread Kirill Tkhai
Line up destructors actions in the revers order to constructors. Next patches will add more actions, and this will be comfortable, if there is the such order. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c | 20 +--- 1 file changed, 9

Re: [E1000-devel] Questions about crashes and GRO

2017-11-20 Thread Alexander Duyck
Hi Sarah, I am adding the netdev mailing list as I am not certain this is an i350 specific issue. The traces themselves aren't anything I recognize as an existing issue. From what I can tell it looks like you are running Xen, so would I be correct in assuming you are bridging between VMs? If so

[PATCH v2 15/31] net: Convert audit_net_ops

2017-11-20 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from postcore initcalls. audit_net_init() creates netlink socket, while audit_net_exit() destroys it. The rest of the pernet_list are not interested in the socket, so we make audit_net_ops async. Signed-off-by: Kirill Tkhai

Re: [PATCH iproute2] iproute2: fixes to compile on some systems.

2017-11-20 Thread Stephen Hemminger
On Mon, 20 Nov 2017 12:57:07 +0900 Lorenzo Colitti wrote: > 1. Put the declarations of strlcpy and strlcat inside >an #ifdef NEED_STRLCPY. Their declarations were already in a >similar #ifdef. > 2. In bpf_scm.h, include sys/un.h for struct sockaddr_un. > 3. In

[PATCH v2 16/31] net: Convert uevent_net_ops

2017-11-20 Thread Kirill Tkhai
uevent_net_init() and uevent_net_exit() create and destroy netlink socket, and these actions serialized in netlink code. Parallel execution with other pernet_operations makes the socket disappear earlier from uevent_sock_list on ->exit. As userspace can't be interested in broadcast messages of

Re: [PATCH] net: sched: crash on blocks with goto chain action

2017-11-20 Thread Cong Wang
On Sun, Nov 19, 2017 at 8:17 AM, Roman Kapl wrote: > tcf_block_put_ext has assumed that all filters (and thus their goto > actions) are destroyed in RCU callback and thus can not race with our > list iteration. However, that is not true during netns cleanup (see > tcf_exts_get_net

Re: [PATCH net,stable] net: qmi_wwan: add Quectel BG96 2c7c:0296

2017-11-20 Thread Bjørn Mork
Sebastian Sjoholm writes: > Quectel BG96 is an Qualcomm MDM9206 based IoT modem, supporting both > CAT-M and NB-IoT. Tested hardware is BG96 mounted on Quectel development > board (EVB). The USB id is added to qmi_wwan.c to allow QMI > communication with the BG96. > >

[PATCH v2 19/31] net: Convert fib_* pernet_operations, registered via subsys_initcall

2017-11-20 Thread Kirill Tkhai
Both of them create and initialize lists, which are not touched by another foreing pernet_operations. Signed-off-by: Kirill Tkhai --- net/core/fib_notifier.c |1 + net/core/fib_rules.c|1 + 2 files changed, 2 insertions(+) diff --git a/net/core/fib_notifier.c

[PATCH v2 20/31] net: Convert subsys_initcall() registered pernet_operations from net/sched

2017-11-20 Thread Kirill Tkhai
psched_net_ops only creates and destroyes /proc entry, and safe to be executed in parallel with any foreigh pernet_operations. tcf_action_net_ops initializes and destructs tcf_action_net::egdev_ht, which is not touched by foreign pernet_operations. So, make them async. Signed-off-by: Kirill

[PATCH v2 17/31] net: Convert proto_net_ops

2017-11-20 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from subsys initcalls. It seems safe to be executed in parallel with others, as it's only creates/destoyes proc entry, which nobody else is not interested in. Signed-off-by: Kirill Tkhai --- net/core/sock.c |1 +

[PATCH v2 18/31] net: Convert pernet_subsys ops, registered via net_dev_init()

2017-11-20 Thread Kirill Tkhai
There are: 1)dev_proc_ops and dev_mc_net_ops, which create and destroy pernet proc file and not interested to another net namespaces; 2)netdev_net_ops, which creates pernet hash, which is not touched by another pernet_operations. So, make them async. Signed-off-by: Kirill Tkhai

[PATCH v2] net: sched: fix crash when deleting secondary chains

2017-11-20 Thread Roman Kapl
If you flush (delete) a filter chain other than chain 0 (such as when deleting the device), the kernel may run into a use-after-free. The chain refcount must not be decremented unless we are sure we are done with the chain. To reproduce the bug, run: ip link add dtest type dummy tc qdisc

[PATCH net v2 08/10] bpftool: revert printing program device bound info

2017-11-20 Thread Jakub Kicinski
This reverts commit 928631e05495 ("bpftool: print program device bound info"). We will remove this API and redo it right in -next. Signed-off-by: Jakub Kicinski --- tools/bpf/bpftool/prog.c | 31 --- tools/include/uapi/linux/bpf.h

[PATCH net v2 09/10] bpf: revert report offload info to user space

2017-11-20 Thread Jakub Kicinski
This reverts commit bd601b6ada11 ("bpf: report offload info to user space"). The ifindex by itself is not sufficient, we should provide information on which network namespace this ifindex belongs to. After considering some options we concluded that it's best to just remove this API for now, and

[PATCH net v2 02/10] bpf: offload: limit offload to cls_bpf and xdp programs only

2017-11-20 Thread Jakub Kicinski
We are currently only allowing attachment of device-bound cls_bpf and XDP programs. Make this restriction explicit in the BPF offload code. This way we can potentially reuse the ifindex field in the future. Since XDP and cls_bpf programs can only be loaded by admin, we can drop the explicit

[PATCH net v2 05/10] net: xdp: don't allow device-bound programs in driver mode

2017-11-20 Thread Jakub Kicinski
Currently device-bound programs are not able to run on the host to save resources (host JIT is not invoked). Don't allow XDP programs to be attached without the HW_MODE flag. In theory if program is already translated for device offload the driver should choose to offload it instead of loading

[PATCH net v2 00/10] bpf: offload: check netdev pointer in the drivers and namespace trouble

2017-11-20 Thread Jakub Kicinski
Hi! This series addresses some late comments and moves checking if program has been loaded for the correct device to the drivers. There are also some problems with net namespaces which I didn't take into consideration. On the kernel side we will now simply ignore namespace moves. Since the user

[PATCH net v2 07/10] bpf: offload: ignore namespace moves

2017-11-20 Thread Jakub Kicinski
We are currently destroying the device offload state when device moves to another net namespace. This doesn't break with current NFP code, because offload state is not used on program removal, but it's not correct behaviour. Ignore the device unregister notifications on namespace move.

[PATCH net v2 10/10] bpf: make bpf_prog_offload_verifier_prep() static inline

2017-11-20 Thread Jakub Kicinski
Header implementation of bpf_prog_offload_verifier_prep() which is used if CONFIG_NET=n should be a static inline. Signed-off-by: Jakub Kicinski --- include/linux/bpf_verifier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH net v2 04/10] bpf: offload: move offload device validation out to the drivers

2017-11-20 Thread Jakub Kicinski
With TC shared block changes we can't depend on correct netdev pointer being available in cls_bpf. Move the device validation to the driver. Core will only make sure that offloaded programs are always attached in the driver (or in HW by the driver). We trust that drivers which implement offload

[PATCH net v2 06/10] bpf: turn bpf_prog_get_type() into a wrapper

2017-11-20 Thread Jakub Kicinski
bpf_prog_get_type() is identical to bpf_prog_get_type_dev(), with false passed as attach_drv. Instead of keeping it as an exported symbol turn it into static inline wrapper. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet

[PATCH net v2 03/10] bpf: offload: rename the ifindex field

2017-11-20 Thread Jakub Kicinski
bpf_target_prog seems long and clunky, rename it to prog_ifindex. We don't want to call this field just ifindex, because maps may need a similar field in the future and bpf_attr members for programs and maps are unnamed. Signed-off-by: Jakub Kicinski Reviewed-by:

[PATCH net v2 01/10] bpf: offload: add comment warning developers about double destroy

2017-11-20 Thread Jakub Kicinski
Offload state may get destroyed either because the device for which it was constructed is going away, or because the refcount of bpf program itself has reached 0. In both of those cases we will call __bpf_prog_offload_destroy() to unlink the offload from the device. We may in fact call it twice,

Re: [E1000-devel] Questions about crashes and GRO

2017-11-20 Thread Sarah Newman
On 11/20/2017 02:56 PM, Alexander Duyck wrote: > On Mon, Nov 20, 2017 at 2:38 PM, Sarah Newman > wrote: >> On 11/20/2017 08:36 AM, Alexander Duyck wrote: >>> Hi Sarah, >>> >>> I am adding the netdev mailing list as I am not certain this is an >>> i350 specific issue.

[PATCH] net: sched: crash on blocks with goto chain action

2017-11-20 Thread Roman Kapl
tcf_block_put_ext has assumed that all filters (and thus their goto actions) are destroyed in RCU callback and thus can not race with our list iteration. However, that is not true during netns cleanup (see tcf_exts_get_net comment). Prevent the user after free by holding the current list element

Re: [PATCH net 05/10] net: xdp: don't allow device-bound programs in driver mode

2017-11-20 Thread Jakub Kicinski
On Mon, 20 Nov 2017 07:36:39 -0700, David Ahern wrote: > On 11/19/17 9:55 PM, Jakub Kicinski wrote: > > diff --git a/net/core/dev.c b/net/core/dev.c > > index 09525a27319c..21de2d37a0ba 100644 > > --- a/net/core/dev.c > > +++ b/net/core/dev.c > > @@ -7143,6 +7143,13 @@ int dev_change_xdp_fd(struct

Re: [PATCH net 05/10] net: xdp: don't allow device-bound programs in driver mode

2017-11-20 Thread Daniel Borkmann
Hi Jakub, On 11/20/2017 11:02 PM, Jakub Kicinski wrote: > On Mon, 20 Nov 2017 07:36:39 -0700, David Ahern wrote: >> On 11/19/17 9:55 PM, Jakub Kicinski wrote: >>> diff --git a/net/core/dev.c b/net/core/dev.c >>> index 09525a27319c..21de2d37a0ba 100644 >>> --- a/net/core/dev.c >>> +++

[PATCH RFC net-next 2/4] udp: Move udp[46]_portaddr_hash() to net/ip[v6].h

2017-11-20 Thread Martin KaFai Lau
This patch moves the udp[46]_portaddr_hash() to net/ip[v6].h. The function name is renamed to ipv[46]_portaddr_hash(). It will be used by a later patch which adds a second listener hashtable hashed by the address and port. Signed-off-by: Martin KaFai Lau --- include/net/ip.h |

[PATCH RFC net-next 4/4] tcp: Enable 2nd listener hashtable in TCP

2017-11-20 Thread Martin KaFai Lau
Enable the second listener hashtable in TCP. The scale is the same as UDP which is one slot per 2MB. Signed-off-by: Martin KaFai Lau --- net/ipv4/tcp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index bf97317e6c97..180311636023 100644

[PATCH RFC net-next 1/4] inet: Add a count to struct inet_listen_hashbucket

2017-11-20 Thread Martin KaFai Lau
This patch adds a count to the 'struct inet_listen_hashbucket'. It counts how many sk is hashed to a bucket. It will be used to decide if the (to-be-added) portaddr listener's hashtable should be used during inet[6]_lookup_listener(). Signed-off-by: Martin KaFai Lau ---

[PATCH RFC net-next 0/4] tcp: Add a 2nd listener hashtable (port+addr)

2017-11-20 Thread Martin KaFai Lau
This patch set adds a 2nd listener hashtable. It is to resolve the performance issue when a process is listening at many IP addresses with the same port (e.g. [IP1]:443, [IP2]:443... [IPN]:443) Martin KaFai Lau (4): inet: Add a count to struct inet_listen_hashbucket udp: Move

[PATCH RFC net-next 3/4] inet: Add a 2nd listener hashtable (port+addr)

2017-11-20 Thread Martin KaFai Lau
The current listener hashtable is hashed by port only. When a process is listening at many IP addresses with the same port (e.g. [IP1]:443, [IP2]:443... [IPN]:443), the inet[6]_lookup_listener() performance is degraded to a link list. It is prone to syn attack. UDP had a similar issue and a

[PATCH ipsec] xfrm: add documentation for xfrm device offload api

2017-11-20 Thread Shannon Nelson
Add a writeup on how to use the XFRM device offload API, and mention this new file in the index. Signed-off-by: Shannon Nelson --- Documentation/networking/00-INDEX| 2 + Documentation/networking/xfrm_device.txt | 132 +++ 2 files

Re: [E1000-devel] Questions about crashes and GRO

2017-11-20 Thread Sarah Newman
On 11/20/2017 08:36 AM, Alexander Duyck wrote: > Hi Sarah, > > I am adding the netdev mailing list as I am not certain this is an > i350 specific issue. The traces themselves aren't anything I recognize > as an existing issue. From what I can tell it looks like you are > running Xen, so would I

Re: [PATCH] qed: fix unnecessary call to memset cocci warnings

2017-11-20 Thread Vasyl Gomonovych
It doesn't apply becouse of identical one qed: use kzalloc instead of kmalloc and memset.

Re: [PATCH] net: sched: crash on blocks with goto chain action

2017-11-20 Thread Roman Kapl
On 11/20/2017 06:54 PM, Cong Wang wrote: On Sun, Nov 19, 2017 at 8:17 AM, Roman Kapl wrote: tcf_block_put_ext has assumed that all filters (and thus their goto actions) are destroyed in RCU callback and thus can not race with our list iteration. However, that is not true during

Re: [RFC PATCH 5/5] selinux: Add SCTP support

2017-11-20 Thread Paul Moore
On Tue, Nov 14, 2017 at 4:52 PM, Richard Haines wrote: > On Mon, 2017-11-13 at 17:40 -0500, Paul Moore wrote: >> On Mon, Nov 13, 2017 at 5:05 PM, Richard Haines >> wrote: >> > On Mon, 2017-11-06 at 19:09 -0500, Paul Moore wrote:

Re: [E1000-devel] Questions about crashes and GRO

2017-11-20 Thread Alexander Duyck
On Mon, Nov 20, 2017 at 2:38 PM, Sarah Newman wrote: > On 11/20/2017 08:36 AM, Alexander Duyck wrote: >> Hi Sarah, >> >> I am adding the netdev mailing list as I am not certain this is an >> i350 specific issue. The traces themselves aren't anything I recognize >> as an

[PATCH v15 3/5] hinic: Replace PCI pool old API

2017-11-20 Thread Romain Perier
From: Romain Perier The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 10

[PATCH v15 1/5] block: DAC960: Replace PCI pool old API

2017-11-20 Thread Romain Perier
From: Romain Perier The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin

[PATCH v15 0/5] Replace PCI pool by DMA pool API

2017-11-20 Thread Romain Perier
by the dma pool API and remove the defines. Changes in v15: - Rebased series onto next-20171120 - Added patch 04/05 for mpt3sas scsi driver Changes in v14: - Rebased series onto next-20171018 - Rebased patch 03/05 on latest driver Changes in v13: - Rebased series onto next-20170906 - Added a new

[PATCH v15 4/5] scsi: mpt3sas: Replace PCI pool old API

2017-11-20 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier --- drivers/scsi/mpt3sas/mpt3sas_base.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[PATCH v15 5/5] PCI: Remove PCI pool macro functions

2017-11-20 Thread Romain Perier
From: Romain Perier Now that all the drivers use dma pool API, we can remove the macro functions for PCI pool. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- include/linux/pci.h | 9

  1   2   >