Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-09 Thread Siwei Liu
On Sun, Apr 8, 2018 at 9:32 AM, David Miller wrote: > From: Siwei Liu > Date: Fri, 6 Apr 2018 19:32:05 -0700 > >> And I assume everyone here understands the use case for live >> migration (in the context of providing cloud service) is very >> different, and we have to hide the netdevs. If not, I'

Re: [RFC PATCH v2 00/14] Introducing AF_XDP support

2018-04-09 Thread Björn Töpel
2018-04-09 23:51 GMT+02:00 William Tu : > On Tue, Mar 27, 2018 at 9:59 AM, Björn Töpel wrote: >> From: Björn Töpel >> >> This RFC introduces a new address family called AF_XDP that is >> optimized for high performance packet processing and, in upcoming >> patch sets, zero-copy semantics. In this

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

2018-04-09 Thread Jason Wang
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 return type consistent and harder to misuse [Linus] The first patch fixes the vhost virtqueue access check which was recently broken. The sec

Re: [PATCH] slip: Check if rstate is initialized before uncompressing

2018-04-09 Thread tejaswit
On 2018-04-09 20:34, David Miller wrote: From: Tejaswi Tanikella Date: Mon, 9 Apr 2018 14:23:49 +0530 @@ -673,6 +677,7 @@ struct slcompress * if (cs->cs_tcp.doff > 5) memcpy(cs->cs_tcpopt, icp + ihl*4 + sizeof(struct tcphdr), (cs->cs_tcp.doff - 5) * 4); cs->cs_hsize = ihl

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

2018-04-09 Thread Stefan Hajnoczi
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. The second patch replaces the int return type with bool to

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

2018-04-09 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 v2 2/2] vhost: return bool from *_access_ok() functions

2018-04-09 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

Re: [RFC] vhost: introduce mdev based hardware vhost backend

