[PATCH net] ipv6: Do not consider linkdown nexthops during multipath

2017-11-20 Thread Ido Schimmel
When the 'ignore_routes_with_linkdown' sysctl is set, we should not consider linkdown nexthops during route lookup. While the code correctly verifies that the initially selected route ('match') has a carrier, it does not perform the same check in the subsequent multipath selection, resulting in a

Re: [PATCH v2 1/2] r8169: fix RTL8111EVL EEE and green settings

2017-11-20 Thread Heiner Kallweit
Am 21.11.2017 um 02:34 schrieb Andrew Lunn: > Hi Heiner Hi Andrew, > > Do you have access to the data sheet? > Not to more recent ones. I only have two older data sheets for early members of the rtl8169 family. > I had a quick look through the driver. It would be nice to refactor it > to follow

Re: Linux ECN Handling

2017-11-20 Thread Steve Ibanez
Hi Neal, I tried your suggestion to disable tcp_tso_should_defer() and it does indeed look like it is preventing the host from entering timeouts. I'll have to do a bit more digging to try and find where the packets are being dropped. I've verified that the bottleneck link queue is capacity is at a

Re: [PATCH net-next] netlink: optimize err assignment

2017-11-20 Thread kbuild test robot
Hi yuan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/yuan-linyu/netlink-optimize-err-assignment/20171121-100409 config: i386-randconfig-x001-201747 (attached as .config) compiler: gcc-6 (Deb

[PATCH iproute2/net-next v4]tc: B.W limits can now be specified in %.

2017-11-20 Thread Nishanth Devarajan
This patch adapts the tc command line interface to allow bandwidth limits to be specified as a percentage of the interface's capacity. Adding this functionality requires passing the specified device string to each class/qdisc which changes the prototype for a couple of functions: the .parse_qopt a

Re: [PATCH v2 1/2] r8169: fix RTL8111EVL EEE and green settings

2017-11-20 Thread Andrew Lunn
Hi Heiner Do you have access to the data sheet? I had a quick look through the driver. It would be nice to refactor it to follow the usual Linux conventions: Turn the MDIO read/write functions into an MDIO bus driver. Move the PHY code into drivers/net/phy/realtek.c, and in the process, replace

[PATCH net] nfp: flower: add missing kdoc

2017-11-20 Thread Jakub Kicinski
Commit 0115552eac14 ("nfp: remove false positive offloads in flower vxlan") missed adding kdoc for a new parameter of nfp_flower_add_offload(). Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- drivers/net/ethernet/netronome/nfp/flower/offload.c | 1 + 1 file changed, 1 insertion(+)

[PATCH 2/3] net: use dev_alloc_name_ns instead of dev_get_valid_name

2017-11-20 Thread Rasmus Villemoes
The latter is simply a wrapper for the former; no need to keep both, so call dev_alloc_name_ns directly. Signed-off-by: Rasmus Villemoes --- drivers/net/tun.c | 2 +- net/core/dev.c| 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.

[PATCH 3/3] net: core: remove dev_get_valid_name

2017-11-20 Thread Rasmus Villemoes
No users left. Signed-off-by: Rasmus Villemoes --- include/linux/netdevice.h | 2 -- net/core/dev.c| 7 --- 2 files changed, 9 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e249d3d0ff85..7b057ef42906 100644 --- a/include/linux/netdevice.h

[PATCH 1/3] net: core: export dev_alloc_name_ns

2017-11-20 Thread Rasmus Villemoes
dev_alloc_name_ns and dev_get_valid_name now do exactly the same thing. Let's expose this functionality as dev_alloc_name_ns (obviously, a core function like this won't return an invalid name...). Signed-off-by: Rasmus Villemoes --- include/linux/netdevice.h | 1 + net/core/dev.c| 7

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

2017-11-20 Thread Daniel Borkmann
On 11/21/2017 12:21 AM, Jakub Kicinski wrote: > 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 w

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

2017-11-20 Thread Alexander Duyck
On Mon, Nov 20, 2017 at 3:35 PM, Sarah Newman wrote: > 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 thi

