[RFC PATCH] bpf: Add helpers to read useful task_struct members

2017-11-02 Thread Sandipan Das
For added security, the layout of some structures can be randomized by enabling CONFIG_GCC_PLUGIN_RANDSTRUCT. One such structure is task_struct. To build BPF programs, we use Clang which does not support this feature. So, if we attempt to read a field of a structure with a randomized layout within

Re: [patch net-next v3 0/2] net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath

2017-11-02 Thread Jiri Pirko
Fri, Nov 03, 2017 at 02:24:48AM CET, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Tue, 31 Oct 2017 16:12:20 +0100 > >> From: Jiri Pirko >> >> This patchset's main patch is patch number 2. It carries the >> description and changelog. Patch 1 is just a dependency. > >This no longer applies

Re: [Patch net-next] net_sched: check NULL in tcf_block_put()

2017-11-02 Thread Jiri Pirko
Fri, Nov 03, 2017 at 01:32:08AM CET, xiyou.wangc...@gmail.com wrote: >Callers of tcf_block_put() could pass NULL so >we can't use block->q before checking if block is >NULL or not. > >tcf_block_put_ext() callers are fine, it is always >non-NULL. > >Fixes: 8c4083b30e56 ("net: sched: add block bind/u

Re: [PATCH][net-next] net: sched: cls_bpf: use bitwise & rather than logical && on gen_flags

2017-11-02 Thread David Miller
From: Colin King Date: Thu, 2 Nov 2017 20:04:12 + > From: Colin Ian King > > Currently gen_flags is being operated on by a logical && operator rather > than a bitwise & operator. This looks incorrect as these should be bit > flag operations. Fix this. > > Detected by CoverityScan, CID#146

Re: [PATCH] ISDN: eicon: message: mark expected switch fall-throughs

2017-11-02 Thread David Miller
From: "Gustavo A. R. Silva" Date: Thu, 2 Nov 2017 16:14:14 -0500 > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. ... > Signed-off-by: Gustavo A. R. Silva Applied.

Re: [PATCH] mISDN: hfcpci: Convert timers to use timer_setup()

2017-11-02 Thread David Miller
From: Kees Cook Date: Thu, 2 Nov 2017 16:18:07 -0700 > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Karsten Keil > Cc: "David S. Miller"

Re: [PATCH net-next] tcp: fix a lockdep issue in tcp_fastopen_reset_cipher()

2017-11-02 Thread David Miller
From: Eric Dumazet Date: Thu, 02 Nov 2017 11:53:04 -0700 > From: Eric Dumazet > > icsk_accept_queue.fastopenq.lock is only fully initialized at listen() > time. > > LOCKDEP is not happy if we attempt a spin_lock_bh() on it, because > of missing annotation. (Although kernel runs just fine) > >

Re: [PATCH net-next v2] bpf: fix verifier NULL pointer dereference

