Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-09-18 Thread Jiri Pirko
Thu, Sep 19, 2019 at 01:24:12AM CEST, xiyou.wangc...@gmail.com wrote: >The TCA_KIND attribute is of NLA_STRING which does not check >the NUL char. KMSAN reported an uninit-value of TCA_KIND which >is likely caused by the lack of NUL. > >Change it to NLA_NUL_STRING and add a max len too. > >Fixes: 8

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-09-18 Thread Cong Wang
On Wed, Sep 18, 2019 at 7:41 PM David Ahern wrote: > > On 9/18/19 5:24 PM, Cong Wang wrote: > > The TCA_KIND attribute is of NLA_STRING which does not check > > the NUL char. KMSAN reported an uninit-value of TCA_KIND which > > is likely caused by the lack of NUL. > > > > Change it to NLA_NUL_STRI

Re: udp sendmsg ENOBUFS clarification

2019-09-18 Thread Josh Hunt
On 9/18/19 8:35 AM, Willem de Bruijn wrote: On Tue, Sep 17, 2019 at 4:20 PM Josh Hunt wrote: I was running some tests recently with the udpgso_bench_tx benchmark in selftests and noticed that in some configurations it reported sending more than line rate! Looking into it more I found that I wa

Re: [PATCH RFC] net/phy: fix Marvell PHYs probe failure when HWMON and THERMAL_OF are enabled