[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 --- a/net/ipv4/tc

[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 --- include/net/inet_hashtab

[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 udp[46]_portaddr

[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 | 9 +

[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 secon

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. The traces themselves aren't

[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, w

[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: Quentin Monnet Acked-by: Alexei

[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 Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- i

[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. Signed-of

[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 a/include/linux/bpf_verifier.h b/include/linux/bpf_v

[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 it

[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 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 | 6 -- 2 files changed,

[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 re

[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 capa

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 existing issue. From what I

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 be

[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 changed, 134 insertions(+)

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 >>> +++ b/net/core/de

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: [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: >> > > On Tue, Oct 17, 2017 at 9:59 AM, Richard Haines >> > > wrote

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 netns cleanup (s

[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 w

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.

[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 a

[PATCH] net: phy: cortina: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE

2017-11-20 Thread Jesse Chan
This change resolves a new compile-time warning when built as a loadable module: WARNING: modpost: missing MODULE_LICENSE() in drivers/net/phy/cortina.o see include/linux/module.h for more information This adds the license as "GPL", which matches the header of the file. MODULE_DESCRIPTION and MO

[net 1/1] tipc: fix access of released memory

2017-11-20 Thread Jon Maloy
When the function tipc_group_filter_msg() finds that a member event indicates that the member is leaving the group, it first deletes the member instance, and then purges the message queue being handled by the call. But the message queue is an aggregated field in the just deleted item, leading the p

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

2017-11-20 Thread Bjorn Helgaas
On Mon, Nov 20, 2017 at 08:32:47PM +0100, Romain Perier wrote: > 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 I already acked this once on Oct 24. Plea

[PATCH next] tools/hv: Fix IP reporting by KVP daemon with SRIOV

2017-11-20 Thread Haiyang Zhang
From: Haiyang Zhang On Hyper-V the VF NIC has the same MAC as the related synthetic NIC. VF NIC can work under the synthetic NIC transparently, without its own IP address. The existing KVP daemon only gets IP from the first NIC matching a MAC address, and may not be able to find the IP in this ca

[PATCH v15 2/5] net: e100: 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 Acked-by: Jeff Kirsher Tested-by: Peter Senna Tschudin --- drivers/net/ethernet/intel/

[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 Tested-by: Peter Senna Tschudin --- drivers/block/DAC960.c | 38 ++-

[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 --git a/drivers/scsi/mpt3sas/

[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 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 +- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h

[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 file changed, 9 deletions(-) diff --git a/include/linux/pci.h b/include/linux

Re: Regression in throughput between kvm guests over virtual bridge

2017-11-20 Thread Matthew Rosato
On 11/14/2017 03:11 PM, Matthew Rosato wrote: > On 11/12/2017 01:34 PM, Wei Xu wrote: >> On Sat, Nov 11, 2017 at 03:59:54PM -0500, Matthew Rosato wrote: > This case should be quite similar with pkgten, if you got improvement with > pktgen, usually it was also the same for UDP, could you ple

Payment #451712 issue

2017-11-20 Thread Anita Cochran
Greetings , Here is your invoice. Please ask, if you have any questions. Payment #451712 issue: http://www.nwbiomed.com/Invoice-number-5441676/ Respectfully Yours, Anita Cochran

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

2017-11-20 Thread Cong Wang
On Sun, Nov 19, 2017 at 9:36 AM, Roman Kapl wrote: > 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 reproduc

[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 (un)initializin

[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 insertions(+), 11 deletions(-) d

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, thanks

[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 operation

[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 proc_n

[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 changed, 2 insertions(+)

[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 taken

[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 exec

[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 Tk

[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 insertion(+) diff --git a/net/c

[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 --git a/net/netlink/af_

[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 + 1 file changed, 1 ins

[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 + 1 file changed, 1 inse

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 utils.h, include time.h for

[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 --- kernel/audit

[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 dyi

[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 + 1 file changed, 1 inser

[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 --- net/core/dev

[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 b/net/core/fib_notifier

[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 Tkha

[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 a/net/wireless/wext-core.c b/net/wireless/wext-

[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 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 a/net/unix/af_unix.c b/net/

[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 --git a/net/packet/af_packe

[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 a0ae1c9d37df..fb7cf120

[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 fro

[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 index 217f4e3b82f6..220

[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 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 93e172118a94..89683d868b37 100

[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 b/net/core/sysctl_net_core.c index cb

[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 d444daf1ac04..a66fad4c5ffa 10

[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: start_kernel()->proc_root_init()->proc_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. > > Signed-off-by: Sebastian

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 emulate

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 merges the IPsec >> GSO and non

[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 --- drivers/net/usb/qmi_wwan

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 comment). > > Pr

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 0

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() > >> need

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 ar

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 Cc: Herbert X

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: fd52bdae9ab0 ("wcn36xx

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 th

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 803

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 seem to be a > significa

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 can

  1   2   >