general protection fault in ipv6_rcv

2019-03-08 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:d9862cfb Merge tag 'mips_5.1' of git://git.kernel.org/pub/.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=15d1e5ad20 kernel config: https://syzkaller.appspot.com/x/.config?x=73d88a42238825ad da

Re: [PATCH bpf] libbpf: handle BTF parsing and loading properly

2019-03-08 Thread Yonghong Song
On 3/8/19 3:58 PM, Andrii Nakryiko wrote: > This patch splits and cleans up error handling logic for loading BTF data. > Previously, if BTF data was parsed successfully, but failed to load into > kernel, we'd report nonsensical error code, instead of error returned from > btf__load(). Now btf__ne

Re: [PATCH] net: mvneta: Switch to using devm_alloc_etherdev_mqs

2019-03-08 Thread David Miller
From: Rosen Penev Date: Fri, 8 Mar 2019 21:15:29 -0800 > It allows some of the code to be simplified. > > Tested on Turris Omnia. > > Signed-off-by: Rosen Penev This and your other patch are both net-next material. net-next is closed, please resubmit these when it reopens. Thank you.

Re: [PATCH] net: stmmac: Avoid one more sometimes uninitialized Clang warning

2019-03-08 Thread David Miller
From: Nathan Chancellor Date: Thu, 7 Mar 2019 21:02:39 -0700 > When building with -Wsometimes-uninitialized, Clang warns: > > drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:111:2: error: variable > 'ns' is used uninitialized whenever 'if' condition is false > [-Werror,-Wsometimes-uninitialize

[RHEL 7.5] [Intel XV710] SRIOV VF MAC address Change Failure [Spoofchk off,Trusted on]

2019-03-08 Thread mad Engineer
Hi All, I have a RHEL 7.5 + KVM server with Intel XV710 NIC and i40e drivers with SRIOV enabled and few Centos 7.5 VMs on it. When i try to change the MAC address of VF from VM i get 'Operation not Permitted Error'. ip l set dev ens5 address 0a:01:5E:00:01:0E RTNETLINK answers: Operation not p

Re: [PATCH net] net: dsa: mv88e6xxx: Set correct interface mode for CPU/DSA ports

2019-03-08 Thread David Miller
From: Andrew Lunn Date: Fri, 8 Mar 2019 01:21:27 +0100 > By default, the switch driver is expected to configure CPU and DSA > ports to their maximum speed. For the 6341 and 6390 families, the > ports interface mode has to be configured as well. The 6390X range > support 10G ports using XAUI, whi

Re: [PATCH 1/2] net: phy: mscc: add support for VSC8514 PHY

2019-03-08 Thread David Miller
Two things: 1) Please always provide a proper "[PATCH 0/N] " header posting with a patch series. 2) This is new functionality, not just adding a few new device IDs, so it is only appropriate for the net-next tree which is closed right now. Please resubmit this when net-next opens back up

Re: [PATCH bpf] libbpf: handle BTF parsing and loading properly

2019-03-08 Thread Martin Lau
On Fri, Mar 08, 2019 at 03:58:20PM -0800, Andrii Nakryiko wrote: > This patch splits and cleans up error handling logic for loading BTF data. > Previously, if BTF data was parsed successfully, but failed to load into > kernel, we'd report nonsensical error code, instead of error returned from > btf

RE: Cadence/macb ethernet driver bug on nonlinear skb buffers

2019-03-08 Thread Harini Katakam
Hi Klaus, > -Original Message- > From: Klaus Doth [mailto:k...@doth.eu] > Sent: Friday, March 8, 2019 10:19 PM > To: netdev@vger.kernel.org > Cc: da...@davemloft.net; claudiu.bez...@microchip.com; Harini Katakam > ; Michal Simek ; Nicolas Ferre > > Subject: Cadence/macb ethernet driver bu

[PATCH] isdn: mISDNinfineon: fix potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case ioremap fails, the fix returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu --- drivers/isdn/hardware/mISDN/mISDNinfineon.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware

[PATCH] isdn: hfcpci: fix potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case ioremap fails, the fix reports an error and returns. Signed-off-by: Kangjie Lu --- drivers/isdn/hardware/mISDN/hfcpci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index ebb3fa2e1d00..b400d6528a56 1

Re: [Linuxptp-devel] strangeness

2019-03-08 Thread Harini Katakam
Hi Paul, On Sat, Mar 9, 2019 at 3:13 AM Paul Thomas wrote: > > On Fri, Mar 8, 2019 at 1:07 PM Paul Thomas wrote: > > > > Hi Harini, > > > > On Fri, Mar 8, 2019 at 1:08 AM Harini Katakam wrote: > > > > > > Hi Paul, > > > On Fri, Mar 8, 2019 at 12:33 AM Paul Thomas wrote: > > > > > > > > On Thu,

Re: [PATCH v3 bpf-next 1/2] bpf: Fix bpf_tcp_sock and bpf_sk_fullsock issue related to bpf_sk_release

2019-03-08 Thread Martin Lau
On Wed, Mar 06, 2019 at 03:59:40PM +, Lorenz Bauer wrote: > On Mon, 4 Mar 2019 at 17:43, Martin Lau wrote: > > > > On Mon, Mar 04, 2019 at 10:33:46AM +0100, Daniel Borkmann wrote: > > > On 03/02/2019 09:21 PM, Martin Lau wrote: > > > > On Sat, Mar 02, 2019 at 10:03:03AM -0800, Alexei Starovoit