2017-11-02 Thread David Miller
From: Craig Gallek Date: Thu, 2 Nov 2017 11:18:01 -0400 > From: Craig Gallek > > do_check() can fail early without allocating env->cur_state under > memory pressure. Syzkaller found the stack below on the linux-next > tree because of this. ... > Fixes: 638f5b90d460 ("bpf: reduce verifier mem

Re: [net-next 1/1] tipc: eliminate unnecessary probing

2017-11-02 Thread David Miller
From: Jon Maloy Date: Thu, 2 Nov 2017 15:44:15 +0100 > The neighbor monitor employs a threshold, default set to 32 peer nodes, > where it activates the "Overlapping Neighbor Monitoring" algorithm. > Below that threshold, monitoring is full-mesh, and no "domain records" > are passed between the no

Re: [patch net-next] net: sched: move block offload unbind after all chains are flushed

2017-11-02 Thread David Miller
From: Jiri Pirko Date: Thu, 2 Nov 2017 15:07:01 +0100 > From: Jiri Pirko > > Currently, the offload unbind is done before the chains are flushed. > That causes driver to unregister block callback before it can get all > the callback calls done during flush, leaving the offloaded tps inside > t

Re: [PATCH net-next] cxgb4vf: define get_fecparam ethtool callback

2017-11-02 Thread David Miller
From: Ganesh Goudar Date: Thu, 2 Nov 2017 19:28:20 +0530 > Add support to new ethtool operation get_fecparam to > fetch FEC parameters. > > Original Work by: Casey Leedom > Signed-off-by: Ganesh Goudar Applied.

Re: [PATCH net-next] cxgb4: add new T6 pci device id's

2017-11-02 Thread David Miller
From: Ganesh Goudar Date: Thu, 2 Nov 2017 19:26:58 +0530 > Add 0x6086 T6 device id. > > Signed-off-by: Ganesh Goudar Applied.

Re: [PATCH net-next] net/ncsi: Make local function ncsi_get_filter() static

2017-11-02 Thread David Miller
From: Wei Yongjun Date: Thu, 2 Nov 2017 11:15:28 + > Fixes the following sparse warnings: > > net/ncsi/ncsi-manage.c:41:5: warning: > symbol 'ncsi_get_filter' was not declared. Should it be static? > > Signed-off-by: Wei Yongjun Applied, thank you.

Re: [PATCH 1/2] [net-next] net: bridge: Convert timers to use timer_setup()

2017-11-02 Thread David Miller
From: Allen Pais Date: Fri, 3 Nov 2017 11:51:10 +0530 > switch to using the new timer_setup() and from_timer() api's. > > Signed-off-by: Allen Pais Applied.

Re: [PATCH 2/2] [net-next] net: bridge: Convert timers to use timer_setup()

2017-11-02 Thread David Miller
From: Allen Pais Date: Fri, 3 Nov 2017 11:51:11 +0530 > switch to using the new timer_setup() and from_timer() api's. > > Signed-off-by: Allen Pais Applied.

Re: [patch net-next 0/6] mlxsw: Align multipath hash parameters with kernel's

2017-11-02 Thread David Miller
From: Jiri Pirko Date: Thu, 2 Nov 2017 17:14:04 +0100 > From: Jiri Pirko > > Ido says: > > This set makes sure the device is using the same parameters as the > kernel when it computes the multipath hash during IP forwarding. > > First patch adds a new netevent to let interested listeners kno

[PATCH net-next 07/15] nfp: bpf: drop support for cls_bpf with legacy actions

2017-11-02 Thread Jakub Kicinski
Only support BPF_PROG_TYPE_SCHED_CLS programs in direct action mode. This simplifies preparing the offload since there will now be only one mode of operation for that type of program. We need to know the attachment mode type of cls_bpf programs, because exit codes are interpreted differently for

[PATCH net-next 03/15] bpf: report offload info to user space

2017-11-02 Thread Jakub Kicinski
Extend struct bpf_prog_info to contain information about program being bound to a device. Since the netdev may get destroyed while program still exists we need a flag to indicate the program is loaded for a device, even if the device is gone. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horm

[PATCH net-next 04/15] bpftool: print program device bound info

2017-11-02 Thread Jakub Kicinski
If program is bound to a device, print the name of the relevant interface or unknown if the netdev has since been removed. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Quentin Monnet --- tools/bpf/bpftool/prog.c | 31 +++ tools/include/

[PATCH net-next 02/15] bpf: offload: add infrastructure for loading programs for a specific netdev

2017-11-02 Thread Jakub Kicinski
The fact that we don't know which device the program is going to be used on is quite limiting in current eBPF infrastructure. We have to reverse or limit the changes which kernel makes to the loaded bytecode if we want it to be offloaded to a networking device. We also have to invent new APIs for

[PATCH net-next 11/15] nfp: bpf: require seamless reload for program replace

2017-11-02 Thread Jakub Kicinski
Firmware supports live replacement of programs for quite some time now. Remove the software-fallback related logic and depend on the FW for program replace. Seamless reload will become a requirement if maps are present, anyway. Load and start stages have to be split now, since replace only needs

[PATCH net-next 08/15] nfp: bpf: remove the register renumbering leftovers

2017-11-02 Thread Jakub Kicinski
The register renumbering was removed and will not be coming back in its old, naive form, given that it would be fundamentally incompatible with calling functions. Remove the leftovers. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/jit.c

[PATCH net-next 06/15] cls_bpf: allow attaching programs loaded for specific device

2017-11-02 Thread Jakub Kicinski
If TC program is loaded with skip_sw flag, we should allow the device-specific programs to be accepted. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Quentin Monnet --- kernel/bpf/syscall.c | 1 + net/sched/cls_bpf.c | 10 +++--- 2 files changed, 8 insertions(+), 3

[PATCH net-next 12/15] nfp: bpf: move program prepare and free into offload.c

2017-11-02 Thread Jakub Kicinski
Most of offload/translation prepare logic will be moved to offload.c. To help git generate more reasonable diffs move nfp_prog_prepare() and nfp_prog_free() functions there as a first step. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/jit

[PATCH net-next 15/15] bpf: remove old offload/analyzer

2017-11-02 Thread Jakub Kicinski
Thanks to the ability to load a program for a specific device, running verifier twice is no longer needed. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- include/linux/bpf_verifier.h | 5 --- kernel/bpf/verifier.c| 73 net/cor

[PATCH net-next 09/15] nfp: bpf: remove unnecessary include of nfp_net.h

2017-11-02 Thread Jakub Kicinski
BPF offload's main header does not need to include nfp_net.h. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/main.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/netronome/nfp/bpf/main.h b/drivers/net/ethernet/netr

[PATCH net-next 14/15] nfp: bpf: move to new BPF program offload infrastructure

2017-11-02 Thread Jakub Kicinski
Following steps are taken in the driver to offload an XDP program: XDP_SETUP_PROG: * prepare: - allocate program state; - run verifier (bpf_analyzer()); - run translation; * load: - stop old program if needed; - load program; - enable BPF if not enabled; * clean up: - free

[PATCH net-next 13/15] nfp: bpf: move translation prepare to offload.c

2017-11-02 Thread Jakub Kicinski
struct nfp_prog is currently only used internally by the translator. This means there is a lot of parameter passing going on, between the translator and different stages of offload. Simplify things by allocating nfp_prog in offload.c already. We will now use kmalloc() to allocate the program area

[PATCH net-next 10/15] nfp: bpf: refactor offload logic

2017-11-02 Thread Jakub Kicinski
We currently create a fake cls_bpf offload object when we want to offload XDP. Simplify and clarify the code by moving the TC/XDP specific logic out of common offload code. This is easy now that we don't support legacy TC actions. We only need the bpf program and state of the skip_sw flag. Temp

[PATCH net-next 05/15] xdp: allow attaching programs loaded for specific device

2017-11-02 Thread Jakub Kicinski
Pass the netdev pointer to bpf_prog_get_type(). This way BPF code can decide whether the device matches what the code was loaded/translated for. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Quentin Monnet --- include/linux/bpf.h | 10 ++ kernel/bpf/syscall.c |

[PATCH net-next 01/15] net: bpf: rename ndo_xdp to ndo_bpf

2017-11-02 Thread Jakub Kicinski
ndo_xdp is a control path callback for setting up XDP in the driver. We can reuse it for other forms of communication between the eBPF stack and the drivers. Rename the callback and associated structures and definitions. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Quen

[PATCH net-next 00/15] bpf: add offload as a first class citizen

2017-11-02 Thread Jakub Kicinski
Hi! This series is my stab at what was discussed at a recent IOvisor bi-weekly call. The idea is to make the device translator run at the program load time. This makes the offload more explicit to the user space. It also makes it easy for the device translator to insert information into the ori

[PATCH 2/2] [net-next] net: bridge: Convert timers to use timer_setup()

2017-11-02 Thread Allen Pais
switch to using the new timer_setup() and from_timer() api's. Signed-off-by: Allen Pais --- net/bridge/br_stp_timer.c | 48 +++ 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/net/bridge/br_stp_timer.c b/net/bridge/br_stp_timer.c index

[PATCH 1/2] [net-next] net: bridge: Convert timers to use timer_setup()

2017-11-02 Thread Allen Pais
switch to using the new timer_setup() and from_timer() api's. Signed-off-by: Allen Pais --- net/bridge/br_multicast.c | 79 +++ 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index

[GIT] Networking

2017-11-02 Thread David Miller
Hopefully this is the last batch of networking fixes for 4.14 Fingers crossed... 1) Fix stmmac to use the proper sized OF property read, from Bhadram Varka. 2) Fix use after free in net scheduler tc action code, from Cong Wang. 3) Fix SKB control block mangling in tcp_make_synack(). 4)