2019-09-18 Thread Andrew Lunn
On Thu, Sep 19, 2019 at 12:38:37AM +0300, Peter Mamonov wrote: > Hello, > > Some time ago I've discovered that probe functions of certain Marvell PHYs > fail if both HWMON and THERMAL_OF config options are enabled. Hi Peter It probably affects more then Marvell PHYs. > The root > cause of thi

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-09-18 Thread David Ahern
On 9/18/19 5:24 PM, Cong Wang wrote: > The TCA_KIND attribute is of NLA_STRING which does not check > the NUL char. KMSAN reported an uninit-value of TCA_KIND which > is likely caused by the lack of NUL. > > Change it to NLA_NUL_STRING and add a max len too. > > Fixes: 8b4c3cdd9dd8 ("net: sched:

Re: [PATCH RFC v3 2/5] net: Add NETIF_F_GRO_LIST feature

2019-09-18 Thread Subash Abhinov Kasiviswanathan
On 2019-09-18 10:10, Willem de Bruijn wrote: On Wed, Sep 18, 2019 at 3:25 AM Steffen Klassert wrote: This adds a new NETIF_F_GRO_LIST feature flag. I will be used to configure listfyed GRO what will be implemented with some followup paches. This should probably simultaneously introduce SKB_G

[Patch net] net_sched: add policy validation for action attributes

2019-09-18 Thread Cong Wang
Similar to commit 8b4c3cdd9dd8 ("net: sched: Add policy validation for tc attributes"), we need to add proper policy validation for TC action attributes too. Cc: David Ahern Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang --- net/sched/act_api.c | 34 ++---

[Patch net] net_sched: add max len check for TCA_KIND

2019-09-18 Thread Cong Wang
The TCA_KIND attribute is of NLA_STRING which does not check the NUL char. KMSAN reported an uninit-value of TCA_KIND which is likely caused by the lack of NUL. Change it to NLA_NUL_STRING and add a max len too. Fixes: 8b4c3cdd9dd8 ("net: sched: Add policy validation for tc attributes") Reported-

Re: [PATCH net 2/3] net: sched: multiq: don't call qdisc_put() while holding tree lock

2019-09-18 Thread Cong Wang
On Wed, Sep 18, 2019 at 12:32 AM Vlad Buslov wrote: > diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c > index e1087746f6a2..4cfa9a7bd29e 100644 > --- a/net/sched/sch_multiq.c > +++ b/net/sched/sch_multiq.c > @@ -187,18 +187,21 @@ static int multiq_tune(struct Qdisc *sch, struct nlattr

Re: [PATCH net 0/3] Fix Qdisc destroy issues caused by adding fine-grained locking to filter API

2019-09-18 Thread Cong Wang
On Wed, Sep 18, 2019 at 12:32 AM Vlad Buslov wrote: > > TC filter API unlocking introduced several new fine-grained locks. The > change caused sleeping-while-atomic BUGs in several Qdiscs that call cls > APIs which need to obtain new mutex while holding sch tree spinlock. This > series fixes affec

Re: SFP support with RGMII MAC via RGMII to SERDES/SGMII PHY?

2019-09-18 Thread Russell King - ARM Linux admin
On Wed, Sep 18, 2019 at 01:44:33PM -0500, George McCollister wrote: > Russell, > > On Mon, Sep 16, 2019 at 10:40 AM George McCollister > wrote: > > > > On Sat, Sep 14, 2019 at 3:49 AM Russell King - ARM Linux admin > > wrote: > > > > > > On Fri, Sep 13, 2019 at 08:31:18PM -0700, Florian Fainelli

Re: dsa traffic priorization

2019-09-18 Thread Florian Fainelli
On 9/18/19 12:39 PM, Vladimir Oltean wrote: > Hi Florian, > > On Wed, 18 Sep 2019 at 20:42, Florian Fainelli wrote: >> >> On 9/18/19 7:36 AM, Vladimir Oltean wrote: >>> Hi Sascha, >>> >>> On Wed, 18 Sep 2019 at 17:03, Sascha Hauer wrote: Hi All, We have a customer using a Mar

Re: [PATCH V2 net 1/1] net/tls(TLS_SW): Fix list_del double free caused by a race condition in tls_tx_records

2019-09-18 Thread Jakub Kicinski
On Wed, 18 Sep 2019 17:37:44 -0400, Pooja Trivedi wrote: > Hi Jakub, > > I have explained one potential way for the race to happen in my > original message to the netdev mailing list here: > https://marc.info/?l=linux-netdev&m=156805120229554&w=2 > > Here is the part out of there that's relevant

[PATCH RFC] net/phy: fix Marvell PHYs probe failure when HWMON and THERMAL_OF are enabled

2019-09-18 Thread Peter Mamonov
Hello, Some time ago I've discovered that probe functions of certain Marvell PHYs fail if both HWMON and THERMAL_OF config options are enabled. The root cause of this problem is a lack of an OF node for a PHY's built-in temperature sensor. However I consider adding this OF node to be a bit ex

Re: [PATCH V2 net 1/1] net/tls(TLS_SW): Fix list_del double free caused by a race condition in tls_tx_records

2019-09-18 Thread Pooja Trivedi
Hi Jakub, I have explained one potential way for the race to happen in my original message to the netdev mailing list here: https://marc.info/?l=linux-netdev&m=156805120229554&w=2 Here is the part out of there that's relevant to your question: - One poten

Re: [PATCH net] net: sched: fix possible crash in tcf_action_destroy()

2019-09-18 Thread Cong Wang
On Wed, Sep 18, 2019 at 12:57 PM 'Eric Dumazet' via syzkaller wrote: > > If the allocation done in tcf_exts_init() failed, > we end up with a NULL pointer in exts->actions. ... > diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c > index > efd3cfb80a2ad775dc8ab3c4900bd73d52c7aaad..9aef93300f1

Re: [PATCH V2 net 1/1] net/tls(TLS_SW): Fix list_del double free caused by a race condition in tls_tx_records

2019-09-18 Thread Jakub Kicinski
On Tue, 17 Sep 2019 21:13:56 +, Pooja Trivedi wrote: > From: Pooja Trivedi Ugh the same problem was diagnosed recently by Mallesham but I just realized he took the conversation off list so you can't see it. > Enclosing tls_tx_records within lock_sock/release_sock pair to ensure > write-synch

Re: [patch iproute2-next v2] devlink: add reload failed indication

2019-09-18 Thread Jiri Pirko
Wed, Sep 18, 2019 at 10:01:31PM CEST, dsah...@gmail.com wrote: >On 9/18/19 1:37 AM, Jiri Pirko wrote: >> Wed, Sep 18, 2019 at 01:46:13AM CEST, dsah...@gmail.com wrote: >>> On 9/17/19 12:36 PM, Jiri Pirko wrote: Tue, Sep 17, 2019 at 06:46:31PM CEST, dsah...@gmail.com wrote: > On 9/16/19 3:4

Re: [patch iproute2-next v2] devlink: add reload failed indication

2019-09-18 Thread David Ahern
On 9/18/19 1:37 AM, Jiri Pirko wrote: > Wed, Sep 18, 2019 at 01:46:13AM CEST, dsah...@gmail.com wrote: >> On 9/17/19 12:36 PM, Jiri Pirko wrote: >>> Tue, Sep 17, 2019 at 06:46:31PM CEST, dsah...@gmail.com wrote: On 9/16/19 3:44 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Add indi

[PATCH net] net: sched: fix possible crash in tcf_action_destroy()

2019-09-18 Thread Eric Dumazet
If the allocation done in tcf_exts_init() failed, we end up with a NULL pointer in exts->actions. kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] PREEMPT SMP KASAN CPU: 1 PID: 8198 Comm: syz-executor.3 Not tainted 5.3.0-rc8+ #0 Hardware name:

Re: dsa traffic priorization

2019-09-18 Thread Vladimir Oltean
Hi Florian, On Wed, 18 Sep 2019 at 20:42, Florian Fainelli wrote: > > On 9/18/19 7:36 AM, Vladimir Oltean wrote: > > Hi Sascha, > > > > On Wed, 18 Sep 2019 at 17:03, Sascha Hauer wrote: > >> > >> Hi All, > >> > >> We have a customer using a Marvell 88e6240 switch with Ethercat on one > >> port

Re: [PATCH RFC v3 0/5] Support fraglist GRO/GSO

2019-09-18 Thread Subash Abhinov Kasiviswanathan
On 2019-09-18 10:58, Marcelo Ricardo Leitner wrote: On Wed, Sep 18, 2019 at 12:17:08PM -0400, Willem de Bruijn wrote: On Wed, Sep 18, 2019 at 3:25 AM Steffen Klassert wrote: > > This patchset adds support to do GRO/GSO by chaining packets > of the same flow at the SKB frag_list pointer. This av

Re: SFP support with RGMII MAC via RGMII to SERDES/SGMII PHY?

2019-09-18 Thread George McCollister
Russell, On Mon, Sep 16, 2019 at 10:40 AM George McCollister wrote: > > On Sat, Sep 14, 2019 at 3:49 AM Russell King - ARM Linux admin > wrote: > > > > On Fri, Sep 13, 2019 at 08:31:18PM -0700, Florian Fainelli wrote: > > > +Russell, Andrew, Heiner, > > > > > > On 9/13/2019 9:44 AM, George McCol

Fwd: [PATCH] bonding/802.3ad: fix slave initialization states race

2019-09-18 Thread Алексей Захаров
> >Once a while, one of 802.3ad slaves fails to initialize and hangs in > >BOND_LINK_FAIL state. Commit 334031219a84 ("bonding/802.3ad: fix slave > >link initialization transition states") checks slave->last_link_up. But > >link can still hang in weird state. > >After physical link comes up it send

Re: [bpf-next,v3] samples: bpf: add max_pckt_size option at xdp_adjust_tail

2019-09-18 Thread Andrii Nakryiko
On Wed, Sep 18, 2019 at 10:37 AM Daniel T. Lee wrote: > > On Tue, Sep 17, 2019 at 1:04 PM Andrii Nakryiko > wrote: > > > > On Wed, Sep 11, 2019 at 2:33 PM Daniel T. Lee > > wrote: > > > > > > Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited > > > to 600. To make this size flexible

Re: dsa traffic priorization

2019-09-18 Thread Florian Fainelli
On 9/18/19 7:36 AM, Vladimir Oltean wrote: > Hi Sascha, > > On Wed, 18 Sep 2019 at 17:03, Sascha Hauer wrote: >> >> Hi All, >> >> We have a customer using a Marvell 88e6240 switch with Ethercat on one port >> and >> regular network traffic on another port. The customer wants to configure two >>

Re: [bpf-next,v3] samples: bpf: add max_pckt_size option at xdp_adjust_tail

2019-09-18 Thread Daniel T. Lee
On Tue, Sep 17, 2019 at 1:04 PM Andrii Nakryiko wrote: > > On Wed, Sep 11, 2019 at 2:33 PM Daniel T. Lee wrote: > > > > Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited > > to 600. To make this size flexible, a new map 'pcktsz' is added. > > > > By updating new packet size to this m

Re: dsa traffic priorization

2019-09-18 Thread Florian Fainelli
On 9/18/19 8:03 AM, Dave Taht wrote: > On Wed, Sep 18, 2019 at 7:37 AM Vladimir Oltean wrote: >> >> Hi Sascha, >> >> On Wed, 18 Sep 2019 at 17:03, Sascha Hauer wrote: >>> >>> Hi All, >>> >>> We have a customer using a Marvell 88e6240 switch with Ethercat on one port >>> and >>> regular network t

Re: [PATCH RFC v3 0/5] Support fraglist GRO/GSO

2019-09-18 Thread Marcelo Ricardo Leitner
On Wed, Sep 18, 2019 at 12:17:08PM -0400, Willem de Bruijn wrote: > On Wed, Sep 18, 2019 at 3:25 AM Steffen Klassert > wrote: > > > > This patchset adds support to do GRO/GSO by chaining packets > > of the same flow at the SKB frag_list pointer. This avoids > > the overhead to merge payloads into

Re: ip netns exec hides mount points from child processes

2019-09-18 Thread Naja Melan
Thank you for looking into it. Sorry for the long delay, but my answers got blocked by xmission several times and I think I just gave up on containers at some point. This is still not solved though. To answer Eric's question: > Why you don't see the new sysfs is something I need more informatio

Re: [PATCH RFC v3 0/5] Support fraglist GRO/GSO

2019-09-18 Thread Willem de Bruijn
On Wed, Sep 18, 2019 at 3:25 AM Steffen Klassert wrote: > > This patchset adds support to do GRO/GSO by chaining packets > of the same flow at the SKB frag_list pointer. This avoids > the overhead to merge payloads into one big packet, and > on the other end, if GSO is needed it avoids the overhea

Re: [PATCH RFC v3 5/5] udp: Support UDP fraglist GRO/GSO.

2019-09-18 Thread Willem de Bruijn
On Wed, Sep 18, 2019 at 3:25 AM Steffen Klassert wrote: > > This patch extends UDP GRO to support fraglist GRO/GSO > by using the previously introduced infrastructure. > All UDP packets that are not targeted to a GRO capable > UDP sockets are going to fraglist GRO now (local input > and forward).

Re: [PATCH RFC v3 2/5] net: Add NETIF_F_GRO_LIST feature

2019-09-18 Thread Willem de Bruijn
On Wed, Sep 18, 2019 at 3:25 AM Steffen Klassert wrote: > > This adds a new NETIF_F_GRO_LIST feature flag. I will be used > to configure listfyed GRO what will be implemented with some > followup paches. This should probably simultaneously introduce SKB_GSO_FRAGLIST as well as a BUILD_BUG_ON in n

Re: udp sendmsg ENOBUFS clarification

2019-09-18 Thread Willem de Bruijn
On Tue, Sep 17, 2019 at 4:20 PM Josh Hunt wrote: > > I was running some tests recently with the udpgso_bench_tx benchmark in > selftests and noticed that in some configurations it reported sending > more than line rate! Looking into it more I found that I was overflowing > the qdisc queue and so i

[PATCH net] sch_netem: fix a divide by zero in tabledist()

2019-09-18 Thread Eric Dumazet
syzbot managed to crash the kernel in tabledist() loading an empty distribution table. t = dist->table[rnd % dist->size]; Simply return an error when such load is attempted. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot --- net/sched/sch_nete

Re: dsa traffic priorization

2019-09-18 Thread Dave Taht
On Wed, Sep 18, 2019 at 7:37 AM Vladimir Oltean wrote: > > Hi Sascha, > > On Wed, 18 Sep 2019 at 17:03, Sascha Hauer wrote: > > > > Hi All, > > > > We have a customer using a Marvell 88e6240 switch with Ethercat on one port > > and > > regular network traffic on another port. The customer wants

Re: dsa traffic priorization

2019-09-18 Thread Vladimir Oltean
Hi Sascha, On Wed, 18 Sep 2019 at 17:03, Sascha Hauer wrote: > > Hi All, > > We have a customer using a Marvell 88e6240 switch with Ethercat on one port > and > regular network traffic on another port. The customer wants to configure two > things > on the switch: First Ethercat traffic shall be

Re: [PATCH] bonding/802.3ad: fix slave initialization states race

2019-09-18 Thread Jay Vosburgh
Aleksei Zakharov wrote: >Once a while, one of 802.3ad slaves fails to initialize and hangs in >BOND_LINK_FAIL state. Commit 334031219a84 ("bonding/802.3ad: fix slave >link initialization transition states") checks slave->last_link_up. But >link can still hang in weird state. >After physical link

dsa traffic priorization

2019-09-18 Thread Sascha Hauer
Hi All, We have a customer using a Marvell 88e6240 switch with Ethercat on one port and regular network traffic on another port. The customer wants to configure two things on the switch: First Ethercat traffic shall be priorized over other network traffic (effectively prioritizing traffic based

Re: Bug report (with fix) for DEC Tulip driver (de2104x.c)

2019-09-18 Thread Thomas Bogendoerfer
On Wed, Sep 18, 2019 at 07:56:16AM +0200, Helge Deller wrote: > On 18.09.19 00:51, John David Anglin wrote: > > On 2019-09-17 5:36 p.m., Arlie Davis wrote: > >> Likewise, I'm at a loss for testing with real hardware. It's hard to > >> find such things, now. > > How does de2104x compare to ds2142/43

[PATCH] drivers:staging:qlge: Removed unnecessary variable

2019-09-18 Thread Aliasgar Surti
From: Aliasgar Surti coccicheck reported warning for unnecessary variable used. This patch fixes the same by removing the variable and returning value directly. Signed-off-by: Aliasgar Surti --- drivers/staging/qlge/qlge_dbg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH] bonding/802.3ad: fix slave initialization states race

2019-09-18 Thread Aleksei Zakharov
Once a while, one of 802.3ad slaves fails to initialize and hangs in BOND_LINK_FAIL state. Commit 334031219a84 ("bonding/802.3ad: fix slave link initialization transition states") checks slave->last_link_up. But link can still hang in weird state. After physical link comes up it sends first two LAC

[PATCH bpf] xsk: relax UMEM headroom alignment

2019-09-18 Thread Björn Töpel
From: Björn Töpel This patch removes the 64B alignment of the UMEM headroom. There is really no reason for it, and having a headroom less than 64B should be valid. Fixes: c0c77d8fb787 ("xsk: add user memory registration support sockopt") Signed-off-by: Björn Töpel --- net/xdp/xdp_umem.c | 2 --

Re: [patch iproute2-next v2] devlink: add reload failed indication

2019-09-18 Thread Jiri Pirko
Wed, Sep 18, 2019 at 01:46:13AM CEST, dsah...@gmail.com wrote: >On 9/17/19 12:36 PM, Jiri Pirko wrote: >> Tue, Sep 17, 2019 at 06:46:31PM CEST, dsah...@gmail.com wrote: >>> On 9/16/19 3:44 AM, Jiri Pirko wrote: From: Jiri Pirko Add indication about previous failed devlink reload. >>

[PATCH net 1/3] net: sched: sch_htb: don't call qdisc_put() while holding tree lock

2019-09-18 Thread Vlad Buslov
Recent changes that removed rtnl dependency from rules update path of tc also made tcf_block_put() function sleeping. This function is called from ops->destroy() of several Qdisc implementations, which in turn is called by qdisc_put(). Some Qdiscs call qdisc_put() while holding sch tree spinlock, w

[PATCH net 0/3] Fix Qdisc destroy issues caused by adding fine-grained locking to filter API

2019-09-18 Thread Vlad Buslov
TC filter API unlocking introduced several new fine-grained locks. The change caused sleeping-while-atomic BUGs in several Qdiscs that call cls APIs which need to obtain new mutex while holding sch tree spinlock. This series fixes affected Qdiscs by ensuring that cls API that became sleeping is onl

[PATCH net 3/3] net: sched: sch_sfb: don't call qdisc_put() while holding tree lock

2019-09-18 Thread Vlad Buslov
Recent changes that removed rtnl dependency from rules update path of tc also made tcf_block_put() function sleeping. This function is called from ops->destroy() of several Qdisc implementations, which in turn is called by qdisc_put(). Some Qdiscs call qdisc_put() while holding sch tree spinlock, w

[PATCH net 2/3] net: sched: multiq: don't call qdisc_put() while holding tree lock

2019-09-18 Thread Vlad Buslov
Recent changes that removed rtnl dependency from rules update path of tc also made tcf_block_put() function sleeping. This function is called from ops->destroy() of several Qdisc implementations, which in turn is called by qdisc_put(). Some Qdiscs call qdisc_put() while holding sch tree spinlock, w

[PATCH RFC v3 0/5] Support fraglist GRO/GSO

2019-09-18 Thread Steffen Klassert
This patchset adds support to do GRO/GSO by chaining packets of the same flow at the SKB frag_list pointer. This avoids the overhead to merge payloads into one big packet, and on the other end, if GSO is needed it avoids the overhead of splitting the big packet back to the native form. Patch 1 Ena

[PATCH RFC v3 5/5] udp: Support UDP fraglist GRO/GSO.

2019-09-18 Thread Steffen Klassert
This patch extends UDP GRO to support fraglist GRO/GSO by using the previously introduced infrastructure. All UDP packets that are not targeted to a GRO capable UDP sockets are going to fraglist GRO now (local input and forward). Signed-off-by: Steffen Klassert --- net/ipv4/udp_offload.c | 61 ++

[PATCH RFC v3 1/5] UDP: enable GRO by default.

2019-09-18 Thread Steffen Klassert
This patch enables UDP GRO regardless if a GRO capable socket is present. With this GRO is done by default for the local input and forwarding path. Signed-off-by: Steffen Klassert --- include/net/udp.h | 2 +- net/ipv4/udp_offload.c | 33 ++--- net/ipv6/udp_offl

[PATCH RFC v3 4/5] net: Support GRO/GSO fraglist chaining.

2019-09-18 Thread Steffen Klassert
This patch adds the core functions to chain/unchain GSO skbs at the frag_list pointer. This also adds a new GSO type SKB_GSO_FRAGLIST and a is_flist flag to napi_gro_cb which indicates that this flow will be GROed by fraglist chaining. Signed-off-by: Steffen Klassert --- include/linux/netdevice.

[PATCH RFC v3 2/5] net: Add NETIF_F_GRO_LIST feature

2019-09-18 Thread Steffen Klassert
This adds a new NETIF_F_GRO_LIST feature flag. I will be used to configure listfyed GRO what will be implemented with some followup paches. Signed-off-by: Steffen Klassert --- include/linux/netdev_features.h | 2 ++ net/core/ethtool.c | 1 + 2 files changed, 3 insertions(+) diff --

[PATCH RFC v3 3/5] net: Add a netdev software feature set that defaults to off.

2019-09-18 Thread Steffen Klassert
The previous patch added the NETIF_F_GRO_LIST feature. This is a software feature that should default to off. Current software features default to on, so add a new feature set that defaults to off. Signed-off-by: Steffen Klassert --- include/linux/netdev_features.h | 3 +++ net/core/dev.c

Re: [PATCH iproute2 4/4] devlink: Fix devlink health set command

2019-09-18 Thread Aya Levin
On 9/17/2019 6:23 PM, Stephen Hemminger wrote: > On Thu, 5 Sep 2019 15:43:07 +0300 > Tariq Toukan wrote: > >> From: Aya Levin >> >> Prior to this patch both the reporter's name and the grace period >> attributes shared the same bit. This caused zeroing grace period when >> setting auto recove