[PATCH] net: aquantia: Switch alloc_etherdev to devm variant

2019-03-08 Thread Rosen Penev
Allows some simplification by avoiding calling free_netdev. Tested on AMD based x86 system using AQC108 chipset. Signed-off-by: Rosen Penev --- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 3 ++- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 11 +++ 2 files changed,

[PATCH] net: mvneta: Switch to using devm_alloc_etherdev_mqs

2019-03-08 Thread Rosen Penev
It allows some of the code to be simplified. Tested on Turris Omnia. Signed-off-by: Rosen Penev --- drivers/net/ethernet/marvell/mvneta.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvnet

RE: [RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent device

2019-03-08 Thread Parav Pandit
> -Original Message- > From: Alex Williamson > Sent: Friday, March 8, 2019 4:33 PM > To: Parav Pandit > Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; > michal.l...@markovi.net; da...@davemloft.net; > gre...@linuxfoundation.org; Jiri Pirko ; > kwankh...@nvidia.com; Vu Pham ;

[PATCH] can: af_can: Fix possible NULL pointer dereference in can_exit

2019-03-08 Thread Yue Haibing
From: YueHaibing Syzkaller report this: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] SMP KASAN PTI CPU: 0 PID: 9400 Comm: syz-executor.0 Tainted: G C5.0.0-rc8+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS

[PATCH] net: ixgbevf: fix a missing check of ixgbevf_write_msg_read_ack

2019-03-08 Thread Kangjie Lu
If ixgbevf_write_msg_read_ack fails, return its error code upstream Signed-off-by: Kangjie Lu --- drivers/net/ethernet/intel/ixgbevf/vf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c b/drivers/net/ethernet/intel/ixgbevf/vf.c in

Re: [PATCH net] selinux: add the missing walk_size + len check in selinux_sctp_bind_connect

2019-03-08 Thread Paul Moore
On Fri, Mar 8, 2019 at 12:08 PM Marcelo Ricardo Leitner wrote: > On Sat, Mar 09, 2019 at 12:07:34AM +0800, Xin Long wrote: > > As does in __sctp_connect(), when checking addrs in a while loop, after > > get the addr len according to sa_family, it's necessary to do the check > > walk_size + af->soc

Re: [PATCH net] rxrpc: Fix client call queueing, waiting for channel

2019-03-08 Thread David Miller
From: David Howells Date: Sat, 09 Mar 2019 00:29:58 + > rxrpc_get_client_conn() adds a new call to the front of the waiting_calls > queue if the connection it's going to use already exists. This is bad as > it allows calls to get starved out. > > Fix this by adding to the tail instead. > >

Re: pull-request: bpf 2019-03-09

2019-03-08 Thread David Miller
From: Daniel Borkmann Date: Sat, 9 Mar 2019 01:08:08 +0100 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: ... > Please consider pulling these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git Pulled, thanks Daniel.

r8169 only works in promisc mode

2019-03-08 Thread Alex Xu (Hello71)
After suspending, my r8169 (not actually 8169, just that driver) only receives packets when in promiscuous mode. I have tried disabling all offload features except highdma [fixed], and it doesn't fix the issue. I am using torvalds/linux, compiled about two days ago (not sure which commit). I th

Re: [PATCH] proc/sysctl: Fix NULL pointer dereference in put_links

2019-03-08 Thread YueHaibing
+cc Al Viro On 2019/3/4 21:54, Yue Haibing wrote: > From: YueHaibing > > Syzkaller report this: > > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] SMP KASAN PTI > CPU: 1 PID: 5373 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3 > Hardware

Re: [BUG] BPF splat on latest kernels

2019-03-08 Thread Eric Dumazet
On 03/08/2019 04:29 PM, Alexei Starovoitov wrote: > On Fri, Mar 8, 2019 at 12:33 PM Eric Dumazet wrote: >> >> Running test_progs on a LOCKDEP enabled kernel (latest David Miller net tree) >> >> I got the following splat. >> >> It is not immediately obvious to me. Any idea ? > > I think I saw s

Re: [PATCH] proc/sysctl: Fix NULL pointer dereference in put_links

2019-03-08 Thread YueHaibing
ping. On 2019/3/4 21:54, Yue Haibing wrote: > From: YueHaibing > > Syzkaller report this: > > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] SMP KASAN PTI > CPU: 1 PID: 5373 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3 > Hardware name:

Re: [PATCH v2] appletalk: Correctly check return value of register_snap_client

2019-03-08 Thread YueHaibing
ping. On 2019/3/7 10:22, Yue Haibing wrote: > From: YueHaibing > > register_snap_client may return NULL, all the callers > check it, but only print a warning. This will result in > NULL pointer dereference in unregister_snap_client and other > places. > > It has always been used like this since

[PATCH net] rxrpc: Fix client call queueing, waiting for channel

2019-03-08 Thread David Howells
rxrpc_get_client_conn() adds a new call to the front of the waiting_calls queue if the connection it's going to use already exists. This is bad as it allows calls to get starved out. Fix this by adding to the tail instead. Also change the other enqueue point in the same function to put it on the

