Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Samudrala, Sridhar
On 4/10/2018 11:03 PM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:59:02PM CEST, sridhar.samudr...@intel.com wrote: On 4/10/2018 8:43 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:27:48PM CEST, sridhar.samudr...@intel.com wrote: On 4/10/2018 8:22 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:13

Re: KASAN: slab-out-of-bounds Read in pfkey_add

2018-04-10 Thread Kevin Easton
On Mon, Apr 09, 2018 at 01:56:36AM -0400, Kevin Easton wrote: > On Sun, Apr 08, 2018 at 09:04:33PM -0700, Eric Biggers wrote: > ... > > > > Looks like this is going to be fixed by > > https://patchwork.kernel.org/patch/10327883/ ("af_key: Always verify length > > of > > provided sadb_key"), but i

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Jiri Pirko
Tue, Apr 10, 2018 at 05:59:02PM CEST, sridhar.samudr...@intel.com wrote: >On 4/10/2018 8:43 AM, Jiri Pirko wrote: >> Tue, Apr 10, 2018 at 05:27:48PM CEST, sridhar.samudr...@intel.com wrote: >> > On 4/10/2018 8:22 AM, Jiri Pirko wrote: >> > > Tue, Apr 10, 2018 at 05:13:40PM CEST, sridhar.samudr...@i

Re: KMSAN: uninit-value in tipc_subscrb_rcv_cb

2018-04-10 Thread syzbot
syzbot has found reproducer for the following crash on https://github.com/google/kmsan.git/master commit 35ff515e4bda2646f6c881d33951c306ea9c282a (Tue Apr 10 08:59:43 2018 +) Merge pull request #11 from parkerduckworth/readme syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=7

Re: [PATCH] net: dsa: b53: Replace mdelay with msleep in b53_switch_reset_gpio

2018-04-10 Thread Phil Reid
On 11/04/2018 09:51, Jia-Ju Bai wrote: b53_switch_reset_gpio() is never called in atomic context. The call chain ending up at b53_switch_reset_gpio() is: [1] b53_switch_reset_gpio() <- b53_switch_reset() <- b53_reset_switch() <- b53_setup() b53_switch_reset_gpio() is set as ".setup" in

[PATCH net 6/6] bnxt_en: Fix NULL pointer dereference at bnxt_free_irq().

2018-04-10 Thread Michael Chan
When open fails during ethtool -L ring change, for example, the driver may crash at bnxt_free_irq() because bp->bnapi is NULL. If we fail to allocate all the new rings, bnxt_open_nic() will free all the memory including bp->bnapi. Subsequent call to bnxt_close_nic() will try to dereference bp->bn

[PATCH net 3/6] bnxt_en: Ignore src port field in decap filter nodes

2018-04-10 Thread Michael Chan
From: Sriharsha Basavapatna The driver currently uses src port field (along with other fields) in the decap tunnel key, while looking up and adding tunnel nodes. This leads to redundant cfa_decap_filter_alloc() requests to the FW and flow-miss in the flow engine. Fix this by ignoring the src port

[PATCH net 5/6] bnxt_en: Need to include RDMA rings in bnxt_check_rings().