Re: [PATCH net] tcp: do not mangle skb->cb[] in tcp_make_synack()

2017-11-02 Thread David Miller
From: Eric Dumazet Date: Thu, 02 Nov 2017 12:30:25 -0700 > From: Eric Dumazet > > Christoph Paasch sent a patch to address the following issue : > > tcp_make_synack() is leaving some TCP private info in skb->cb[], > then send the packet by other means than tcp_transmit_skb() > > tcp_transmit_

Re: [PATCH net v2] net: systemport: Correct IPG length settings

2017-11-02 Thread David Miller
From: Florian Fainelli Date: Thu, 2 Nov 2017 16:08:40 -0700 > Due to a documentation mistake, the IPG length was set to 0x12 while it > should have been 12 (decimal). This would affect short packet (64B > typically) performance since the IPG was bigger than necessary. > > Fixes: 44a4524c54af ("

Re: [PATCH net] fib: fib_dump_info can no longer use __in_dev_get_rtnl

2017-11-02 Thread David Miller
From: Florian Westphal Date: Thu, 2 Nov 2017 16:02:20 +0100 > syzbot reported yet another regression added with DOIT_UNLOCKED. > When nexthop is marked as dead, fib_dump_info uses __in_dev_get_rtnl(): > > ./include/linux/inetdevice.h:230 suspicious rcu_dereference_protected() usage! > rcu_sched

Re: [PATCH 1/2] net: bridge: Convert timers to use timer_setup()

2017-11-02 Thread Allen
switch to using the new timer_setup() and from_timer() api's. Signed-off-by: Allen Pais These two patches do not apply cleanly to net-next, please respin. Sure.

Re: [PATCH net-next] cxgb4: fix error return code in cxgb4_set_hash_filter()

2017-11-02 Thread David Miller
From: Wei Yongjun Date: Thu, 2 Nov 2017 11:15:07 + > Fix to return a negative error code from thecxgb4_alloc_atid() > error handling case instead of 0. > > Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") > Signed-off-by: Wei Yongjun Applied.

Re: [PATCH 1/2] [net-next] bpf: fix link error without CONFIG_NET

2017-11-02 Thread David Miller
From: Arnd Bergmann Date: Thu, 2 Nov 2017 12:05:51 +0100 > I ran into this link error with the latest net-next plus linux-next > trees when networking is disabled: > > kernel/bpf/verifier.o:(.rodata+0x2958): undefined reference to > `tc_cls_act_analyzer_ops' > kernel/bpf/verifier.o:(.rodata+0x

Re: [PATCH 2/2] [net-next] bpf: fix out-of-bounds access warning in bpf_check

2017-11-02 Thread David Miller
From: Arnd Bergmann Date: Thu, 2 Nov 2017 12:05:52 +0100 > The bpf_verifer_ops array is generated dynamically and may be > empty depending on configuration, which then causes an out > of bounds access: > > kernel/bpf/verifier.c: In function 'bpf_check': > kernel/bpf/verifier.c:4320:29: error: a

Re: [PATCH] stmmac: use of_property_read_u32 instead of read_u8

2017-11-02 Thread David Miller
From: Bhadram Varka Date: Thu, 2 Nov 2017 12:52:13 +0530 > Numbers in DT are stored in “cells” which are 32-bits > in size. of_property_read_u8 does not work properly > because of endianness problem. > > This causes it to always return 0 with little-endian > architectures. > > Fix it by using o

Re: [PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h

2017-11-02 Thread David Miller
From: Egil Hjelmeland Date: Thu, 2 Nov 2017 10:36:48 +0100 > The lan9303 driver defines eth_stp_addr as a synonym to > eth_reserved_addr_base to get the STP ethernet address 01:80:c2:00:00:00. > > eth_reserved_addr_base is also used to define the start of Bridge Reserved > ethernet address rang

Re: [PATCH 1/2] net: bridge: Convert timers to use timer_setup()

2017-11-02 Thread David Miller
From: Allen Pais Date: Thu, 2 Nov 2017 10:58:50 +0530 > switch to using the new timer_setup() and from_timer() api's. > > Signed-off-by: Allen Pais These two patches do not apply cleanly to net-next, please respin.

Re: [PATCH net-next] liquidio: bump up driver version to 1.7.0 to match newer NIC firmware

2017-11-02 Thread David Miller
From: Felix Manlunas Date: Wed, 1 Nov 2017 18:14:49 -0700 > Signed-off-by: Felix Manlunas > Acked-by: Derek Chickles Applied.

Re: [PATCH net 0/2] NULL pointer dereference in {ipvlan|macvlan}_port_destroy

2017-11-02 Thread David Miller
From: Girish Moodalbail Date: Tue, 31 Oct 2017 09:39:45 -0700 > When call to register_netdevice() (called from ipvlan_link_new()) > fails, inside that function we call ipvlan_uninit() (through > ndo_uninit()) to destroy the ipvlan port. Upon returning > unsuccessfully from register_netdevice() we

Re: Possible unsafe usage of skb->cb in virtio-net

2017-11-02 Thread Willem de Bruijn
On Thu, Nov 2, 2017 at 10:01 PM, Michael S. Tsirkin wrote: > On Thu, Nov 02, 2017 at 11:40:36AM +, Ilya Lesokhin wrote: >> Hi, >> I've noticed that the virtio-net uses skb->cb. >> >> I don't know all the detail by my understanding is it caused problem with >> the mlx5 driver >> and was fixed

Re: [RFC PATCH 00/14] Introducing AF_PACKET V4 support

2017-11-02 Thread Willem de Bruijn
On Tue, Oct 31, 2017 at 9:41 PM, Björn Töpel wrote: > From: Björn Töpel > > This RFC introduces AF_PACKET_V4 and PACKET_ZEROCOPY that are > optimized for high performance packet processing and zero-copy > semantics. Throughput improvements can be up to 40x compared to V2 and > V3 for the micro be

Re: Regression in throughput between kvm guests over virtual bridge

2017-11-02 Thread Matthew Rosato
On 10/31/2017 03:07 AM, Wei Xu wrote: > On Thu, Oct 26, 2017 at 01:53:12PM -0400, Matthew Rosato wrote: >> >>> >>> Are you using the same binding as mentioned in previous mail sent by you? it >>> might be caused by cpu convention between pktgen and vhost, could you please >>> try to run pktgen from

Re: [RFC PATCH 03/14] packet: enable AF_PACKET V4 rings

2017-11-02 Thread Willem de Bruijn
> +/** > + * tp4q_enqueue_from_array - Enqueue entries from packet array to tp4 queue > + * > + * @a: Pointer to the packet array to enqueue from > + * @dcnt: Max number of entries to enqueue > + * > + * Returns 0 for success or an errno at failure > + **/ > +static inline int tp4q_enqueue_from_arr

[PATCH net-next 4/6] net: hns3: add support for set_link_ksettings

2017-11-02 Thread Lipeng
From: Fuyun Liang This patch adds set_link_ksettings support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns

[PATCH net-next 1/6] net: hns3: fix for getting autoneg in hns3_get_link_ksettings

2017-11-02 Thread Lipeng
From: Fuyun Liang This patch fixes a bug for ethtool's get_link_ksettings(). When phy exists, we should get autoneg from phy rather than from mac. Because the value of mac.autoneg is invalid when phy exists. Fixes: 496d03e (net: hns3: Add Ethtool support to HNS3 driver) Signed-off-by: Fuyun Lian

[PATCH net-next 0/6] net: hns3: support set_link_ksettings and for nway_reset ethtool command

2017-11-02 Thread Lipeng
This patch-set adds support for set_link_ksettings && for nway_resets ethtool command and fixes some related ethtool bugs. 1, patch[4/6] adds support for ethtool_ops.set_link_ksettings. 2, patch[5/6] adds support ethtool_ops.for nway_reset. 3, patch[1/6,2/6,3/6,6/6] fix some bugs for getting port i

[PATCH net-next 5/6] net: hns3: add support for nway_reset

2017-11-02 Thread Lipeng
From: Fuyun Liang This patch adds nway_reset support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/

[PATCH net-next 2/6] net: hns3: fix for getting advertised_caps in hns3_get_link_ksettings

2017-11-02 Thread Lipeng
From: Fuyun Liang This patch fixes a bug for ethtool's get_link_ksettings(). The advertising for autoneg is always added to advertised_caps whether autoneg is enable or disable. This patch fixes it. Fixes: 496d03e (net: hns3: Add Ethtool support to HNS3 driver) Signed-off-by: Fuyun Liang Signed

[PATCH net-next 6/6] net: hns3: fix a bug for phy supported feature initialization

2017-11-02 Thread Lipeng
From: Fuyun Liang This patch fixes a bug for phy supported feature initialization. Currently, the value of phydev->supported is initialized by kernel. So it includes many features that we do not support, such as SUPPORTED_FIBRE and SUPPORTED_BNC. This patch fixes it. Fixes: 256727d (net: hns3: A

[PATCH net-next 3/6] net: hns3: fix a bug in hns3_driv_to_eth_caps

2017-11-02 Thread Lipeng
From: Fuyun Liang The value of link_modes.advertising and the value of link_modes.supported is initialized to zero every time in for loop in hns3_driv_to_eth_caps(). But we just want to set specified bit for them. Initialization is unnecessary. This patch fixes it. Fixes: 496d03e (net: hns3: Add

Re: [RFC PATCH 07/14] packet: wire up zerocopy for AF_PACKET V4

2017-11-02 Thread Willem de Bruijn
On Tue, Oct 31, 2017 at 9:41 PM, Björn Töpel wrote: > From: Björn Töpel > > This commits adds support for zerocopy mode. Note that zerocopy mode > requires that the network interface has been bound to the socket using > the bind syscall, and that the corresponding netdev implements the > AF_PACKE

Re: [RFC PATCH 02/14] packet: implement PACKET_MEMREG setsockopt

2017-11-02 Thread Willem de Bruijn
On Tue, Oct 31, 2017 at 9:41 PM, Björn Töpel wrote: > From: Björn Töpel > > Here, the PACKET_MEMREG setsockopt is implemented for the AF_PACKET > protocol family. PACKET_MEMREG allows the user to register memory > regions that can be used by AF_PACKET V4 as packet data buffers. > > Signed-off-by:

Re: [net-next v2 3/4] openvswitch: Add meter infrastructure

2017-11-02 Thread Andy Zhou
On Thu, Nov 2, 2017 at 5:07 AM, Pravin Shelar wrote: > On Thu, Nov 2, 2017 at 3:07 AM, Andy Zhou wrote: >> On Fri, Oct 20, 2017 at 8:32 PM, Pravin Shelar wrote: >>> On Thu, Oct 19, 2017 at 5:58 PM, Andy Zhou wrote: On Thu, Oct 19, 2017 at 02:47 Pravin Shelar wrote: > > On Tue

Re: [PATCH net-next] tcp: tcp_fragment() should not assume rtx skbs

2017-11-02 Thread Soheil Hassas Yeganeh
On Thu, Nov 2, 2017 at 9:16 PM, Neal Cardwell wrote: > On Thu, Nov 2, 2017 at 9:10 PM, Eric Dumazet wrote: >> From: Eric Dumazet >> >> While stress testing MTU probing, we had crashes in list_del() that we >> root-caused >> to the fact that tcp_fragment() is unconditionally inserting the freshl

Re: [RFC PATCH 01/14] packet: introduce AF_PACKET V4 userspace API

2017-11-02 Thread Willem de Bruijn
>>> +/* >>> + * struct tpacket_memreg_req is used in conjunction with PACKET_MEMREG >>> + * to register user memory which should be used to store the packet >>> + * data. >>> + * >>> + * There are some constraints for the memory being registered: >>> + * - The memory area has to be memory page size

Re: [PATCH net-next v15] openvswitch: enable NSH support

2017-11-02 Thread Yang, Yi
On Thu, Nov 02, 2017 at 05:06:47AM -0700, Pravin Shelar wrote: > On Wed, Nov 1, 2017 at 7:50 PM, Yang, Yi wrote: > > On Thu, Nov 02, 2017 at 08:52:40AM +0800, Pravin Shelar wrote: > >> On Tue, Oct 31, 2017 at 9:03 PM, Yi Yang wrote: > >> > > >> > OVS master and 2.8 branch has merged NSH userspace

Re: [PATCH net] add support of IFF_XMIT_DST_RELEASE bit in vlan

2017-11-02 Thread Eric Dumazet
On Fri, 2017-11-03 at 01:39 +0300, Vadim Fedorenko wrote: > Do you mean what happens with vlan device with real_dev is bonding ? > > With patches: > 1) A is added >bond_enslave() > bond_compute_features() > -> bond_dev IFF_XMIT_DST_RELEASE is not changed (set) >netde

Re: [Patch net 0/2] net_sched: fix a use-after-free for tc actions

2017-11-02 Thread David Miller
From: Cong Wang Date: Wed, 1 Nov 2017 10:23:48 -0700 > This patchset fixes a use-after-free reported by Lucas > and closes potential races too. > > Please see each patch for details. > > Cc: Jamal Hadi Salim > Cc: Jiri Pirko > Signed-off-by: Cong Wang Series applied, thanks.

Re: [patch net-next v3 0/2] net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath

2017-11-02 Thread David Miller
From: Jiri Pirko Date: Tue, 31 Oct 2017 16:12:20 +0100 > From: Jiri Pirko > > This patchset's main patch is patch number 2. It carries the > description and changelog. Patch 1 is just a dependency. This no longer applies cleanly and will require a respin. Thanks.

Re: [PATCH net-next] tcp: tcp_fragment() should not assume rtx skbs

2017-11-02 Thread Neal Cardwell
On Thu, Nov 2, 2017 at 9:10 PM, Eric Dumazet wrote: > From: Eric Dumazet > > While stress testing MTU probing, we had crashes in list_del() that we > root-caused > to the fact that tcp_fragment() is unconditionally inserting the freshly > allocated > skb into tsorted_sent_queue list. > > But th

Re: [PATCH v2 net-next] tcp: add tracepoint trace_tcp_retransmit_synack()

2017-11-02 Thread David Miller
From: Song Liu Date: Mon, 30 Oct 2017 14:41:35 -0700 > This tracepoint can be used to trace synack retransmits. It maintains > pointer to struct request_sock. > > We cannot simply reuse trace_tcp_retransmit_skb() here, because the > sk here is the LISTEN socket. The IP addresses and ports should

Re: Bond recovery from BOND_LINK_FAIL state not working

2017-11-02 Thread Jay Vosburgh
Alex Sidorenko wrote: >On 11/02/2017 12:51 AM, Jay Vosburgh wrote: >> Jarod Wilson wrote: >> >>> On 2017-11-01 8:35 PM, Jay Vosburgh wrote: Jay Vosburgh wrote: > Alex Sidorenko wrote: > >> The problem has been found while trying to deploy RHEL7 on HPE Synergy >> platfo

Re: [PATCH v2 net-next] ipv6: Implement limits on Hop-by-Hop and Destination options

2017-11-02 Thread David Miller
From: Tom Herbert Date: Mon, 30 Oct 2017 14:16:00 -0700 > RFC 8200 (IPv6) defines Hop-by-Hop options and Destination options > extension headers. Both of these carry a list of TLVs which is > only limited by the maximum length of the extension header (2048 > bytes). By the spec a host must proces

[PATCH net-next] tcp: tcp_fragment() should not assume rtx skbs

2017-11-02 Thread Eric Dumazet
From: Eric Dumazet While stress testing MTU probing, we had crashes in list_del() that we root-caused to the fact that tcp_fragment() is unconditionally inserting the freshly allocated skb into tsorted_sent_queue list. But this list is supposed to contain skbs that were sent. This was mostly h

Re: [PATCH] Net: netfilter: Moved vmalloc call to kmalloc call

2017-11-02 Thread David Miller
From: Charlie Sale Date: Thu, 2 Nov 2017 19:17:27 -0400 > Fixed FIXME comment in code my changing a vmalloc call > to a kmalloc call. Thought it would be a good place to > start for a first patch. > > Signed-off-by: Charlie Sale Since this code you are posting doesn't even compile, we have to

Re: [PATCH net-next 09/12] tools: bpftool: turn err() and info() macros into functions

2017-11-02 Thread Joe Perches
On Mon, 2017-10-23 at 09:24 -0700, Jakub Kicinski wrote: > From: Quentin Monnet > > Turn err() and info() macros into functions. > > In order to avoid naming conflicts with variables in the code, rename > them as p_err() and p_info() respectively. > > The behavior of these functions is similar

Re: [PATCH net-next] tools: bpf: handle long path in jit disasm

2017-11-02 Thread David Miller
From: "Rustad, Mark D" Date: Thu, 2 Nov 2017 21:19:44 + > >> On Nov 2, 2017, at 1:09 AM, Prashant Bhole >> wrote: >> >> Use PATH_MAX instead of hardcoded array size 256 >> >> Signed-off-by: Prashant Bhole ... >> static void get_asm_insns(uint8_t *image, size_t len, int opcodes) >> { >>

[PATCH resend 0/2] capability controlled user-namespaces

2017-11-02 Thread Mahesh Bandewar
From: Mahesh Bandewar TL;DR version - Creating a sandbox environment with namespaces is challenging considering what these sandboxed processes can engage into. e.g. CVE-2017-6074, CVE-2017-7184, CVE-2017-7308 etc. just to name few. Current form of user-namespaces, however, if changed

[PATCH resend 2/2] userns: control capabilities of some user namespaces

2017-11-02 Thread Mahesh Bandewar
From: Mahesh Bandewar With this new notion of "controlled" user-namespaces, the controlled user-namespaces are marked at the time of their creation while the capabilities of processes that belong to them are controlled using the global mask. Init-user-ns is always uncontrolled and a process that

[PATCH resend 1/2] capability: introduce sysctl for controlled user-ns capability whitelist

2017-11-02 Thread Mahesh Bandewar
From: Mahesh Bandewar Add a sysctl variable kernel.controlled_userns_caps_whitelist. This takes input as capability mask expressed as two comma separated hex u32 words. The mask, however, is stored in kernel as kernel_cap_t type. Any capabilities that are not part of this mask will be controlled

[Patch net-next] net_sched: check NULL in tcf_block_put()

2017-11-02 Thread Cong Wang
Callers of tcf_block_put() could pass NULL so we can't use block->q before checking if block is NULL or not. tcf_block_put_ext() callers are fine, it is always non-NULL. Fixes: 8c4083b30e56 ("net: sched: add block bind/unbind notif. and extended block_get/put") Reported-by: Dave Taht Cc: Jiri P

Re: Oops with HTB on net-next

2017-11-02 Thread Cong Wang
On Thu, Nov 2, 2017 at 4:34 PM, Dave Taht wrote: > On Thu, Nov 2, 2017 at 11:09 AM, Cong Wang wrote: >> On Wed, Nov 1, 2017 at 1:17 PM, Dave Taht wrote: >>> >>> That is not in net-next, and the "net" version of that one patch does >>> not apply to net-next. The relevant thread says "... another

Re: [PATCH] Net: netfilter: Moved vmalloc call to kmalloc call

2017-11-02 Thread Florian Westphal
Charlie Sale wrote: > Fixed FIXME comment in code my changing a vmalloc call > to a kmalloc call. Thought it would be a good place to > start for a first patch. Please at least compile test your patches. > - /* FIXME: don't use vmalloc() here or anywhere else -HW */ > - hinfo = vmalloc(s

[jkirsher/next-queue PATCH 4/5] dev: Clean-up __skb_tx_hash to match up with traffic class based configs

2017-11-02 Thread Alexander Duyck
From: Alexander Duyck This patch is mostly just a minor clean-up so that we avoid letting a packet jump from one traffic class to another just based on the Rx queue. Instead we now use that queue number as an offset within the traffic class. Handling it this way allows us to operate more cleanly

[jkirsher/next-queue PATCH 5/5] dev: Cap number of queues even with accel_priv

2017-11-02 Thread Alexander Duyck
From: Alexander Duyck With the recent fix to ixgbe we can cap the number of queues always regardless of if accel_priv is being used or not since the actual number of queues are being reported via real_num_tx_queues. Signed-off-by: Alexander Duyck --- net/core/dev.c |3 +-- 1 file changed,

[jkirsher/next-queue PATCH 3/5] ixgbe: Fix handling of macvlan Tx offload

2017-11-02 Thread Alexander Duyck
From: Alexander Duyck This update makes it so that we report the actual number of Tx queues via real_num_tx_queues but are still restricted to RSS on only the first pool by setting num_tc equal to 1. Doing this locks us into only having the ability to setup XPS on the queues in that pool, and onl

Re: Oops with HTB on net-next

2017-11-02 Thread Dave Taht
On Thu, Nov 2, 2017 at 11:09 AM, Cong Wang wrote: > On Wed, Nov 1, 2017 at 1:17 PM, Dave Taht wrote: >> >> That is not in net-next, and the "net" version of that one patch does >> not apply to net-next. The relevant thread says "... another fun merge >> into net-next". >> >> Please let me know wh

[jkirsher/next-queue PATCH 1/5] ixgbe: Fix interaction between SR-IOV and macvlan offload

2017-11-02 Thread Alexander Duyck
From: Alexander Duyck When SR-IOV was enabled the macvlan offload was configuring several filters with the wrong pool value. This would result in the macvlan interfaces not being able to receive traffic that had to pass over the physical interface. To fix it wrap the pool argument in the VMDQ_P

[jkirsher/next-queue PATCH 2/5] fm10k: Fix VLAN configuration for macvlan offload

2017-11-02 Thread Alexander Duyck
From: Alexander Duyck The fm10k driver didn't work correctly when macvlan offload was enabled. Specifically what would occur is that we would see no unicast packets being received. This was traced down to us not correctly configuring the default VLAN ID for the port and defaulting to 0. To corre

[jkirsher/next-queue PATCH 0/5] macvlan offload fixes

2017-11-02 Thread Alexander Duyck
I'm looking at performing a refactor of the macvlan offload code. However before I started I wanted to at least get things into a running state. The patches in this set are needed to address a number of issues that were preventing things from working as they were supposed to. With these changes in

[PATCH] Net: netfilter: Moved vmalloc call to kmalloc call

2017-11-02 Thread Charlie Sale
Fixed FIXME comment in code my changing a vmalloc call to a kmalloc call. Thought it would be a good place to start for a first patch. Signed-off-by: Charlie Sale --- net/netfilter/xt_hashlimit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/netfilter/xt_hashlimi

[PATCH] mISDN: hfcpci: Convert timers to use timer_setup()

2017-11-02 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Karsten Keil Cc: "David S. Miller" Cc: Arvind Yadav Cc: Geliang Tang Cc: netdev@vger.kernel.org Sign

Re: [PATCH 1/2] bpf: add a bpf_override_function helper

2017-11-02 Thread Daniel Borkmann
Hi Josef, one more issue I just noticed, see comment below: On 11/02/2017 03:37 PM, Josef Bacik wrote: [...] diff --git a/include/linux/filter.h b/include/linux/filter.h index cdd78a7beaae..dfa44fd74bae 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -458,7 +458,8 @@ struct

[PATCH net v2] net: systemport: Correct IPG length settings

2017-11-02 Thread Florian Fainelli
Due to a documentation mistake, the IPG length was set to 0x12 while it should have been 12 (decimal). This would affect short packet (64B typically) performance since the IPG was bigger than necessary. Fixes: 44a4524c54af ("net: systemport: Add support for SYSTEMPORT Lite") Signed-off-by: Florian

Re: [PATCH ipsec] xfrm: do unconditional template resolution before pcpu cache check

2017-11-02 Thread Paul Moore
On Thu, Nov 2, 2017 at 11:46 AM, Florian Westphal wrote: > Stephen Smalley says: > Since 4.14-rc1, the selinux-testsuite has been encountering sporadic > failures during testing of labeled IPSEC. git bisect pointed to > commit ec30d ("xfrm: add xdst pcpu cache"). > The xdst pcpu cache is only

Re: [PATCH 6/7] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-02 Thread David Daney
On 11/02/2017 12:13 PM, Florian Fainelli wrote: On 11/01/2017 05:36 PM, David Daney wrote: From: Carlos Munoz The Cavium OCTEON cn78xx and cn73xx SoCs have network packet I/O hardware that is significantly different from previous generations of the family. Add a new driver for this hardware.

Re: [PATCH net-next 1/1] net sched qdisc: pass netlink message flags in event notification

2017-11-02 Thread Roman Mashak
Cong Wang writes: > On Mon, Oct 30, 2017 at 2:17 PM, Roman Mashak wrote: >> Cong Wang writes: >> >>> On Mon, Oct 30, 2017 at 11:07 AM, Roman Mashak wrote: Cong Wang writes: > On Sat, Oct 28, 2017 at 8:36 PM, Roman Mashak wrote: >> Cong Wang writes: > > Hmm, I thoug

Re: [PATCH net] add support of IFF_XMIT_DST_RELEASE bit in vlan

2017-11-02 Thread Vadim Fedorenko
On 02.11.2017 19:25, Eric Dumazet wrote: On Thu, 2017-11-02 at 17:47 +0300, Vadim Fedorenko wrote: On Thu, 2017-11-02 at 07:33 -7000, Eric Dumazet wrote: On Thu, 2017-11-02 at 15:49 +0300, Vadim Fedorenko wrote: Some time ago Eric Dumazet suggested a "hack the IFF_XMIT_DST_RELEASE flag on th

Re: [RFC PATCH] xfrm: fix regression introduced by xdst pcpu cache

2017-11-02 Thread Paul Moore
On Thu, Nov 2, 2017 at 8:58 AM, Stephen Smalley wrote: > On Wed, 2017-11-01 at 17:39 -0400, Paul Moore wrote: >> On Tue, Oct 31, 2017 at 7:08 PM, Florian Westphal >> wrote: >> > Paul Moore wrote: >> > > On Mon, Oct 30, 2017 at 10:58 AM, Stephen Smalley > > > gov> wrote: >> > > > matching before

Re: [PATCH 2/2] [net-next] bpf: fix out-of-bounds access warning in bpf_check

2017-11-02 Thread Daniel Borkmann
On 11/02/2017 12:05 PM, Arnd Bergmann wrote: The bpf_verifer_ops array is generated dynamically and may be empty depending on configuration, which then causes an out of bounds access: kernel/bpf/verifier.c: In function 'bpf_check': kernel/bpf/verifier.c:4320:29: error: array subscript is above a

Re: [PATCH 1/2] [net-next] bpf: fix link error without CONFIG_NET

2017-11-02 Thread Daniel Borkmann
On 11/02/2017 12:05 PM, Arnd Bergmann wrote: I ran into this link error with the latest net-next plus linux-next trees when networking is disabled: kernel/bpf/verifier.o:(.rodata+0x2958): undefined reference to `tc_cls_act_analyzer_ops' kernel/bpf/verifier.o:(.rodata+0x2970): undefined referenc

Re: [PATCH net-next v2] bpf: fix verifier NULL pointer dereference

2017-11-02 Thread Daniel Borkmann
On 11/02/2017 04:18 PM, Craig Gallek wrote: From: Craig Gallek do_check() can fail early without allocating env->cur_state under memory pressure. Syzkaller found the stack below on the linux-next tree because of this. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL

  1   2   3   4   >