Re: [BUG] BPF splat on latest kernels

2019-03-08 Thread Alexei Starovoitov
On Fri, Mar 8, 2019 at 12:33 PM Eric Dumazet wrote: > > Running test_progs on a LOCKDEP enabled kernel (latest David Miller net tree) > > I got the following splat. > > It is not immediately obvious to me. Any idea ? I think I saw something similar running test_maps, but I had other changes in th

Re: [PATCH][next] net/mlx5e: Remove redundant assignment

2019-03-08 Thread Saeed Mahameed
On Tue, 2019-03-05 at 19:03 -0800, David Miller wrote: > From: Saeed Mahameed > Date: Tue, 5 Mar 2019 22:21:39 + > > > On Mon, 2019-03-04 at 08:26 +0200, Leon Romanovsky wrote: > > > On Sun, Mar 03, 2019 at 03:20:57PM +, Roi Dayan wrote: > > > > On 02/03/2019 21:39, Gustavo A. R. Silva wr

pull-request: bpf 2019-03-09

2019-03-08 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a crash in AF_XDP's xsk_diag_put_ring() which was passing wrong queue argument, from Eric. 2) Fix a regression due to wrong test for TCP GSO packets used in various BPF helpers like

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread David Miller
From: Eric Dumazet Date: Fri, 8 Mar 2019 15:47:25 -0800 > Signed-off-by: Eric Dumazet Applied and queued up for -stable.

[PATCH bpf] libbpf: handle BTF parsing and loading properly

2019-03-08 Thread Andrii Nakryiko
This patch splits and cleans up error handling logic for loading BTF data. Previously, if BTF data was parsed successfully, but failed to load into kernel, we'd report nonsensical error code, instead of error returned from btf__load(). Now btf__new() and btf__load() are handled separately with prop

Re: [net-next PATCH] net/rds: Return proper "tos" value to user-space

2019-03-08 Thread Zhu Yanjun
在 2019/3/9 6:37, Gerd Rausch 写道: On 07/03/2019 17.37, santosh.shilim...@oracle.com wrote: --- a/net/rds/connection.c +++ b/net/rds/connection.c @@ -736,6 +736,7 @@ static int rds_conn_info_visitor(struct rds_conn_path *cp, void *buffer)   cinfo->next_rx_seq = cp->cp_next_rx_seq;   c

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Eric Dumazet
On 03/08/2019 02:40 PM, Guillaume Nault wrote: > On Fri, Mar 08, 2019 at 02:34:07PM -0800, Eric Dumazet wrote: >> >> >> On 03/08/2019 02:22 PM, Guillaume Nault wrote: >>> On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: On 03/08/2019 01:09 PM, Guillaume Nault wrote: >

Re: [PATCH] net: ethernet: sun: Zero initialize class in default case in niu_add_ethtool_tcam_entry

2019-03-08 Thread David Miller
From: Nathan Chancellor Date: Thu, 7 Mar 2019 16:29:33 -0700 > When building with -Wsometimes-uninitialized, Clang warns: > > drivers/net/ethernet/sun/niu.c:7466:5: warning: variable 'class' is used > uninitialized whenever switch default is taken > [-Wsometimes-uninitialized] > > The default

Re: [PATCH 0/2] Make ipmr queue length configurable

2019-03-08 Thread David Miller
From: Brodie Greenfield Date: Thu, 7 Mar 2019 17:57:27 +1300 > We want to have some more space in our queue for processing incoming > multicast packets, so we can process more of them without dropping > them prematurely. It is useful to be able to increase this limit on > higher-spec platforms t

Re: [PATCH net-next] 8139too : Add support for U.S. Robotics USR997901A 10/100 Cardbus NIC

2019-03-08 Thread David Miller
From: Matthew Whitehead Date: Wed, 6 Mar 2019 14:41:27 -0500 > Add PCI vendor and device identifier for U.S. Robotics USR997901A > 10/100 Cardbus NIC. Tested on real hardware. > > Signed-off-by: Matthew Whitehead Applied, thanks.

Re: [PATCH net] fou, fou6: avoid uninit-value in gue_err() and gue6_err()

2019-03-08 Thread David Miller
From: Eric Dumazet Date: Wed, 6 Mar 2019 10:41:00 -0800 > My prior commit missed the fact that these functions > were using udp_hdr() (aka skb_transport_header()) > to get access to GUE header. > > Since use pskb_transport_may_pull() does not exist yet, > we have to add transport_offset to our

Re: [PATCH] vhost: silence an unused-variable warning

2019-03-08 Thread David Miller
From: Arnd Bergmann Date: Wed, 6 Mar 2019 12:05:49 +0100 > On some architectures, the MMU can be disabled, leading to access_ok() > becoming an empty macro that does not evaluate its size argument, > which in turn produces an unused-variable warning: > > drivers/vhost/vhost.c:1191:9: error: unu

Re: [PATCH net-next] net: sched: fix potential use-after-free in __tcf_chain_put()

2019-03-08 Thread David Miller
From: Vlad Buslov Date: Wed, 6 Mar 2019 17:50:43 +0200 > When used with unlocked classifier that have filters attached to actions > with goto chain, __tcf_chain_put() for last non action reference can race > with calls to same function from action cleanup code that releases last > action referen