2018-04-09 Thread Tiwei Bie
On Tue, Apr 10, 2018 at 10:52:52AM +0800, Jason Wang wrote: > On 2018年04月02日 23:23, Tiwei Bie wrote: > > This patch introduces a mdev (mediated device) based hardware > > vhost backend. This backend is an abstraction of the various > > hardware vhost accelerators (potentially any device that uses >

Re: [PATCH v5 0/6] enable creating [k,u]probe with perf_event_open

2018-04-09 Thread Alexei Starovoitov
On 4/9/18 9:45 PM, Ravi Bangoria wrote: Hi Song, On 12/07/2017 04:15 AM, Song Liu wrote: With current kernel, user space tools can only create/destroy [k,u]probes with a text-based API (kprobe_events and uprobe_events in tracefs). This approach relies on user space to clean up the [k,u]probe af

Re: [PATCH bpf-next v8 05/11] seccomp,landlock: Enforce Landlock programs per process hierarchy

2018-04-09 Thread Alexei Starovoitov
On Mon, Apr 09, 2018 at 12:01:59AM +0200, Mickaël Salaün wrote: > > On 04/08/2018 11:06 PM, Andy Lutomirski wrote: > > On Sun, Apr 8, 2018 at 6:13 AM, Mickaël Salaün wrote: > >> > >> On 02/27/2018 10:48 PM, Mickaël Salaün wrote: > >>> > >>> On 27/02/2018 17:39, Andy Lutomirski wrote: > On Tu

Re: [PATCH v5 0/6] enable creating [k,u]probe with perf_event_open

2018-04-09 Thread Ravi Bangoria
Hi Song, On 12/07/2017 04:15 AM, Song Liu wrote: > With current kernel, user space tools can only create/destroy [k,u]probes > with a text-based API (kprobe_events and uprobe_events in tracefs). This > approach relies on user space to clean up the [k,u]probe after using them. > However, this is no

Re: [PATCH v15 ] net/veth/XDP: Line-rate packet forwarding in kernel

2018-04-09 Thread Md. Islam
Gotcha. I'm working on it. I've created a function that creates sk_buff from xdp_buff. But still getting an error while the sk_buff is being processed by tcp. I will send you the patch once I'm done. Thanks! On Thu, Apr 5, 2018 at 10:55 PM, David Ahern wrote: > On 4/3/18 9:15 PM, Md. Islam wrote

RE: [PATCH net 3/3] lan78xx: Lan7801 Support for Fixed PHY

2018-04-09 Thread RaghuramChary.Jallipalli
> Ah, cool. I was thinking you were going to say an SFP cage. > > What switch is it? Does it have a DSA driver? > We have 3 port switch KSZ9893 yet to release which is similar to the one KSZ9477/KSZ9897 which has DSA driver. Most of the time 3 port switch being used with LAN7801 to extend the po

Re: [RFC v2] virtio: support packed ring

2018-04-09 Thread Tiwei Bie
On Tue, Apr 10, 2018 at 10:55:25AM +0800, Jason Wang wrote: > On 2018年04月01日 22:12, Tiwei Bie wrote: > > Hello everyone, > > > > This RFC implements packed ring support for virtio driver. > > > > The code was tested with DPDK vhost (testpmd/vhost-PMD) implemented > > by Jens at http://dpdk.org/ml

Re: [PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading

2018-04-09 Thread Jason Wang
On 2018年04月02日 21:40, Vladislav Yasevich wrote: To support SCTP checksum offloading, we need to add a new feature to virtio_net, so we can negotiate support between the hypervisor and the guest. The signalling to the guest that an alternate checksum needs to be used is done via a new flag in t

Re: [Resend Patch 1/3] Vmbus: Add function to report available ring buffer to write in total ring size percentage

2018-04-09 Thread Martin K. Petersen
Long, > I hope this patch set goes through SCSI, because it's purpose is to > improve storvsc. > > If this strategy is not possible, I can resubmit the 1st two patches to > net, and the 3rd patch to scsi after the 1st two are merged. Applied to my staging tree for 4.18/scsi-queue. Thanks! -- M

Re: [RFC v2] virtio: support packed ring

2018-04-09 Thread Jason Wang
On 2018年04月01日 22:12, Tiwei Bie wrote: Hello everyone, This RFC implements packed ring support for virtio driver. The code was tested with DPDK vhost (testpmd/vhost-PMD) implemented by Jens at http://dpdk.org/ml/archives/dev/2018-January/089417.html Minor changes are needed for the vhost code

Re: [RFC] vhost: introduce mdev based hardware vhost backend

2018-04-09 Thread Jason Wang
On 2018年04月02日 23:23, Tiwei Bie wrote: This patch introduces a mdev (mediated device) based hardware vhost backend. This backend is an abstraction of the various hardware vhost accelerators (potentially any device that uses virtio ring can be used as a vhost accelerator). Some generic mdev pare

Re: [PATCH net 3/3] lan78xx: Lan7801 Support for Fixed PHY

2018-04-09 Thread Andrew Lunn
On Tue, Apr 10, 2018 at 02:23:23AM +, raghuramchary.jallipa...@microchip.com wrote: > > > > What do you expect is connected to the MAC if there is no PHY? > > > Hi Andrew, > We connect the Ethernet switch to this MAC. Ah, cool. I was thinking you were going to say an SFP cage. What switch

Re: [PATCH 2/2] alx: add disable_wol paramenter

2018-04-09 Thread AceLan Kao
The problem is I don't have a machine with that wakeup issue, and I need WoL feature. Instead of spreading "alx with WoL" dkms package everywhere, I would like to see it's supported in the driver and is disabled by default. Moreover, the wakeup issue may come from old Atheros chips, or result from

RE: [PATCH net 1/3] lan78xx: PHY DSP registers initialization to address EEE link drop issues with long cables

2018-04-09 Thread RaghuramChary.Jallipalli
> > > > Hi Raghuram > > > > You might want to look at phy_read_paged(), phy_write_paged(), etc. > > > > There can be race conditions with paged access. > > Yep, so something like: > > static void lan88xx_TR_reg_set(struct phy_device *phydev, u16 regaddr, > u32 data) >

RE: [PATCH net 2/3] lan78xx: Add support to dump lan78xx registers

2018-04-09 Thread RaghuramChary.Jallipalli
> If there is no PHY attached, you probably should not include PHY_REG_SIZE > here. > Sure, will address it. Thanks, Raghu

RE: [PATCH net 3/3] lan78xx: Lan7801 Support for Fixed PHY

2018-04-09 Thread RaghuramChary.Jallipalli
> > What do you expect is connected to the MAC if there is no PHY? > Hi Andrew, We connect the Ethernet switch to this MAC. The Ethernet switch port connected to MAC do not have the phy. In this case, need to load the MAC driver and link speed/duplex set. Thanks, Raghu

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-09 Thread Alexei Starovoitov
On Mon, Apr 09, 2018 at 02:25:26PM +0100, Quentin Monnet wrote: > > Anyway, I am fine with keeping just signatures, descriptions and return > values for now. I will submit a new version with only those items. Thank you. Could you also split it into few patches? include/uapi/linux/bpf.h | 2237

[PATCH v2] net: decnet: Replace GFP_ATOMIC with GFP_KERNEL in dn_route_init

2018-04-09 Thread Jia-Ju Bai
dn_route_init() is never called in atomic context. The call chain ending up at dn_route_init() is: [1] dn_route_init() <- decnet_init() decnet_init() is only set as a parameter of module_init(). Despite never getting called from atomic context, dn_route_init() calls __get_free_pages() with GFP_AT

[PATCH v2] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-09 Thread Jia-Ju Bai
tipc_mon_create() is never called in atomic context. The call chain ending up at dn_route_init() is: [1] tipc_mon_create() <- tipc_enable_bearer() <- tipc_nl_bearer_enable() tipc_nl_bearer_enable() calls rtnl_lock(), which indicates this function is not called in atomic context. Despite never get

[PATCH v2] net: nsci: Replace GFP_ATOMIC with GFP_KERNEL in ncsi_register_dev

2018-04-09 Thread Jia-Ju Bai
ncsi_register_dev() is never called in atomic context. This function is only called by ftgmac100_probe() in drivers/net/ethernet/faraday/ftgmac100.c. And ftgmac100_probe() is only set as ".probe" in "struct platform_driver". Despite never getting called from atomic context, ncsi_register_dev() ca

[PATCH v2] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-09 Thread Jia-Ju Bai
tipc_mon_create() is never called in atomic context. The call chain ending up at dn_route_init() is: [1] tipc_mon_create() <- tipc_enable_bearer() <- tipc_nl_bearer_enable() tipc_nl_bearer_enable() calls rtnl_lock(), which indicates this function is not called in atomic context. Despite never get

[PATCH v2] net: dccp: Replace GFP_ATOMIC with GFP_KERNEL in dccp_init

2018-04-09 Thread Jia-Ju Bai
dccp_init() is never called in atomic context. This function is only set as a parameter of module_init(). Despite never getting called from atomic context, dccp_init() calls __get_free_pages() with GFP_ATOMIC, which does not sleep for allocation. GFP_ATOMIC is not necessary and can be replaced wit

[PATCH v2] net: decnet: Replace GFP_ATOMIC with GFP_KERNEL in dn_route_init

2018-04-09 Thread Jia-Ju Bai
dn_route_init() is never called in atomic context. The call chain ending up at dn_route_init() is: [1] dn_route_init() <- decnet_init() decnet_init() is only set as a parameter of module_init(). Despite never getting called from atomic context, dn_route_init() calls __get_free_pages() with GFP_AT

Re: [PATCH RESEND net] vhost: fix vhost_vq_access_ok() log check

2018-04-09 Thread Stefan Hajnoczi
On Tue, Apr 10, 2018 at 3:40 AM, Michael S. Tsirkin wrote: > From: 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; >

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

2018-04-09 Thread Alexei Starovoitov
On 4/9/18 11:41 AM, Yonghong Song wrote: On 4/9/18 9:47 AM, Alexei Starovoitov wrote: On 4/9/18 9:18 AM, Yonghong Song wrote: syzbot reported a possible deadlock in perf_event_detach_bpf_prog. ... @@ -985,16 +986,31 @@ int perf_event_query_prog_array(struct perf_event *event, void __user *i

Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-09 Thread Siwei Liu
On Mon, Apr 9, 2018 at 4:03 PM, Stephen Hemminger wrote: > On Mon, 9 Apr 2018 15:30:42 -0700 > Siwei Liu wrote: > >> On Mon, Apr 9, 2018 at 3:15 PM, Andrew Lunn wrote: >> >> No, implementation wise I'd avoid changing the class on the fly. What >> >> I'm looking to is a means to add a secondary c

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

2018-04-09 Thread Eric W. Biederman
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 Tkhai wrote: >> >> On 05.04.2018 17:07, Christian Brauner wrote: >> >> > On Thu, Apr 05, 2018 at 04:01:03PM +0300,

Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-09 Thread Stephen Hemminger
On Mon, 9 Apr 2018 15:30:42 -0700 Siwei Liu wrote: > On Mon, Apr 9, 2018 at 3:15 PM, Andrew Lunn wrote: > >> No, implementation wise I'd avoid changing the class on the fly. What > >> I'm looking to is a means to add a secondary class or class aliasing > >> mechanism for netdevs that allows mapp

Re: [PATCH] iscsi: respond to netlink with unicast when appropriate

2018-04-09 Thread Lee Duncan
On 04/09/2018 03:15 PM, Chris Leech wrote: > Instead of always multicasting responses, send a unicast netlink message > directed at the correct pid. This will be needed if we ever want to > support multiple userspace processes interacting with the kernel over > iSCSI netlink simultaneously. Limit

Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-09 Thread Siwei Liu
On Mon, Apr 9, 2018 at 3:15 PM, Andrew Lunn wrote: >> No, implementation wise I'd avoid changing the class on the fly. What >> I'm looking to is a means to add a secondary class or class aliasing >> mechanism for netdevs that allows mapping for a kernel device >> namespace (/class/net-kernel) to u

[PATCH] iscsi: respond to netlink with unicast when appropriate

2018-04-09 Thread Chris Leech
Instead of always multicasting responses, send a unicast netlink message directed at the correct pid. This will be needed if we ever want to support multiple userspace processes interacting with the kernel over iSCSI netlink simultaneously. Limitations can currently be seen if you attempt to run

Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-09 Thread Andrew Lunn
> No, implementation wise I'd avoid changing the class on the fly. What > I'm looking to is a means to add a secondary class or class aliasing > mechanism for netdevs that allows mapping for a kernel device > namespace (/class/net-kernel) to userspace (/class/net). Imagine > creating symlinks betwe

Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-09 Thread Siwei Liu
On Fri, Apr 6, 2018 at 8:19 PM, Andrew Lunn wrote: > Hi Siwei > >> I think everyone seems to agree not to fiddle with the ":" prefix, but >> rather have a new class of network subsystem under /sys/class thus a >> separate device namespace e.g. /sys/class/net-kernel for those >> auto-managed lower

Re: [RFC PATCH v2 00/14] Introducing AF_XDP support

2018-04-09 Thread William Tu
On Tue, Mar 27, 2018 at 9:59 AM, Björn Töpel wrote: > From: Björn Töpel > > This RFC introduces a new address family called AF_XDP that is > optimized for high performance packet processing and, in upcoming > patch sets, zero-copy semantics. In this v2 version, we have removed > all zero-copy rel

Re: [net-next PATCH v3 01/11] soc: ti: K2G: enhancement to support QMSS in K2G NAVSS

2018-04-09 Thread Rob Herring
On Mon, Apr 02, 2018 at 10:37:51AM -0400, Murali Karicheri wrote: > Navigator Subsystem (NAVSS) available on K2G SoC has a cut down > version of QMSS with less number of queues, internal linking ram > with lesser number of buffers etc. It doesn't have status and > explicit push register space as i

[PATCH] mISDN: Remove VLAs

2018-04-09 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 just using the upper bound in another. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Laura Abbott --- drivers/isdn

Re: [PATCH AUTOSEL for 4.9 160/293] MIPS: Give __secure_computing() access to syscall arguments.

2018-04-09 Thread James Hogan
On Mon, Apr 09, 2018 at 12:24:58AM +, Sasha Levin wrote: > From: David Daney > > [ Upstream commit 669c4092225f0ed5df12ebee654581b558a5e3ed ] > > KProbes of __seccomp_filter() are not very useful without access to > the syscall arguments. > > Do what x86 does, and populate a struct seccomp_

Patch "x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic()" has been added to the 4.9-stable tree

2018-04-09 Thread gregkh
This is a note to let you know that I've just added the patch titled x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename

RFC: ti_hecc: don't repoll but interrupt again

2018-04-09 Thread Jeroen Hofstee
Hello, I posted below RFC to the linux-can ML, but it might be actually more appropriate for netdev (since it involves napi). This driver is lying a bit about the amount of work done. Changing that (always look at work done instead of the hw state) seems to solve the issue, but I have no clear un

[PATCH RESEND net] vhost: fix vhost_vq_access_ok() log check

2018-04-09 Thread Michael S. Tsirkin
From: 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->i

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

2018-04-09 Thread Samudrala, Sridhar
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:22PM CEST, sridhar.samudr...@intel.com wrote: [...] +static int virtnet_bypass_join_child(struct net_device *bypas

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

2018-04-09 Thread Yonghong Song
On 4/9/18 9:47 AM, Alexei Starovoitov wrote: On 4/9/18 9:18 AM, Yonghong Song wrote: syzbot reported a possible deadlock in perf_event_detach_bpf_prog. ... @@ -985,16 +986,31 @@ int perf_event_query_prog_array(struct perf_event *event, void __user *info) return -EINVAL; if (co

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

2018-04-09 Thread Roman Mashak
David Ahern writes: > On 4/3/18 1:24 PM, Roman Mashak wrote: >> if (tb[TCA_SKBEDIT_PTYPE] != NULL) { >> -ptype = RTA_DATA(tb[TCA_SKBEDIT_PTYPE]); >> -if (*ptype == PACKET_HOST) >> -fprintf(f, " ptype host"); >> -else if (*ptype == PACKE

RE: [Intel-wired-lan] [next-queue PATCH v6 10/10] igb: Add support for adding offloaded clsflower filters

2018-04-09 Thread Vinicius Costa Gomes
Hi, "Brown, Aaron F" writes: >> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On >> Behalf Of Vinicius Costa Gomes >> Sent: Thursday, March 29, 2018 2:08 PM >> To: intel-wired-...@lists.osuosl.org >> Cc: netdev@vger.kernel.org; Sanchez-Palencia, Jesus > palen...@intel.com> >>

RE: [Intel-wired-lan] [next-queue PATCH v6 08/10] igb: Add MAC address support for ethtool nftuple filters

2018-04-09 Thread Vinicius Costa Gomes
Hi, "Brown, Aaron F" writes: [...] > >> >> I added that note in the hope that someone else would have an stronger >> opinion about what to do. > > I don't have a strong opinion beyond my preference for an ideal world > where everything works :) If the part simply cannot filter on the src > ad

[PATCH RFC iptables] iptables: Per-net ns lock

2018-04-09 Thread Kirill Tkhai
In CRIU and LXC-restore we met the situation, when iptables in container can't be restored because of permission denied: https://github.com/checkpoint-restore/criu/issues/469 Containers want to restore their own net ns, while they may have no their own mnt ns. This case they share host's /run/xta

Re: [RFC PATCH bpf-next 2/6] bpf: add bpf_get_stack helper

2018-04-09 Thread Yonghong Song
On 4/9/18 3:01 AM, Daniel Borkmann wrote: On 04/09/2018 07:02 AM, Alexei Starovoitov wrote: On 4/8/18 9:53 PM, Yonghong Song wrote: @@ -1004,7 +1007,8 @@ static void __bpf_prog_put(struct bpf_prog *prog, bool do_idr_lock) bpf_prog_kallsyms_del(prog->aux->func[i]); bpf_

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

2018-04-09 Thread Alexei Starovoitov
On 4/9/18 9:18 AM, Yonghong Song wrote: syzbot reported a possible deadlock in perf_event_detach_bpf_prog. ... @@ -985,16 +986,31 @@ int perf_event_query_prog_array(struct perf_event *event, void __user *info) return -EINVAL; if (copy_from_user(&query, uquery, sizeof(qu

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

2018-04-09 Thread Jesus Sanchez-Palencia
Hi Thomas, On 03/28/2018 12:48 AM, Thomas Gleixner wrote: (...) > > There are two modes: > > 1) Send at the given TX time (Explicit mode) > > 2) Send before given TX time (Deadline mode) > > There is no need to specify 'drop if late' simply because if the message is > handed in past

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

2018-04-09 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 net-next] netns: filter uevents correctly

2018-04-09 Thread Christian Brauner
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 Tkhai wrote: > >> On 05.04.2018 17:07, Christian Brauner wrote: > >> > On Thu, Apr 05, 2018 at 04:01:03PM +0300, Kirill Tkhai wrote: > >> >> On 04.

Re: Enable and configure storm prevention in a network device

2018-04-09 Thread Andrew Lunn
> > The Marvell switches have leaky buckets, which can be used for > > limiting broadcast and multicast packets, as well as traffic shaping > > in general. Storm prevention is just a form of traffic shaping, so if > > we have generic traffic shaping, it can be used for storm prevention. > > > TI's

Re: Enable and configure storm prevention in a network device

2018-04-09 Thread Murali Karicheri
Andrew, On 04/06/2018 10:30 AM, Andrew Lunn wrote: > On Thu, Apr 05, 2018 at 03:35:06PM -0700, Florian Fainelli wrote: >> On 04/05/2018 01:20 PM, David Miller wrote: >>> From: Murali Karicheri >>> Date: Thu, 5 Apr 2018 16:14:49 -0400 >>> Is there a standard way to implement and configure sto

Re: [PATCH net] inetpeer: fix uninit-value in inet_getpeer

2018-04-09 Thread Eric Dumazet
On 04/09/2018 07:58 AM, David Miller wrote: > From: Eric Dumazet > Date: Mon, 9 Apr 2018 06:43:27 -0700 > >> syzbot/KMSAN reported that p->dtime was read while it was >> not yet initialized in : >> >> delta = (__u32)jiffies - p->dtime; >> if (delta < ttl || !refcount_dec_if_one(&p->r

Re: [PATCH] slip: Check if rstate is initialized before uncompressing

2018-04-09 Thread David Miller
From: Tejaswi Tanikella Date: Mon, 9 Apr 2018 14:23:49 +0530 > @@ -673,6 +677,7 @@ struct slcompress * > if (cs->cs_tcp.doff > 5) > memcpy(cs->cs_tcpopt, icp + ihl*4 + sizeof(struct tcphdr), > (cs->cs_tcp.doff - 5) * 4); > cs->cs_hsize = ihl*2 + cs->cs_tcp.doff*2; > + cs-

Re: [PATCH RESEND v2] vhost-net: set packet weight of tx polling to 2 * vq size

2018-04-09 Thread David Miller
From: haibinzhang(张海斌) Date: Mon, 9 Apr 2018 07:22:17 + > handle_tx will delay rx for tens or even hundreds of milliseconds when tx busy > polling udp packets with small length(e.g. 1byte udp payload), because setting > VHOST_NET_WEIGHT takes into account only sent-bytes but no single packet

Re: [PATCH v5] net: thunderx: rework mac addresses list to u64 array

2018-04-09 Thread David Miller
From: Vadim Lomovtsev Date: Mon, 9 Apr 2018 06:24:48 -0700 > From: Vadim Lomovtsev > > It is too expensive to pass u64 values via linked list, instead > allocate array for them by overall number of mac addresses from netdev. > > This eventually removes multiple kmalloc() calls, aviod memory >

Re: [PATCH net] inetpeer: fix uninit-value in inet_getpeer

2018-04-09 Thread David Miller
From: Eric Dumazet Date: Mon, 9 Apr 2018 06:43:27 -0700 > syzbot/KMSAN reported that p->dtime was read while it was > not yet initialized in : > > delta = (__u32)jiffies - p->dtime; > if (delta < ttl || !refcount_dec_if_one(&p->refcnt)) > gc_stack[i] = NULL; > > This

Re: [PATCH 2/2] alx: add disable_wol paramenter

2018-04-09 Thread David Miller
From: Andrew Lunn Date: Mon, 9 Apr 2018 14:39:10 +0200 > On Mon, Apr 09, 2018 at 07:35:14PM +0800, AceLan Kao wrote: >> The WoL feature was reported broken and will lead to >> the system resume immediately after suspending. >> This symptom is not happening on every system, so adding >> disable_wo

Re: [PATCH] net: decnet: Replace GFP_ATOMIC with GFP_KERNEL in dn_route_init

2018-04-09 Thread Jia-Ju Bai
On 2018/4/9 22:44, Eric Dumazet wrote: On 04/09/2018 07:10 AM, Jia-Ju Bai wrote: dn_route_init() is never called in atomic context. The call chain ending up at dn_route_init() is: [1] dn_route_init() <- decnet_init() decnet_init() is only set as a parameter of module_init(). Despite never g

Re: [PATCH] net: dccp: Replace GFP_ATOMIC with GFP_KERNEL in dccp_init

2018-04-09 Thread Jia-Ju Bai
On 2018/4/9 22:42, Eric Dumazet wrote: On 04/09/2018 07:10 AM, Jia-Ju Bai wrote: dccp_init() is never called in atomic context. This function is only set as a parameter of module_init(). Despite never getting called from atomic context, dccp_init() calls __get_free_pages() with GFP_ATOMIC, w

Re: [PATCH] net: decnet: Replace GFP_ATOMIC with GFP_KERNEL in dn_route_init

2018-04-09 Thread Eric Dumazet
On 04/09/2018 07:10 AM, Jia-Ju Bai wrote: > dn_route_init() is never called in atomic context. > > The call chain ending up at dn_route_init() is: > [1] dn_route_init() <- decnet_init() > decnet_init() is only set as a parameter of module_init(). > > Despite never getting called from atomic con

Re: [PATCH] netfilter: fix CONFIG_NF_REJECT_IPV6=m link error

2018-04-09 Thread Arnd Bergmann
On Mon, Apr 9, 2018 at 4:37 PM, Pablo Neira Ayuso wrote: > Hi Arnd, > > On Mon, Apr 09, 2018 at 12:53:12PM +0200, Arnd Bergmann wrote: >> We get a new link error with CONFIG_NFT_REJECT_INET=y and >> CONFIG_NF_REJECT_IPV6=m > > I think we can update NFT_REJECT_INET so it depends on NFT_REJECT_IPV4

Re: WARNING in ip_rt_bug

2018-04-09 Thread David Miller
From: Dmitry Vyukov Date: Mon, 9 Apr 2018 08:06:20 +0200 > +Eric said that perhaps we just need to revert: > > commit c378a9c019cf5e017d1ed24954b54fae7bebd2bc > Date: Sat May 21 07:16:42 2011 + > ipv4: Give backtrace in ip_rt_bug(). And I replied to him that we shouldn't. Reverting m

Re: [PATCH] net: dccp: Replace GFP_ATOMIC with GFP_KERNEL in dccp_init

2018-04-09 Thread Eric Dumazet
On 04/09/2018 07:10 AM, Jia-Ju Bai wrote: > dccp_init() is never called in atomic context. > This function is only set as a parameter of module_init(). > > Despite never getting called from atomic context, > dccp_init() calls __get_free_pages() with GFP_ATOMIC, > which waits busily for allocatio

Re: [PATCH net] arp: fix arp_filter on l3slave devices

2018-04-09 Thread David Ahern
On 4/8/18 9:36 PM, Sasha Levin wrote: > Hi, > > [This is an automated email] > > This commit has been processed by the -stable helper bot and determined > to be a high probability candidate for -stable trees. (score: 33.5930) > > The bot has tested the following trees: v4.16, v4.15.15, v4.14.32,

Re: [PATCH] netfilter: fix CONFIG_NF_REJECT_IPV6=m link error

2018-04-09 Thread Pablo Neira Ayuso
Hi Arnd, On Mon, Apr 09, 2018 at 12:53:12PM +0200, Arnd Bergmann wrote: > We get a new link error with CONFIG_NFT_REJECT_INET=y and > CONFIG_NF_REJECT_IPV6=m I think we can update NFT_REJECT_INET so it depends on NFT_REJECT_IPV4 and NFT_REJECT_IPV6. This doesn't allow here CONFIG_NFT_REJECT_INET

Re: Enable and configure storm prevention in a network device

2018-04-09 Thread Murali Karicheri
On 04/05/2018 06:35 PM, Florian Fainelli wrote: > On 04/05/2018 01:20 PM, David Miller wrote: >> From: Murali Karicheri >> Date: Thu, 5 Apr 2018 16:14:49 -0400 >> >>> Is there a standard way to implement and configure storm prevention >>> in a Linux network device? >> >> What kind of "storm", an i

Re: [PATCH net] net: dsa: mv88e6xxx: Fix receive time stamp race condition.

2018-04-09 Thread Richard Cochran
On Mon, Apr 09, 2018 at 12:03:14AM -0700, Richard Cochran wrote: > This patch fixes the race by moving the queue onto a list on the stack > before reading out the latched time stamp value. > > Fixes: c6fe0ad2c3499 ("net: dsa: mv88e6xxx: add rx/tx timestamping support") Dave, please hold off on th

[PATCH] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-09 Thread Jia-Ju Bai
tipc_mon_create() is never called in atomic context. The call chain ending up at dn_route_init() is: [1] tipc_mon_create() <- tipc_enable_bearer() <- tipc_nl_bearer_enable() tipc_nl_bearer_enable() calls rtnl_lock(), which indicates this function is not called in atomic context. Despite never get

[PATCH] net: nsci: Replace GFP_ATOMIC with GFP_KERNEL in ncsi_register_dev

2018-04-09 Thread Jia-Ju Bai
ncsi_register_dev() is never called in atomic context. This function is only called by ftgmac100_probe() in drivers/net/ethernet/faraday/ftgmac100.c. And ftgmac100_probe() is only set as ".probe" in "struct platform_driver". Despite never getting called from atomic context, ncsi_register_dev() ca

[PATCH] net: decnet: Replace GFP_ATOMIC with GFP_KERNEL in dn_route_init

2018-04-09 Thread Jia-Ju Bai
dn_route_init() is never called in atomic context. The call chain ending up at dn_route_init() is: [1] dn_route_init() <- decnet_init() decnet_init() is only set as a parameter of module_init(). Despite never getting called from atomic context, dn_route_init() calls __get_free_pages() with GFP_AT

[PATCH] net: dccp: Replace GFP_ATOMIC with GFP_KERNEL in dccp_init

2018-04-09 Thread Jia-Ju Bai
dccp_init() is never called in atomic context. This function is only set as a parameter of module_init(). Despite never getting called from atomic context, dccp_init() calls __get_free_pages() with GFP_ATOMIC, which waits busily for allocation. GFP_ATOMIC is not necessary and can be replaced with

[PATCH net] inetpeer: fix uninit-value in inet_getpeer

2018-04-09 Thread Eric Dumazet
syzbot/KMSAN reported that p->dtime was read while it was not yet initialized in : delta = (__u32)jiffies - p->dtime; if (delta < ttl || !refcount_dec_if_one(&p->refcnt)) gc_stack[i] = NULL; This is a false positive, because the inetpeer wont be erased from rb-tree

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-09 Thread Quentin Monnet
2018-04-09 12:52 UTC+0200 ~ Markus Heiser > >> Am 09.04.2018 um 12:08 schrieb Daniel Borkmann : > [...] > >>> May I completely misunderstood you, so correct my if I'am wrong: >>> >>> - ./scripts/bpf_helpers_doc.py : produces reST markup from C-comments >>> - ./scripts/kerne-doc : produc

v4.16 in_dev_finish_destroy() accessing freed idev->dev->pcpu_refcnt

2018-04-09 Thread Mark Rutland
nux/kernel/people/mark/bugs/20180409-in_dev_finish_destroy-null-pcpu_refcnt/ Unable to handle kernel paging request at virtual address 60002be8 Mem abort info: ESR = 0x9604 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-09 Thread Quentin Monnet
2018-04-09 11:01 UTC+0200 ~ Daniel Borkmann > On 04/06/2018 01:11 PM, Quentin Monnet wrote: >> eBPF helper functions can be called from within eBPF programs to perform >> a variety of tasks that would be otherwise hard or impossible to do with >> eBPF itself. There is a growing number of such help

[PATCH v5] net: thunderx: rework mac addresses list to u64 array

2018-04-09 Thread Vadim Lomovtsev
From: Vadim Lomovtsev It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put single null check on kmalloc return value in

Re: kernel BUG at drivers/vhost/vhost.c:LINE! (2)

2018-04-09 Thread Stefan Hajnoczi
On Mon, Apr 9, 2018 at 11:28 AM, Stefan Hajnoczi wrote: > On Mon, Apr 09, 2018 at 05:44:36AM +0300, Michael S. Tsirkin wrote: >> On Mon, Apr 09, 2018 at 10:37:45AM +0800, Stefan Hajnoczi wrote: >> > On Sat, Apr 7, 2018 at 3:02 AM, syzbot >> > wrote: >> > > syzbot hit the following crash on upstre

Re: WARNING in ip_rt_bug

2018-04-09 Thread Eric Dumazet
On 04/08/2018 11:06 PM, Dmitry Vyukov wrote: > On Mon, Apr 9, 2018 at 7:59 AM, syzbot > wrote: >> Hello, >> >> syzbot hit the following crash on net-next commit >> 8bde261e535257e81087d39ff808414e2f5aa39d (Sun Apr 1 02:31:43 2018 +) >> Merge tag 'mlx5-updates-2018-03-30' of >> git://git.kern

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

2018-04-09 Thread Colin King
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: code aligned with following code on line 410 ./drivers/net/ethernet/mellanox/mlx

Re: [PATCH 2/2] alx: add disable_wol paramenter

2018-04-09 Thread Andrew Lunn
On Mon, Apr 09, 2018 at 07:35:14PM +0800, AceLan Kao wrote: > The WoL feature was reported broken and will lead to > the system resume immediately after suspending. > This symptom is not happening on every system, so adding > disable_wol option and disable WoL by default to prevent the issue from >

Re: Passing uninitialised local variable

2018-04-09 Thread Petr Machata
Arend van Spriel writes: > On 3/28/2018 1:20 PM, Himanshu Jha wrote: >> I recently found that a local variable in passed uninitialised to the >> function at >> >> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:2950 >> >> u32 var; >> err = brcmf_fil_i

[PATCH 1/2] Revert "alx: remove WoL support"

2018-04-09 Thread AceLan Kao
This reverts commit bc2bebe8de8ed4ba6482c9cc370b0dd72ffe8cd2. There are still many people need this feature, so try adding it back. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=61651 Signed-off-by: AceLan Kao --- drivers/net/ethernet/atheros/alx/ethtool.c | 36 +++ drivers/net/eth

[PATCH 2/2] alx: add disable_wol paramenter

2018-04-09 Thread AceLan Kao
The WoL feature was reported broken and will lead to the system resume immediately after suspending. This symptom is not happening on every system, so adding disable_wol option and disable WoL by default to prevent the issue from happening again. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?

Re: [iovisor-dev] Best userspace programming API for XDP features query to kernel?

2018-04-09 Thread Jesper Dangaard Brouer
On Fri, 6 Apr 2018 12:36:18 +0200 Daniel Borkmann wrote: > On 04/05/2018 10:51 PM, Jesper Dangaard Brouer wrote: > > On Thu, 5 Apr 2018 12:37:19 +0200 > > Daniel Borkmann wrote: > > > >> On 04/04/2018 02:28 PM, Jesper Dangaard Brouer via iovisor-dev wrote: > >>> Hi Suricata people, > >>> >

[PATCH] netfilter: fix CONFIG_NF_REJECT_IPV6=m link error

2018-04-09 Thread Arnd Bergmann
We get a new link error with CONFIG_NFT_REJECT_INET=y and CONFIG_NF_REJECT_IPV6=m after larger parts of the nftables modules are linked together: net/netfilter/nft_reject_inet.o: In function `nft_reject_inet_eval': nft_reject_inet.c:(.text+0x17c): undefined reference to `nf_send_unreach6' nft_rej

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-09 Thread Markus Heiser
> Am 09.04.2018 um 12:08 schrieb Daniel Borkmann : [...] >> May I completely misunderstood you, so correct my if I'am wrong: >> >> - ./scripts/bpf_helpers_doc.py : produces reST markup from C-comments >> - ./scripts/kerne-doc : produces reST markup from C-comments >> >> IMO: both are d

Re: [PATCH v2 2/2] af_key: Use DIV_ROUND_UP() instead of open-coded equivalent

2018-04-09 Thread Steffen Klassert
On Sat, Apr 07, 2018 at 11:40:47AM -0400, Kevin Easton wrote: > Several places use (x + 7) / 8 to convert from a number of bits to a number > of bytes. Replace those with DIV_ROUND_UP(x, 8) instead, for consistency > with other parts of the same file. > > Signed-off-by: Kevin Easton Please resu

Re: [PATCH v2 1/2] af_key: Always verify length of provided sadb_key

2018-04-09 Thread Steffen Klassert
On Sat, Apr 07, 2018 at 11:40:33AM -0400, Kevin Easton wrote: > Key extensions (struct sadb_key) include a user-specified number of key > bits. The kernel uses that number to determine how much key data to copy > out of the message in pfkey_msg2xfrm_state(). > > The length of the sadb_key message

Re: [PATCH v2 0/2] af_key: Fix for sadb_key memcpy read overrun

2018-04-09 Thread Steffen Klassert
On Sat, Apr 07, 2018 at 11:40:18AM -0400, Kevin Easton wrote: > As found by syzbot, af_key does not properly validate the key length in > sadb_key messages from userspace. This can result in copying from beyond > the end of the sadb_key part of the message, or indeed beyond the end of > the entire

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-09 Thread Daniel Borkmann
On 04/09/2018 11:35 AM, Markus Heiser wrote: > >> Am 09.04.2018 um 11:25 schrieb Daniel Borkmann : >> >> On 04/09/2018 11:21 AM, Markus Heiser wrote: >> [...] >>> Do we really need another kernel-doc parser? >>> >>> ./scripts/kernel-doc include/uapi/linux/bpf.h >>> >>> should already do the job (

Re: [RFC PATCH bpf-next 2/6] bpf: add bpf_get_stack helper

2018-04-09 Thread Daniel Borkmann
On 04/09/2018 07:02 AM, Alexei Starovoitov wrote: > On 4/8/18 9:53 PM, Yonghong Song wrote: @@ -1004,7 +1007,8 @@ static void __bpf_prog_put(struct bpf_prog *prog, bool do_idr_lock) bpf_prog_kallsyms_del(prog->aux->func[i]); bpf_prog_kallsyms_del(prog); >>>

  1   2   >