2018-04-10 Thread Michael Chan
With recent changes to reserve both L2 and RDMA rings, we need to include the RDMA rings in bnxt_check_rings(). Otherwise we will under-estimate the rings we need during ethtool -L and may lead to failure. Fixes: fbcfc8e46741 ("bnxt_en: Reserve completion rings and MSIX for bnxt_re RDMA driver."

[PATCH net 4/6] bnxt_en: Support max-mtu with VF-reps

2018-04-10 Thread Michael Chan
From: Sriharsha Basavapatna While a VF is configured with a bigger mtu (> 1500), any packets that are punted to the VF-rep (slow-path) get dropped by OVS kernel-datapath with the following message: "dropped over-mtu packet". Fix this by returning the max-mtu value for a VF-rep derived from its co

[PATCH net 2/6] bnxt_en: do not allow wildcard matches for L2 flows

2018-04-10 Thread Michael Chan
From: Andy Gospodarek Before this patch the following commands would succeed as far as the user was concerned: $ tc qdisc add dev p1p1 ingress $ tc filter add dev p1p1 parent : protocol all \ flower skip_sw action drop $ tc filter add dev p1p1 parent : protocol ipv4 \ flo

[PATCH net 0/6] bnxt_en: Fixes for net.

2018-04-10 Thread Michael Chan
This bug fix series include NULL pointer fixes in ethtool -x code path and in the error clean up path when freeing IRQs, a ring accounting bug that missed rings used by the RDMA driver, and 3 bug fixes related to TC Flower and VF-reps. Andy Gospodarek (1): bnxt_en: do not allow wildcard matche

[PATCH net 1/6] bnxt_en: Fix ethtool -x crash when device is down.

2018-04-10 Thread Michael Chan
Fix ethtool .get_rxfh() crash by checking for valid indirection table address before copying the data. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/b

[PATCH 1/2] isdn: hisax_fcpcipnp: Replace mdelay with usleep_range in fcpci_init

2018-04-10 Thread Jia-Ju Bai
fcpci_init() is never called in atomic context. The call chain ending up at fcpci_init() is: [1] fcpci_init() <- fcpcipnp_setup() <- fcpnp_probe() fcpnp_probe() is set as ".probe" in struct pnp_driver. This function is not called in atomic context. Despite never getting called from atomic contex

Re: [PATCH v3 0/2] vhost: fix vhost_vq_access_ok() log check

2018-04-10 Thread Jason Wang
On 2018年04月11日 10:35, Stefan Hajnoczi wrote: v3: * Rebased onto net/master and resolved conflict [DaveM] v2: * Rewrote the conditional to make the vq access check clearer [Linus] * Added Patch 2 to make the return type consistent and harder to misuse [Linus] The first patch fixes the v

[PATCH 2/2] isdn: hisax_fcpcipnp: Replace mdelay with usleep_range in fcpcipnp_setup

2018-04-10 Thread Jia-Ju Bai
fcpcipnp_setup() is never called in atomic context. The call chain ending up at fcpcipnp_setup() is: [1] fcpcipnp_setup() <- fcpnp_probe() fcpnp_probe() is set as ".probe" in struct pnp_driver. This function is not called in atomic context. Despite never getting called from atomic context, fcpci

[PATCH v3 1/2] vhost: fix vhost_vq_access_ok() log check

2018-04-10 Thread Stefan Hajnoczi
Commit d65026c6c62e7d9616c8ceb5a53b68bcdc050525 ("vhost: validate log when IOTLB is enabled") introduced a regression. The logic was originally: if (vq->iotlb) return 1; return A && B; After the patch the short-circuit logic for A was inverted: if (A || vq->iotlb) return A;

[PATCH v3 0/2] vhost: fix vhost_vq_access_ok() log check

2018-04-10 Thread Stefan Hajnoczi
v3: * Rebased onto net/master and resolved conflict [DaveM] v2: * Rewrote the conditional to make the vq access check clearer [Linus] * Added Patch 2 to make the return type consistent and harder to misuse [Linus] The first patch fixes the vhost virtqueue access check which was recently broken

[PATCH v3 2/2] vhost: return bool from *_access_ok() functions

2018-04-10 Thread Stefan Hajnoczi
Currently vhost *_access_ok() functions return int. This is error-prone because there are two popular conventions: 1. 0 means failure, 1 means success 2. -errno means failure, 0 means success Although vhost mostly uses #1, it does not do so consistently. umem_access_ok() uses #2. This patch cha

[PATCH] net: sun: cassini: Replace GFP_ATOMIC with GFP_KERNEL in cas_check_invariants

2018-04-10 Thread Jia-Ju Bai
cas_check_invariants() is never called in atomic context. cas_check_invariants() is only called by cas_init_one(), which is only set as ".probe" in struct pci_driver. Despite never getting called from atomic context, cas_check_invariants() calls alloc_pages() with GFP_ATOMIC, which does not slee

[PATCH] net: samsung: sxgbe: Replace mdelay with usleep_range in sxgbe_sw_reset

2018-04-10 Thread Jia-Ju Bai
sxgbe_sw_reset() is never called in atomic context. sxgbe_sw_reset() is only called by sxgbe_drv_probe(), which is only called by sxgbe_platform_probe(). sxgbe_platform_probe() is set as ".probe" in struct platform_driver. This function is not called in atomic context. Despite never getting call

Re: [virtio-dev] Re: [RFC] vhost: introduce mdev based hardware vhost backend

2018-04-10 Thread Jason Wang
On 2018年04月10日 22:23, Liang, Cunming wrote: -Original Message- From: Michael S. Tsirkin [mailto:m...@redhat.com] Sent: Tuesday, April 10, 2018 9:36 PM To: Liang, Cunming Cc: Paolo Bonzini; Bie, Tiwei; Jason Wang;alex.william...@redhat.com; ddut...@redhat.com; Duyck, Alexander H; virtio-

[PATCH] net: ieee802154: atusb: Replace GFP_ATOMIC with GFP_KERNEL in atusb_probe

2018-04-10 Thread Jia-Ju Bai
atusb_probe() is never called in atomic context. This function is only set as ".probe" in struct usb_driver. Despite never getting called from atomic context, atusb_probe() calls usb_alloc_urb() with GFP_ATOMIC, which does not sleep for allocation. GFP_ATOMIC is not necessary and can be replaced w

Re: [virtio-dev] Re: [RFC] vhost: introduce mdev based hardware vhost backend

2018-04-10 Thread Jason Wang
On 2018年04月10日 17:23, Liang, Cunming wrote: -Original Message- From: Paolo Bonzini [mailto:pbonz...@redhat.com] Sent: Tuesday, April 10, 2018 3:52 PM To: Bie, Tiwei ; Jason Wang Cc: m...@redhat.com; alex.william...@redhat.com; ddut...@redhat.com; Duyck, Alexander H ; virtio-dev@lists

[PATCH] intel: i40evf: Replace GFP_ATOMIC with GFP_KERNEL in i40evf_add_vlan

2018-04-10 Thread Jia-Ju Bai
i40evf_add_vlan() is never called in atomic context. i40evf_add_vlan() is only called by i40evf_vlan_rx_add_vid(), which is only set as ".ndo_vlan_rx_add_vid" in struct net_device_ops. ".ndo_vlan_rx_add_vid" is not called in atomic context. Despite never getting called from atomic context, i40e

Re: [virtio-dev] Re: [RFC] vhost: introduce mdev based hardware vhost backend

2018-04-10 Thread Stefan Hajnoczi
On Tue, Apr 10, 2018 at 09:23:53AM +, Liang, Cunming wrote: > If QEMU is going to build a user space driver framework there, we're open > mind on that, even leveraging DPDK as the underlay library. Looking forward > to more others' comments from community. There is already an NVMe VFIO drive

[PATCH] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-10 Thread Jia-Ju Bai
de4x5_hw_init() is never called in atomic context. de4x5_hw_init() is only called by de4x5_pci_probe(), which is only set as ".probe" in struct pci_driver. Despite never getting called from atomic context, de4x5_hw_init() calls mdelay() to busily wait. This is not necessary and can be replaced

[PATCH] net: dsa: b53: Replace mdelay with msleep in b53_switch_reset_gpio

2018-04-10 Thread Jia-Ju Bai
b53_switch_reset_gpio() is never called in atomic context. The call chain ending up at b53_switch_reset_gpio() is: [1] b53_switch_reset_gpio() <- b53_switch_reset() <- b53_reset_switch() <- b53_setup() b53_switch_reset_gpio() is set as ".setup" in struct dsa_switch_ops. This function is

Re: XDP_TX for virtio_net not working in recent kernel?

2018-04-10 Thread Jason Wang
On 2018年04月10日 18:17, Daniel Borkmann wrote: [ +jason +netdev ] On 04/10/2018 12:49 AM, Kimitoshi Takahashi wrote: Hello, I'm totally newbie. I want to try some examples under the samples/bpf of the kernel tree using the virtio_net driver in kvm, in order to get familiar with the XDP. Howe

[PATCH 2/2] net: can: sja1000: Replace mdelay with usleep_range in pcan_add_channels

2018-04-10 Thread Jia-Ju Bai
pcan_add_channels() is never called in atomic context. pcan_add_channels() is only called by pcan_probe(), which is only set as ".probe" in struct pcmcia_driver. Despite never getting called from atomic context, pcan_add_channels() calls mdelay() to busily wait. This is not necessary and can be

[PATCH 1/2] net: can: sja1000: Replace mdelay with usleep_range in peak_pci_probe

2018-04-10 Thread Jia-Ju Bai
peak_pci_probe() is never called in atomic context. peak_pci_probe() is set as ".probe" in struct pci_driver. Despite never getting called from atomic context, peak_pci_probe() calls mdelay() to busily wait. This is not necessary and can be replaced with usleep_range() to avoid busy waiting. Thi

RE: [virtio-dev] Re: [RFC] vhost: introduce mdev based hardware vhost backend

2018-04-10 Thread Tian, Kevin
> From: Liang, Cunming > Sent: Tuesday, April 10, 2018 10:24 PM > [...] > > > > As others said, we do not need to go overeboard. A couple of small > vendor- > > specific quirks in qemu isn't a big deal. > > It's quite challenge to identify it's small or not, there's no uniform metric. > > It's o

[PATCH 2/2] staging: irda: Replace mdelay with usleep_range in irda_usb_probe

2018-04-10 Thread Jia-Ju Bai
irda_usb_probe() is never called in atomic context. irda_usb_probe() is only set as ".probe" in struct usb_driver. Despite never getting called from atomic context, irda_usb_probe() calls mdelay() to busily wait. This is not necessary and can be replaced with usleep_range() to avoid busy waiting.

[PATCH 1/2] staging: irda: Replace mdelay with usleep_range in stir421x_fw_upload

2018-04-10 Thread Jia-Ju Bai
stir421x_fw_upload() is never called in atomic context. The call chain ending up at stir421x_fw_upload() is: [1] stir421x_fw_upload() <- stir421x_patch_device() <- irda_usb_probe() irda_usb_probe() is set as ".probe" in struct usb_driver. This function is not called in atomic context. Despite ne

Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Michael S. Tsirkin
On Tue, Apr 10, 2018 at 02:26:08PM -0700, Stephen Hemminger wrote: > On Tue, 10 Apr 2018 11:59:50 -0700 > Sridhar Samudrala wrote: > > > Use the registration/notification framework supported by the generic > > bypass infrastructure. > > > > Signed-off-by: Sridhar Samudrala > > --- > > Thanks f

Re: [PATCH v2 0/2] vhost: fix vhost_vq_access_ok() log check

2018-04-10 Thread Stefan Hajnoczi
On Tue, Apr 10, 2018 at 10:50:43AM -0400, David Miller wrote: > From: Jason Wang > Date: Tue, 10 Apr 2018 14:40:10 +0800 > > > On 2018年04月10日 13:26, Stefan Hajnoczi wrote: > >> v2: > >> * Rewrote the conditional to make the vq access check clearer [Linus] > >> * Added Patch 2 to make the retu

[PATCHv2] mISDN: Remove VLAs

2018-04-10 Thread Laura Abbott
There's an ongoing effort to remove VLAs[1] from the kernel to eventually turn on -Wvla. Remove the VLAs from the mISDN code by switching to using kstrdup in one place and using an upper bound in another. Signed-off-by: Laura Abbott --- v2: Switch to a tighter upper bound so we are allocating a

Re: [PATCH] make net_gso_ok return false when gso_type is zero(invalid)

2018-04-10 Thread Wenhua Shi
2018-04-10 18:32 GMT+02:00 Marcelo Ricardo Leitner : > On Sun, Apr 08, 2018 at 08:41:21PM +0200, Wenhua Shi wrote: >> 2018-04-08 18:51 GMT+02:00 David Miller : >> > >> > From: Wenhua Shi >> > Date: Fri, 6 Apr 2018 03:43:39 +0200 >> > >> > > Signed-off-by: Wenhua Shi >> > >> > This precondition s

[PATCH] net/tls: Remove VLA usage

2018-04-10 Thread Kees Cook
In the quest to remove VLAs from the kernel[1], this replaces the VLA size with the only possible size used in the code, and adds a mechanism to double-check future IV sizes. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook

[PATCH] netfilter: ftp helper: Support \n and \r terminators for PORT

2018-04-10 Thread Scott Parlane
The current code requires \r as the terminator directly after the last digit, and RFC959 indicates CRLF as the the terminator. However, we have seen in the wild a client sending packets with only \n Signed-off-by: Scott Parlane --- net/netfilter/nf_conntrack_ftp.c | 40 -

Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Stephen Hemminger
On Tue, 10 Apr 2018 16:44:47 -0700 Siwei Liu wrote: > On Tue, Apr 10, 2018 at 4:28 PM, Michael S. Tsirkin wrote: > > On Tue, Apr 10, 2018 at 02:26:08PM -0700, Stephen Hemminger wrote: > >> On Tue, 10 Apr 2018 11:59:50 -0700 > >> Sridhar Samudrala wrote: > >> > >> > Use the registration/noti

Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Siwei Liu
On Tue, Apr 10, 2018 at 4:28 PM, Michael S. Tsirkin wrote: > On Tue, Apr 10, 2018 at 02:26:08PM -0700, Stephen Hemminger wrote: >> On Tue, 10 Apr 2018 11:59:50 -0700 >> Sridhar Samudrala wrote: >> >> > Use the registration/notification framework supported by the generic >> > bypass infrastructure

[PATCH] ibmvnic: Define vnic_login_client_data name field as unsized array

2018-04-10 Thread Kees Cook
The "name" field of struct vnic_login_client_data is a char array of undefined length. This should be written as "char name[]" so the compiler can make better decisions about the field (for example, not assuming it's a single character). This was noticed while trying to tighten the CONFIG_FORTIFY_S

Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Michael S. Tsirkin
On Tue, Apr 10, 2018 at 02:26:08PM -0700, Stephen Hemminger wrote: > On Tue, 10 Apr 2018 11:59:50 -0700 > Sridhar Samudrala wrote: > > > Use the registration/notification framework supported by the generic > > bypass infrastructure. > > > > Signed-off-by: Sridhar Samudrala > > --- > > Thanks f

Re: [PATCH] net/mlx5: remove some extraneous spaces in indentations

2018-04-10 Thread Jason Gunthorpe
On Tue, Apr 10, 2018 at 05:22:54PM -0600, Jason Gunthorpe wrote: > On Mon, Apr 09, 2018 at 01:43:36PM +0100, Colin Ian King wrote: > > From: Colin Ian King > > > > There are several lines where there is an extraneous space causing > > indentation misalignment. Remove them. > > > > Cleans up Cocc

Re: [PATCH] net/mlx5: remove some extraneous spaces in indentations

2018-04-10 Thread Jason Gunthorpe
On Mon, Apr 09, 2018 at 01:43:36PM +0100, Colin Ian King wrote: > From: Colin Ian King > > There are several lines where there is an extraneous space causing > indentation misalignment. Remove them. > > Cleans up Cocconelle warnings: > > ./drivers/net/ethernet/mellanox/mlx5/core/qp.c:409:3-18:

Re: [PATCH bpf v4] bpf/tracing: fix a deadlock in perf_event_detach_bpf_prog

2018-04-10 Thread Daniel Borkmann
On 04/10/2018 06:37 PM, Yonghong Song wrote: > syzbot reported a possible deadlock in perf_event_detach_bpf_prog. > The error details: > == > WARNING: possible circular locking dependency detected > 4.16.0-rc7+ #3 Not tainted > ---

Re: [PATCH] selftests: bpf: update .gitignore with missing generated files

2018-04-10 Thread Daniel Borkmann
On 04/10/2018 02:24 PM, Anders Roxell wrote: > Signed-off-by: Anders Roxell Applied to bpf tree, thanks Anders!

Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Samudrala, Sridhar
On 4/10/2018 2:26 PM, Stephen Hemminger wrote: On Tue, 10 Apr 2018 11:59:50 -0700 Sridhar Samudrala wrote: Use the registration/notification framework supported by the generic bypass infrastructure. Signed-off-by: Sridhar Samudrala --- Thanks for doing this. Your current version has couple

Re: [RFC bpf-next v2 3/8] bpf: add documentation for eBPF helpers (12-22)

2018-04-10 Thread Alexei Starovoitov
On Tue, Apr 10, 2018 at 03:41:52PM +0100, Quentin Monnet wrote: > Add documentation for eBPF helper functions to bpf.h user header file. > This documentation can be parsed with the Python script provided in > another commit of the patch series, in order to provide a RST document > that can later be

Re: [RFC v3 net-next 13/18] net/sched: Introduce the TBS Qdisc

2018-04-10 Thread Jesus Sanchez-Palencia
Hi Thomas, On 04/10/2018 05:37 AM, Thomas Gleixner wrote: (...) >>> >>> - Simple feed through (Applications are time contraints aware and set the >>>exact schedule). qdisc has admission control. >> >> This will be provided by the tbs qdisc. It will still provide a txtime sorted >> list an

Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Stephen Hemminger
On Tue, 10 Apr 2018 11:59:50 -0700 Sridhar Samudrala wrote: > Use the registration/notification framework supported by the generic > bypass infrastructure. > > Signed-off-by: Sridhar Samudrala > --- Thanks for doing this. Your current version has couple show stopper issues. First, the slave

Re: [patch net] devlink: convert occ_get op to separate registration

2018-04-10 Thread Sasha Levin
On Tue, Apr 10, 2018 at 03:22:57PM -0400, David Miller wrote: >From: Sasha Levin >Date: Tue, 10 Apr 2018 19:08:20 + > >> The bot tries to take the "dumb" part out of your way, by letting >> you know from the start which trees this applied/built on and what >> dependencies it might have. It com

Re: [RFC net-next 1/2] net: net-porcfs: Reduce rcu lock critical section

2018-04-10 Thread Eric Dumazet
On 04/10/2018 10:16 AM, David Miller wrote: > > The tradeoff here is that now you are doing two unnecessary atomic > operations per stats dump. > > That is what the RCU lock allows us to avoid. > dev_hold() and dev_put() are actually per cpu increment and decrements, pretty cheap these days.

Re: [PATCH] net: dsa: Discard frames from unused ports

2018-04-10 Thread David Miller
Andrew, I'm working on -stable backports, and hit a snag when pulling this one into v4.14 4.14 predates the dsa_master_find_slave() helper, but even if I backport that, the data structures at this point lack the 'type' member for the test that you added. Can you put together a v4.14 backport, if

Re: [patch net] devlink: convert occ_get op to separate registration

2018-04-10 Thread David Miller
From: Sasha Levin Date: Tue, 10 Apr 2018 19:08:20 + > The bot tries to take the "dumb" part out of your way, by letting > you know from the start which trees this applied/built on and what > dependencies it might have. It comes for free, why not use it? I do this already while I'm processing

Re: [patch net] devlink: convert occ_get op to separate registration

2018-04-10 Thread Sasha Levin
On Tue, Apr 10, 2018 at 10:35:07AM -0400, David Miller wrote: >From: Sasha Levin >Date: Tue, 10 Apr 2018 13:49:40 + > >> This commit has been processed because it contains a "Fixes:" tag, >> fixing commit: d9f9b9a4d05f devlink: Add support for resource abstraction. >> >> The bot has tested the

[PATCH net 1/2] l2tp: fix races in tunnel creation

2018-04-10 Thread Guillaume Nault
l2tp_tunnel_create() inserts the new tunnel into the namespace's tunnel list and sets the socket's ->sk_user_data field, before returning it to the caller. Therefore, there are two ways the tunnel can be accessed and freed, before the caller even had the opportunity to take a reference. In practice

[PATCH net 0/2] l2tp: tunnel creation fixes

2018-04-10 Thread Guillaume Nault
L2TP tunnel creation is racy. We need to make sure that the tunnel returned by l2tp_tunnel_create() isn't going to be freed while the caller is using it. This is done in patch #1, by separating tunnel creation from tunnel registration. With the tunnel registration code in place, we can now check f

[PATCH net 2/2] l2tp: fix race in duplicate tunnel detection

2018-04-10 Thread Guillaume Nault
We can't use l2tp_tunnel_find() to prevent l2tp_nl_cmd_tunnel_create() from creating a duplicate tunnel. A tunnel can be concurrently registered after l2tp_tunnel_find() returns. Therefore, searching for duplicates must be done at registration time. Finally, remove l2tp_tunnel_find() entirely as i

[RFC PATCH net-next v6 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Sridhar Samudrala
This patch enables virtio_net to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to setup a bond/team between a VF and virtio net device in the guest. The hypervisor needs to enable only

[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-10 Thread Sridhar Samudrala
This provides a generic interface for paravirtual drivers to listen for netdev register/unregister/link change events from pci ethernet devices with the same MAC and takeover their datapath. The notifier and event handling code is based on the existing netvsc implementation. It exposes 2 sets of i

[RFC PATCH net-next v6 0/4] Enable virtio_net to act as a backup for a passthru device

2018-04-10 Thread Sridhar Samudrala
The main motivation for this patch is to enable cloud service providers to provide an accelerated datapath to virtio-net enabled VMs in a transparent manner with no/minimal guest userspace changes. This also enables hypervisor controlled live migration to be supported with VMs that have direct att

[RFC PATCH net-next v6 1/4] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-04-10 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a backup for another device with the same MAC address. VIRTIO_NET_F_BACKUP is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2 +- include/

[RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework

2018-04-10 Thread Sridhar Samudrala
Use the registration/notification framework supported by the generic bypass infrastructure. Signed-off-by: Sridhar Samudrala --- drivers/net/hyperv/Kconfig | 1 + drivers/net/hyperv/hyperv_net.h | 2 + drivers/net/hyperv/netvsc_drv.c | 208 ++-- 3 fil

Re: [RFC bpf-next v2 1/8] bpf: add script and prepare bpf.h for new helpers documentation

2018-04-10 Thread Alexei Starovoitov
On Tue, Apr 10, 2018 at 03:41:50PM +0100, Quentin Monnet wrote: > Remove previous "overview" of eBPF helpers from user bpf.h header. > Replace it by a comment explaining how to process the new documentation > (to come in following patches) with a Python script to produce RST, then > man page docume

[PATCH v2 iproute2-next 1/1] tc: jsonify skbedit action

2018-04-10 Thread Roman Mashak
v2: FIxed strings format in print_string() Signed-off-by: Roman Mashak --- tc/m_skbedit.c | 53 + 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c index db5c64caf2ba..7391fc7f158c 100644 --- a/t

Re: [RFC bpf-next v2 2/8] bpf: add documentation for eBPF helpers (01-11)

2018-04-10 Thread Alexei Starovoitov
On Tue, Apr 10, 2018 at 03:41:51PM +0100, Quentin Monnet wrote: > Add documentation for eBPF helper functions to bpf.h user header file. > This documentation can be parsed with the Python script provided in > another commit of the patch series, in order to provide a RST document > that can later be

Re: [RFC bpf-next v2 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-10 Thread Andrey Ignatov
Quentin Monnet [Tue, 2018-04-10 07:43 -0700]: > + * int bpf_bind(struct bpf_sock_addr_kern *ctx, struct sockaddr *addr, int > addr_len) > + * Description > + * Bind the socket associated to *ctx* to the address pointed by > + * *addr*, of length *addr_len*. This allows for m

[next-queue PATCH v7 05/10] igb: Add support for enabling queue steering in filters

2018-04-10 Thread Vinicius Costa Gomes
On some igb models (82575 and i210) the MAC address filters can control to which queue the packet will be assigned. This extends the 'state' with one more state to signify that queue selection should be enabled for that filter. As 82575 parts are no longer easily obtained (and this was developed

[next-queue PATCH v7 04/10] igb: Add support for MAC address filters specifying source addresses

2018-04-10 Thread Vinicius Costa Gomes
Makes it possible to direct packets to queues based on their source address. Documents the expected usage of the 'flags' parameter. Signed-off-by: Vinicius Costa Gomes --- .../net/ethernet/intel/igb/e1000_defines.h| 1 + drivers/net/ethernet/intel/igb/igb.h | 1 + drivers/net/ethe

[next-queue PATCH v7 02/10] igb: Fix queue selection on MAC filters on i210

2018-04-10 Thread Vinicius Costa Gomes
On the RAH registers there are semantic differences on the meaning of the "queue" parameter for traffic steering depending on the controller model: there is the 82575 meaning, which "queue" means a RX Hardware Queue, and the i350 meaning, where it is a reception pool. The previous behaviour was ha

[next-queue PATCH v7 06/10] igb: Allow filters to be added for the local MAC address

2018-04-10 Thread Vinicius Costa Gomes
Users expect that when adding a steering filter for the local MAC address, that all the traffic directed to that address will go to some queue. Currently, it's not possible to configure entries in the "in use" state, which is the normal state of the local MAC address entry (it is the default), thi

[next-queue PATCH v7 00/10] igb: offloading of receive filters

2018-04-10 Thread Vinicius Costa Gomes
Hi, Known issue: - It seems that the the QSEL bits in the RAH registers do not have any effect for source address (i.e. steering doesn't work for source address filters), everything is pointing to a hardware (or documentation) issue; Changes from v6: - Because the i210 doesn't support steeri

[next-queue PATCH v7 03/10] igb: Enable the hardware traffic class feature bit for igb models

2018-04-10 Thread Vinicius Costa Gomes
This will allow functionality depending on the hardware being traffic class aware to work. In particular the tc-flower offloading checks verifies that this bit is set. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/igb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff

[next-queue PATCH v7 07/10] igb: Enable nfc filters to specify MAC addresses

2018-04-10 Thread Vinicius Costa Gomes
This allows igb_add_filter()/igb_erase_filter() to work on filters that include MAC addresses (both source and destination). For now, this only exposes the functionality, the next commit glues ethtool into this. Later in this series, these APIs are used to allow offloading of cls_flower filters.

[next-queue PATCH v7 09/10] igb: Add the skeletons for tc-flower offloading

2018-04-10 Thread Vinicius Costa Gomes
This adds basic functions needed to implement offloading for filters created by tc-flower. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/igb_main.c | 66 +++ 1 file changed, 66 insertions(+) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/d

[next-queue PATCH v7 10/10] igb: Add support for adding offloaded clsflower filters

2018-04-10 Thread Vinicius Costa Gomes
This allows filters added by tc-flower and specifying MAC addresses, Ethernet types, and the VLAN priority field, to be offloaded to the controller. This reuses most of the infrastructure used by ethtool, but clsflower filters are kept in a separated list, so they are invisible to ethtool. To set

[next-queue PATCH v7 01/10] igb: Fix not adding filter elements to the list

2018-04-10 Thread Vinicius Costa Gomes
Because the order of the parameters passes to 'hlist_add_behind()' was inverted, the 'parent' node was added "behind" the 'input', as input is not in the list, this causes the 'input' node to be lost. Fixes: 0e71def25281 ("igb: add support of RX network flow classification") Signed-off-by: Viniciu

[next-queue PATCH v7 08/10] igb: Add MAC address support for ethtool nftuple filters

2018-04-10 Thread Vinicius Costa Gomes
This adds the capability of configuring the queue steering of arriving packets based on their source and destination MAC addresses. Source address steering (i.e. driving traffic to a specific queue), for the i210, does not work, but filtering does (i.e. accepting traffic based on the source addres

Re: [PATCH] ibmvnic: Disable irqs before exiting reset from closed state

2018-04-10 Thread David Miller
John, if you want this to be submitted to stable you'll need to provide backports for the various -stable trees and this patch doesn't even come close to applying cleanly to v4.16, for example. Thank you.

Re: [PATCH] net: wireless: b43legacy: Replace GFP_ATOMIC with GFP_KERNEL in dma_tx_fragment

2018-04-10 Thread Michael Büsch
On Tue, 10 Apr 2018 21:54:19 +0800 Jia-Ju Bai wrote: > dma_tx_fragment() is never called in atomic context. > > dma_tx_fragment() is only called by b43legacy_dma_tx(), which is > only called by b43legacy_tx_work(). > b43legacy_tx_work() is only set a parameter of INIT_WORK() in > b43legacy_wir

Re: [PATCH] net: bridge: add missing NULL checks

2018-04-10 Thread Laszlo Toth
On Mon, Apr 09, 2018 at 01:25:41AM +0300, Nikolay Aleksandrov wrote: > On 08/04/18 20:49, Laszlo Toth wrote: > >br_port_get_rtnl() can return NULL > > > >Signed-off-by: Laszlo Toth > >--- > > net/bridge/br_netlink.c | 12 ++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > >

Re: [RFC net-next 2/2] net: net-sysfs: Reduce netstat_show read_lock critical section

2018-04-10 Thread David Miller
From: Saeed Mahameed Date: Tue, 10 Apr 2018 10:08:12 -0700 > Instead of holding the device chain read_lock also while calling > dev_get_stats just hold it only to check dev_isalive, if the dev is alive, > hold that dev via dev_hold then release the read_lock. > > When done handling the device, d

Re: [RFC net-next 1/2] net: net-porcfs: Reduce rcu lock critical section

2018-04-10 Thread David Miller
From: Saeed Mahameed Date: Tue, 10 Apr 2018 10:08:11 -0700 > The current net proc fs sequence file implementation to show current > namespace netdevs list statistics and mc lists holds the rcu lock > throughout the whole process, from dev seq start up to dev seq stop. > > This is really greedy a

[RFC net-next 2/2] net: net-sysfs: Reduce netstat_show read_lock critical section

2018-04-10 Thread Saeed Mahameed
Instead of holding the device chain read_lock also while calling dev_get_stats just hold it only to check dev_isalive, if the dev is alive, hold that dev via dev_hold then release the read_lock. When done handling the device, dev_put it. Signed-off-by: Saeed Mahameed --- net/core/net-sysfs.c |

[RFC net-next 1/2] net: net-porcfs: Reduce rcu lock critical section

2018-04-10 Thread Saeed Mahameed
The current net proc fs sequence file implementation to show current namespace netdevs list statistics and mc lists holds the rcu lock throughout the whole process, from dev seq start up to dev seq stop. This is really greedy and demanding from device drivers since ndo_get_stats64 called from dev_

Re: [RFC bpf-next v2 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-10 Thread Yonghong Song
On 4/10/18 7:41 AM, Quentin Monnet wrote: Add documentation for eBPF helper functions to bpf.h user header file. This documentation can be parsed with the Python script provided in another commit of the patch series, in order to provide a RST document that can later be converted into a man page

[PATCH bpf v4] bpf/tracing: fix a deadlock in perf_event_detach_bpf_prog

2018-04-10 Thread Yonghong Song
syzbot reported a possible deadlock in perf_event_detach_bpf_prog. The error details: == WARNING: possible circular locking dependency detected 4.16.0-rc7+ #3 Not tainted -- syz-executo

Re: [PATCH] make net_gso_ok return false when gso_type is zero(invalid)

2018-04-10 Thread Marcelo Ricardo Leitner
On Sun, Apr 08, 2018 at 08:41:21PM +0200, Wenhua Shi wrote: > 2018-04-08 18:51 GMT+02:00 David Miller : > > > > From: Wenhua Shi > > Date: Fri, 6 Apr 2018 03:43:39 +0200 > > > > > Signed-off-by: Wenhua Shi > > > > This precondition should be made impossible instead of having to do > > an extra c

Re: [PATCH bpf v3] bpf/tracing: fix a deadlock in perf_event_detach_bpf_prog

2018-04-10 Thread Yonghong Song
On 4/10/18 1:54 AM, Daniel Borkmann wrote: On 04/10/2018 09:21 AM, Yonghong Song wrote: syzbot reported a possible deadlock in perf_event_detach_bpf_prog. The error details: == WARNING: possible circular locking dependency detected 4

Re: [RFC] connector: add group_exit_code and signal_flags fields to exit_proc_event

2018-04-10 Thread Stefan Strogin
Hi Evgeniy, On 09/04/18 02:49, Evgeniy Polyakov wrote: > Hi everyone > > Sorry for that late reply > > 01.03.2018, 21:58, "Stefan Strogin" : >> So I was thinking to add these two fields to union event_data: >> task->signal->group_exit_code >> task->signal->flags >> This won't increase size of st

Re: [PATCH net] sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6

2018-04-10 Thread Marcelo Ricardo Leitner
On Sun, Apr 08, 2018 at 07:52:08AM -0700, Eric Dumazet wrote: > Check must happen before call to ipv6_addr_v4mapped() Please don't forget to also Cc linux-s...@vger.kernel.org on sctp patches. Thanks!

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Samudrala, Sridhar
On 4/10/2018 8:43 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:27:48PM CEST, sridhar.samudr...@intel.com wrote: On 4/10/2018 8:22 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:13:40PM CEST, sridhar.samudr...@intel.com wrote: On 4/10/2018 3:55 AM, Jiri Pirko wrote: Mon, Apr 09, 2018 at 08:47:

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Siwei Liu
On Tue, Apr 10, 2018 at 8:43 AM, Jiri Pirko wrote: > Tue, Apr 10, 2018 at 05:27:48PM CEST, sridhar.samudr...@intel.com wrote: >>On 4/10/2018 8:22 AM, Jiri Pirko wrote: >>> Tue, Apr 10, 2018 at 05:13:40PM CEST, sridhar.samudr...@intel.com wrote: >>> > On 4/10/2018 3:55 AM, Jiri Pirko wrote: >>> > >

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Jiri Pirko
Tue, Apr 10, 2018 at 05:27:48PM CEST, sridhar.samudr...@intel.com wrote: >On 4/10/2018 8:22 AM, Jiri Pirko wrote: >> Tue, Apr 10, 2018 at 05:13:40PM CEST, sridhar.samudr...@intel.com wrote: >> > On 4/10/2018 3:55 AM, Jiri Pirko wrote: >> > > Mon, Apr 09, 2018 at 08:47:06PM CEST, sridhar.samudr...@i

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Samudrala, Sridhar
On 4/10/2018 8:22 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 05:13:40PM CEST, sridhar.samudr...@intel.com wrote: On 4/10/2018 3:55 AM, Jiri Pirko wrote: Mon, Apr 09, 2018 at 08:47:06PM CEST, sridhar.samudr...@intel.com wrote: On 4/9/2018 1:07 AM, Jiri Pirko wrote: Sat, Apr 07, 2018 at 12:59:1

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Jiri Pirko
Tue, Apr 10, 2018 at 05:13:40PM CEST, sridhar.samudr...@intel.com wrote: >On 4/10/2018 3:55 AM, Jiri Pirko wrote: >> Mon, Apr 09, 2018 at 08:47:06PM CEST, sridhar.samudr...@intel.com wrote: >> > On 4/9/2018 1:07 AM, Jiri Pirko wrote: >> > > Sat, Apr 07, 2018 at 12:59:14AM CEST, sridhar.samudr...@in

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-10 Thread Samudrala, Sridhar
On 4/10/2018 3:55 AM, Jiri Pirko wrote: Mon, Apr 09, 2018 at 08:47:06PM CEST, sridhar.samudr...@intel.com wrote: On 4/9/2018 1:07 AM, Jiri Pirko wrote: Sat, Apr 07, 2018 at 12:59:14AM CEST, sridhar.samudr...@intel.com wrote: On 4/6/2018 5:48 AM, Jiri Pirko wrote: Thu, Apr 05, 2018 at 11:08:22

Re: [PATCH net-next] netns: filter uevents correctly

2018-04-10 Thread Eric W. Biederman
Christian Brauner writes: > On Mon, Apr 09, 2018 at 06:21:31PM -0500, Eric W. Biederman wrote: >> Christian Brauner writes: >> >> > On Thu, Apr 05, 2018 at 10:59:49PM -0500, Eric W. Biederman wrote: >> >> Christian Brauner writes: >> >> >> >> > On Thu, Apr 05, 2018 at 05:26:59PM +0300, Kirill

Re: [PATCH net] ip_gre: clear feature flags when incompatible o_flags are set

2018-04-10 Thread David Miller
From: Sabrina Dubroca Date: Tue, 10 Apr 2018 12:57:18 +0200 > Commit dd9d598c6657 ("ip_gre: add the support for i/o_flags update via > netlink") added the ability to change o_flags, but missed that the > GSO/LLTX features are disabled by default, and only enabled some gre > features are unused. T

  1   2   >