Re: [PATCH v2] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-03-08 Thread David Miller
From: Adalbert Lazăr Date: Wed, 6 Mar 2019 12:13:53 +0200 > Previous to commit 22b5c0b63f32 ("vsock/virtio: fix kernel panic > after device hot-unplug"), vsock_core_init() was called from > virtio_vsock_probe(). Now, virtio_transport_reset_no_sock() can be called > before vsock_core_init() has t

Re: [PATCH] connector: fix unsafe usage of ->real_parent

2019-03-08 Thread David Miller
From: Li RongQing Date: Wed, 6 Mar 2019 14:46:27 +0800 > proc_exit_connector() uses ->real_parent lockless. This is not > safe that its parent can go away at any moment, so use RCU to > protect it, and ensure that this task is not released. ... > Fixes: b086ff87251b4a4 ("connector: add parent p

Re: [net-next PATCH] net/rds: Return proper "tos" value to user-space

2019-03-08 Thread Santosh Shilimkar
On 3/8/2019 2:37 PM, Gerd Rausch wrote: On 07/03/2019 17.37, santosh.shilim...@oracle.com wrote: --- a/net/rds/connection.c +++ b/net/rds/connection.c @@ -736,6 +736,7 @@ static int rds_conn_info_visitor(struct rds_conn_path *cp, void *buffer)   cinfo->next_rx_seq = cp->cp_next_rx_seq;   

Re: [PATCH] vxlan: do not need BH again in vxlan_cleanup()

2019-03-08 Thread David Miller
From: Litao Jiao Date: Wed, 6 Mar 2019 12:01:48 +0800 > vxlan_cleanup() is a timer callback, it is already > and only running in BH context. > > Signed-off-by: Litao Jiao Agree with your analysis, applied, thanks.

Re: [PATCH V2 net] net: hns3: add dma_rmb() for rx description

2019-03-08 Thread David Miller
From: Huazhong Tan Date: Wed, 6 Mar 2019 11:26:37 +0800 > From: Jian Shen > > HW can not guarantee complete write desc->rx.size, even though > HNS3_RXD_VLD_B has been set. Driver needs to add dma_rmb() > instruction to make sure desc->rx.size is always valid. > > Fixes: e55970950556 ("net: hns

Re: [PATCH v1 net] lan743x: Fix RX Kernel Panic

2019-03-08 Thread David Miller
From: Bryan Whitehead Date: Tue, 5 Mar 2019 14:46:04 -0500 > @@ -2060,8 +2068,19 @@ static int lan743x_rx_process_packet(struct lan743x_rx > *rx) > /* packet is available */ > if (first_index == last_index) { > /* single buffer packet */ > +

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Guillaume Nault
On Fri, Mar 08, 2019 at 02:34:07PM -0800, Eric Dumazet wrote: > > > On 03/08/2019 02:22 PM, Guillaume Nault wrote: > > On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: > >> > >> > >> On 03/08/2019 01:09 PM, Guillaume Nault wrote: > >>> @@ -216,7 +216,12 @@ struct sock *tcp_get_cookie

Re: [PATCH] net: add missing documentation in linux/skbuff.h

2019-03-08 Thread David Miller
From: Pedro Tammela Date: Tue, 5 Mar 2019 11:35:54 -0300 > This patch adds missing documentation for some inline functions on > linux/skbuff.h. The patch is incomplete and a lot more can be added, > just wondering if it's of interest of the netdev developers. > > Also fixed some whitespaces. >

Re: [net-next PATCH] net/rds: Return proper "tos" value to user-space

2019-03-08 Thread Gerd Rausch
On 07/03/2019 17.37, santosh.shilim...@oracle.com wrote: >> --- a/net/rds/connection.c >> +++ b/net/rds/connection.c >> @@ -736,6 +736,7 @@ static int rds_conn_info_visitor(struct rds_conn_path >> *cp, void *buffer) >>   cinfo->next_rx_seq = cp->cp_next_rx_seq; >>   cinfo->laddr = conn->c_

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Eric Dumazet
On 03/08/2019 02:22 PM, Guillaume Nault wrote: > On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: >> >> >> On 03/08/2019 01:09 PM, Guillaume Nault wrote: >>> @@ -216,7 +216,12 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, >>> struct sk_buff *skb, >>> refcount_set

Re: [RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent device

2019-03-08 Thread Alex Williamson
On Fri, 8 Mar 2019 16:07:54 -0600 Parav Pandit wrote: > Inherit dma mask of parent device in child mdev devices, so that > protocol stack can use right dma mask while doing dma mappings. > > Signed-off-by: Parav Pandit > --- > drivers/vfio/mdev/mdev_core.c | 4 > 1 file changed, 4 insert

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Guillaume Nault
On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: > > > On 03/08/2019 01:09 PM, Guillaume Nault wrote: > > @@ -216,7 +216,12 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, > > struct sk_buff *skb, > > refcount_set(&req->rsk_refcnt, 1); > > tcp_sk(child)-

[RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent device

2019-03-08 Thread Parav Pandit
Inherit dma mask of parent device in child mdev devices, so that protocol stack can use right dma mask while doing dma mappings. Signed-off-by: Parav Pandit --- drivers/vfio/mdev/mdev_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev

[RFC net-next v1 2/3] net/mlx5: Add mdev sub device life cycle command support

2019-03-08 Thread Parav Pandit
Implement mdev hooks to to create mediated devices using mdev driver. Actual mlx5_core driver in the host is expected to bind to these devices using standard device driver model. mdev devices are created using sysfs file as below example. $ uuidgen 49d0e9ac-61b8-4c91-957e-6f6dbc42557d $ echo 49d

[RFC net-next v1 3/3] net/mlx5: Add mdev driver to bind to mdev devices

2019-03-08 Thread Parav Pandit
Add a mdev driver to probe the mdev devices and create fake netdevice for it. Similar to pci driver, when new mdev are created/removed or when user triggers binding a mdev to mlx5_core driver by writing mdev device id to /sys/bus/mdev/drivers/mlx5_core/bind,unbind files, mlx5_core driver's probe()

[RFC net-next v1 0/3] Support mlx5 mediated devices in host

2019-03-08 Thread Parav Pandit
Use case: - A user wants to create/delete hardware linked sub devices without using SR-IOV. These devices for a pci device can be netdev (optional rdma device) or other devices. Such sub devices share some of the PCI device resources and also have their own dedicated resources. A user wants

Re: [Linuxptp-devel] strangeness

2019-03-08 Thread Paul Thomas
On Fri, Mar 8, 2019 at 1:07 PM Paul Thomas wrote: > > Hi Harini, > > On Fri, Mar 8, 2019 at 1:08 AM Harini Katakam wrote: > > > > Hi Paul, > > On Fri, Mar 8, 2019 at 12:33 AM Paul Thomas wrote: > > > > > > On Thu, Mar 7, 2019 at 12:32 AM Harini Katakam wrote: > > > > > > > > Hi Paul, > > > > On

Re: NULL pointer dereference in nft_set_elem_destroy()

2019-03-08 Thread Dmitrii Tcvetkov
On Fri, 8 Mar 2019 11:50:39 +0100 Florian Westphal wrote: > Dmitrii Tcvetkov wrote: > > After upgrade to 5.0 on XPS 13 9360 I get NULL pointer dereference > > in dmesg (attached). Distro is Arch Linux, kernel is built with > > custom config (attached), but distro kernel[1] reproduces the issue >

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Eric Dumazet
On 03/08/2019 01:09 PM, Guillaume Nault wrote: > Commit 7716682cc58e ("tcp/dccp: fix another race at listener > dismantle") let inet_csk_reqsk_queue_add() fail, and adjusted > {tcp,dccp}_check_req() accordingly. However, TFO and syncookies > weren't modified, thus leaking allocated resources on

[PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Guillaume Nault
Commit 7716682cc58e ("tcp/dccp: fix another race at listener dismantle") let inet_csk_reqsk_queue_add() fail, and adjusted {tcp,dccp}_check_req() accordingly. However, TFO and syncookies weren't modified, thus leaking allocated resources on error. Contrary to tcp_check_req(), in both syncookies an

Re: [PATCH] net: stmmac: Avoid one more sometimes uninitialized Clang warning

2019-03-08 Thread Nick Desaulniers
On Thu, Mar 7, 2019 at 8:02 PM Nathan Chancellor wrote: > > When building with -Wsometimes-uninitialized, Clang warns: > > drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:111:2: error: variable > 'ns' is used uninitialized whenever 'if' condition is false > [-Werror,-Wsometimes-uninitialized] > d

Re: [PATCH 1/2] net: bonding: fix restricted __be16 degrades to integer

2019-03-08 Thread Jay Vosburgh
Bo YU wrote: >There are some warning when: > >sudo make C=1 CF=-D__CHECK_ENDIAN__ drivers/net/bonding/ > >drivers/net/bonding/bond_main.c:2385:26: warning: restricted __be16 degrades >to integer >drivers/net/bonding/bond_main.c:2391:20: warning: restricted __be16 degrades >to integer >... >driv

[RFC][Proposal] BPF Control MAP

2019-03-08 Thread Saeed Mahameed
In this proposal I am going to address the lack of a unified user API for accessing and manipulating BPF system attributes, while this proposal is generic and will work on any BPF subsystem (eBPF attach points), I will mostly focus on XDP use cases. So lately I started working on three different X

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Dan Murphy
On 3/8/19 12:06 PM, Wolfgang Grandegger wrote: > > > Am 08.03.19 um 18:52 schrieb Dan Murphy: >> On 3/8/19 11:40 AM, Wolfgang Grandegger wrote: >>> Hello Dan, >>> >>> Am 08.03.19 um 18:25 schrieb Dan Murphy: On 3/8/19 11:08 AM, Wolfgang Grandegger wrote: > Hello, > > Am 08.03.19

[BUG] BPF splat on latest kernels

2019-03-08 Thread Eric Dumazet
Running test_progs on a LOCKDEP enabled kernel (latest David Miller net tree) I got the following splat. It is not immediately obvious to me. Any idea ? [ 4169.908826] == [ 4169.914996] WARNING: possible circular locking dependency detected [ 4

Re: [PATCH v3 bpf]: libbpf: fixing leak when kernel does not support btf

2019-03-08 Thread Daniel Borkmann
On 03/08/2019 05:45 PM, Martin Lau wrote: > On Fri, Mar 08, 2019 at 05:18:14AM +, Nikita V. Shirokov wrote: >> we could end up in situation when we have object file w/ all btf >> info but kernel does not support btf yet. in this situation currently >> libbpf just set obj->btf to NULL w/o freein

Re: [RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address

2019-03-08 Thread Jerome Glisse
On Fri, Mar 08, 2019 at 02:48:45PM -0500, Andrea Arcangeli wrote: > Hello Jeson, > > On Fri, Mar 08, 2019 at 04:50:36PM +0800, Jason Wang wrote: > > Just to make sure I understand here. For boosting through huge TLB, do > > you mean we can do that in the future (e.g by mapping more userspace > >

Re: [RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address

2019-03-08 Thread Andrea Arcangeli
Hello Jeson, On Fri, Mar 08, 2019 at 04:50:36PM +0800, Jason Wang wrote: > Just to make sure I understand here. For boosting through huge TLB, do > you mean we can do that in the future (e.g by mapping more userspace > pages to kenrel) or it can be done by this series (only about three 4K > pag

Re: [PATCH V3 0/6] stmmac: add some fixes for stm32

2019-03-08 Thread David Miller
From: Christophe Roullier Date: Tue, 5 Mar 2019 09:29:22 +0100 > For common stmmac: > - Add support to set CSR Clock range selection in DT > For stm32mpu: > - Glue codes to support magic packet > - Glue codes to support all PHY config : > PHY_MODE (MII,GMII, RMII,

Re: [PATCH] net: dsa: Add support for port mac address

2019-03-08 Thread David Miller
From: xiaofeis Date: Tue, 5 Mar 2019 16:16:53 +0800 > Allow port network device's mac address to be retrieved from the > device tree. > > Signed-off-by: xiaofeis You're not "adding support" you are adding documentation for support that already exists. Please phrase your commit message and su

Re: [PATCH net-next] net: phy: improve handling link_change_notify callback

2019-03-08 Thread David Miller
From: Heiner Kallweit Date: Sun, 3 Mar 2019 19:58:57 +0100 > Currently the Phy driver's link_change_notify callback is called > whenever the state machine is run (every second if polling), no matter > whether the state changed or not. This isn't needed and may confuse > users considering the name

Re: [PATCH net 0/3] sctp: process the error returned from sctp_sock_migrate()

2019-03-08 Thread David Miller
From: Marcelo Ricardo Leitner Date: Fri, 8 Mar 2019 14:00:03 -0300 > On Sun, Mar 03, 2019 at 05:54:52PM +0800, Xin Long wrote: >> This patchset is to process the errs returned by sctp_auth_init_hmacs() >> and sctp_bind_addr_dup() from sctp_sock_migrate(). And also fix a panic >> caused by new ep-

Re: [PATCH] net/ipv6: Skip policy check to improve compliance

2019-03-08 Thread David Miller
Why did you post this twice?

Re: [PATCH net] vxlan: Fix GRO cells race condition between receive and link delete

2019-03-08 Thread David Miller
From: Stefano Brivio Date: Fri, 8 Mar 2019 16:40:57 +0100 > If we receive a packet while deleting a VXLAN device, there's a chance > vxlan_rcv() is called at the same time as vxlan_dellink(). This is fine, > except that vxlan_dellink() should never ever touch stuff that's still in > use, such as

Re: [PATCH net] rxrpc: Fix client call connect/disconnect race

2019-03-08 Thread David Miller
From: David Howells Date: Fri, 08 Mar 2019 12:48:39 + > rxrpc_disconnect_client_call() reads the call's connection ID protocol > value (call->cid) as part of that function's variable declarations. This > is bad because it's not inside the locked section and so may race with > someone grantin

Re: [PATCH net] sctp: remove sched init from sctp_stream_init

2019-03-08 Thread David Miller
From: Xin Long Date: Fri, 8 Mar 2019 15:49:16 +0800 > syzbot reported a NULL-ptr deref caused by that sched->init() in > sctp_stream_init() set stream->rr_next = NULL. > > kasan: GPF could be caused by NULL-ptr deref or user memory access > RIP: 0010:sctp_sched_rr_dequeue+0xd3/0x170 net/sct

Re: [RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address

2019-03-08 Thread Andrea Arcangeli
On Fri, Mar 08, 2019 at 04:58:44PM +0800, Jason Wang wrote: > Can I simply can set_page_dirty() before vunmap() in the mmu notifier > callback, or is there any reason that it must be called within vumap()? I also don't see any problem in doing it before vunmap. As far as the mmu notifier and set_

Re: [RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address

2019-03-08 Thread Andrea Arcangeli
On Fri, Mar 08, 2019 at 05:13:26PM +0800, Jason Wang wrote: > Actually not wrapping around,  the pages for used ring was marked as > dirty after a round of virtqueue processing when we're sure vhost wrote > something there. Thanks for the clarification. So we need to convert it to set_page_dirty

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-08 Thread Jakub Kicinski
On Fri, 8 Mar 2019 15:54:21 +0100, Jiri Pirko wrote: > Fri, Mar 08, 2019 at 03:52:02AM CET, jakub.kicin...@netronome.com wrote: > >On Thu, 7 Mar 2019 10:48:16 +0100, Jiri Pirko wrote: > >> Wed, Mar 06, 2019 at 06:56:38PM CET, jakub.kicin...@netronome.com wrote: > >> >On Wed, 6 Mar 2019 13:20:37

[PATCH] net/ipv6: Skip policy check to improve compliance

2019-03-08 Thread Andrew Boyer
From: Farrell Woods The patch fixes an IPv6 conformance test failure (v6LC_1_2_03a in the UNH INTACT suite) that occurs specifically when IPsec is in use. The test iterates through the set of unassigned protocol numbers (currently, 143 through 252) and inserts these into the next header field of

Re: [PATCH net] route: set the deleted fnhe fnhe_daddr to 0 in ip_del_fnhe to fix a race

2019-03-08 Thread David Miller
From: Xin Long Date: Fri, 8 Mar 2019 14:50:54 +0800 > The race occurs in __mkroute_output() when 2 threads lookup a dst: > > CPU A CPU B > find_exception() > find_exception() [fnhe expires] > ip_del_fnhe() [fnhe is deleted] >

Re: [Linuxptp-devel] strangeness

2019-03-08 Thread Paul Thomas
Hi Harini, On Fri, Mar 8, 2019 at 1:08 AM Harini Katakam wrote: > > Hi Paul, > On Fri, Mar 8, 2019 at 12:33 AM Paul Thomas wrote: > > > > On Thu, Mar 7, 2019 at 12:32 AM Harini Katakam wrote: > > > > > > Hi Paul, > > > On Thu, Mar 7, 2019 at 4:38 AM Paul Thomas wrote: > > > > > > > > On Fri, M

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Wolfgang Grandegger
Am 08.03.19 um 18:52 schrieb Dan Murphy: > On 3/8/19 11:40 AM, Wolfgang Grandegger wrote: >> Hello Dan, >> >> Am 08.03.19 um 18:25 schrieb Dan Murphy: >>> On 3/8/19 11:08 AM, Wolfgang Grandegger wrote: Hello, Am 08.03.19 um 16:48 schrieb Dan Murphy: > Wolfgang > > On 3

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Dan Murphy
On 3/8/19 11:40 AM, Wolfgang Grandegger wrote: > Hello Dan, > > Am 08.03.19 um 18:25 schrieb Dan Murphy: >> On 3/8/19 11:08 AM, Wolfgang Grandegger wrote: >>> Hello, >>> >>> Am 08.03.19 um 16:48 schrieb Dan Murphy: Wolfgang On 3/8/19 8:41 AM, Wolfgang Grandegger wrote: > Hello D

Re: [PATCH net 03/16] net/sched: act_csum: validate the control action inside init()

2019-03-08 Thread Davide Caratti
On Thu, 2019-03-07 at 17:56 +0100, Davide Caratti wrote: > On Thu, 2019-03-07 at 14:51 +, Vlad Buslov wrote: > > [...] hi Vlad, > > On Thu 07 Mar 2019 at 15:56, Davide Caratti wrote: > > > so, I think that the answer to your question: > > > > > > On Wed, 2019-02-27 at 17:50 -0800, Cong Wan

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Wolfgang Grandegger
Hello Dan, Am 08.03.19 um 18:25 schrieb Dan Murphy: > On 3/8/19 11:08 AM, Wolfgang Grandegger wrote: >> Hello, >> >> Am 08.03.19 um 16:48 schrieb Dan Murphy: >>> Wolfgang >>> >>> On 3/8/19 8:41 AM, Wolfgang Grandegger wrote: Hello Dan, thinking more about it... Am 08.03.19

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Dan Murphy
On 3/8/19 11:08 AM, Wolfgang Grandegger wrote: > Hello, > > Am 08.03.19 um 16:48 schrieb Dan Murphy: >> Wolfgang >> >> On 3/8/19 8:41 AM, Wolfgang Grandegger wrote: >>> Hello Dan, >>> >>> thinking more about it... >>> >>> Am 08.03.19 um 14:29 schrieb Wolfgang Grandegger: Hello Dan,

Re: [PATCH net] pptp: dst_release sk_dst_cache in pptp_sock_destruct

2019-03-08 Thread Eric Dumazet
On 03/08/2019 09:17 AM, Eric Dumazet wrote: > > > On 03/07/2019 11:25 PM, Xin Long wrote: >> sk_setup_caps() is called to set sk->sk_dst_cache in pptp_connect, >> so we have to dst_release(sk->sk_dst_cache) in pptp_sock_destruct, >> otherwise, the dst refcnt will leak. >> >> It can be reproduc

Re: [PATCH net] pptp: dst_release sk_dst_cache in pptp_sock_destruct

2019-03-08 Thread Eric Dumazet
On 03/07/2019 11:25 PM, Xin Long wrote: > sk_setup_caps() is called to set sk->sk_dst_cache in pptp_connect, > so we have to dst_release(sk->sk_dst_cache) in pptp_sock_destruct, > otherwise, the dst refcnt will leak. > > It can be reproduced by this syz log: > > r1 = socket$pptp(0x18, 0x1, 0

RE: [RFC net-next 0/8] Introducing subdev bus and devlink extension

2019-03-08 Thread Parav Pandit
> -Original Message- > From: Kirti Wankhede > Sent: Friday, March 8, 2019 6:19 AM > To: Parav Pandit ; Jakub Kicinski > > Cc: Or Gerlitz ; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org; michal.l...@markovi.net; da...@davemloft.net; > gre...@linuxfoundation.org; Jiri Pirko ; Al

Re: [PATCH net] selinux: add the missing walk_size + len check in selinux_sctp_bind_connect

2019-03-08 Thread Marcelo Ricardo Leitner
On Sat, Mar 09, 2019 at 12:07:34AM +0800, Xin Long wrote: > As does in __sctp_connect(), when checking addrs in a while loop, after > get the addr len according to sa_family, it's necessary to do the check > walk_size + af->sockaddr_len > addrs_size to make sure it won't access > an out-of-bounds a

Re: [PATCH v7 1/4] can: m_can: Create a m_can platform framework

2019-03-08 Thread Wolfgang Grandegger
Hello, Am 08.03.19 um 16:48 schrieb Dan Murphy: > Wolfgang > > On 3/8/19 8:41 AM, Wolfgang Grandegger wrote: >> Hello Dan, >> >> thinking more about it... >> >> Am 08.03.19 um 14:29 schrieb Wolfgang Grandegger: >>> Hello Dan, >>> >>> Am 08.03.19 um 13:44 schrieb Dan Murphy: Wolfgang >>>

Re: [PATCH net] vxlan: Fix GRO cells race condition between receive and link delete

2019-03-08 Thread Eric Dumazet
On 03/08/2019 07:40 AM, Stefano Brivio wrote: > If we receive a packet while deleting a VXLAN device, there's a chance > vxlan_rcv() is called at the same time as vxlan_dellink(). This is fine, > except that vxlan_dellink() should never ever touch stuff that's still in > use, such as the GRO cel

Re: [PATCH net] sctp: remove sched init from sctp_stream_init

2019-03-08 Thread Marcelo Ricardo Leitner
On Fri, Mar 08, 2019 at 07:21:36AM -0500, Neil Horman wrote: > On Fri, Mar 08, 2019 at 03:49:16PM +0800, Xin Long wrote: > > syzbot reported a NULL-ptr deref caused by that sched->init() in > > sctp_stream_init() set stream->rr_next = NULL. > > > > kasan: GPF could be caused by NULL-ptr deref or

Re: [PATCH net 0/3] sctp: process the error returned from sctp_sock_migrate()

2019-03-08 Thread Marcelo Ricardo Leitner
On Sun, Mar 03, 2019 at 05:54:52PM +0800, Xin Long wrote: > This patchset is to process the errs returned by sctp_auth_init_hmacs() > and sctp_bind_addr_dup() from sctp_sock_migrate(). And also fix a panic > caused by new ep->auth_hmacs was not set due to net->sctp.auth_enable > changed by sysctl b

Re: [PATCH net 1/3] sctp: sctp_sock_migrate() returns error if sctp_bind_addr_dup() fails

2019-03-08 Thread Marcelo Ricardo Leitner
On Fri, Mar 08, 2019 at 11:48:10AM +0800, Xin Long wrote: > On Fri, Mar 8, 2019 at 2:25 AM Marcelo Ricardo Leitner > wrote: > > > > On Sun, Mar 03, 2019 at 05:54:53PM +0800, Xin Long wrote: > > > It should fail to create the new sk if sctp_bind_addr_dup() fails > > > when accepting or peeloff an a

Cadence/macb ethernet driver bug on nonlinear skb buffers

2019-03-08 Thread Klaus Doth
Hi, I think I found a bug in the cadence / macb ethernet driver. It seems the macb_pad_and_fcs function in macb_main.c does not handle cases of fragmented/paged sk-buffers correctly, as sometimes a memmove and afterwards skb_put_u8 is done on fragmented buffers. skb_put_u8 then fails as it check

Re: [PATCH v3 bpf]: libbpf: fixing leak when kernel does not support btf

2019-03-08 Thread Martin Lau
On Fri, Mar 08, 2019 at 05:18:14AM +, Nikita V. Shirokov wrote: > we could end up in situation when we have object file w/ all btf > info but kernel does not support btf yet. in this situation currently > libbpf just set obj->btf to NULL w/o freeing it first. > this patch if fixing it by making

[PATCH] net/ipv6: Skip policy check to improve compliance

2019-03-08 Thread Andrew Boyer
From: Farrell Woods The patch fixes an IPv6 conformance test failure (v6LC_1_2_03a in the UNH INTACT suite) that occurs specifically when IPsec is in use. The test iterates through the set of unassigned protocol numbers (currently, 143 through 252) and inserts these into the next header field of

Re: [PATCH] netfilter: nf_conntrack_sip: fix IPV6 dependency

2019-03-08 Thread Alin Năstac
Hi Pablo, On Fri, Mar 8, 2019 at 5:04 PM Pablo Neira Ayuso wrote: > > hi Arnd, > > Cc'ing Alin Nastac. > > On Mon, Mar 04, 2019 at 09:40:12PM +0100, Arnd Bergmann wrote: > > With CONFIG_IPV6=m and CONFIG_NF_CONNTRACK_SIP=y, we now get a link failure: > > > > net/netfilter/nf_conntrack_sip.o: In fu

  1   2   >