[PATCH net] ionic: Fix an error code in ionic_lif_alloc()

2019-09-20 Thread Dan Carpenter
We need to set the error code on this path. Otherwise it probably results in a NULL dereference down the line. Fixes: aa3198819bea ("ionic: Add RSS support") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driv

Re: Verify ACK packets in handshake in kernel module (Access TCP state table)

2019-09-20 Thread Yadunandan Pillai
You're right. I clearly need to be more aware of where I am looking. I think I got tripped up because I was trying to only look at header files like a noob. There is a tcp_ack function there with flags for this purpose. Appreciate it! Just one question, would it be acceptable to directly include

Re: Verify ACK packets in handshake in kernel module (Access TCP state table)

2019-09-20 Thread Willy Tarreau
On Fri, Sep 20, 2019 at 11:43:50PM +, Swarm wrote: > First time emailing to this mailing list so please let me know if I made a > mistake in how I sent it. I'm trying to receive a notification from the > kernel once it verifies an ACK packet in a handshake. Problem is, there is no > API or kern

Re: [PATCH net] ipv6: fix a typo in fib6_rule_lookup()

2019-09-20 Thread Jakub Kicinski
On Thu, 19 Sep 2019 10:12:36 -0700, Eric Dumazet wrote: > Yi Ren reported an issue discovered by syzkaller, and bisected > to the cited commit. > > Many thanks to Yi, this trivial patch does not reflect the patient > work that has been done. > > Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_

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

2019-09-20 Thread Jakub Kicinski
On Wed, 18 Sep 2019 08:05:39 -0700, Eric Dumazet wrote: > 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") > S

Re: [PATCH v3 0/2] net: stmmac: Enhanced addressing mode for DWMAC 4.10

2019-09-20 Thread Thierry Reding
On Fri, Sep 20, 2019 at 10:02:28AM -0700, Florian Fainelli wrote: > On 9/20/19 10:00 AM, Thierry Reding wrote: > > From: Thierry Reding > > > > The DWMAC 4.10 supports the same enhanced addressing mode as later > > generations. Parse this capability from the hardware feature registers > > and set

Re: [PATCH net] ipv4: Revert removal of rt_uses_gateway

2019-09-20 Thread David Ahern
On 9/20/19 7:30 PM, Jakub Kicinski wrote: > I'm assuming the mix of u8 and __u8 is intentional, since this is a partial > revert :) original patch for rt_uses_gateway used __u8 so yes put that back. not sure why I used u8 for the new field, but left it on the move.

Re: [PATCH net] ipv4: Revert removal of rt_uses_gateway

2019-09-20 Thread Jakub Kicinski
On Tue, 17 Sep 2019 10:39:49 -0700, David Ahern wrote: > From: David Ahern > > Julian noted that rt_uses_gateway has a more subtle use than 'is gateway > set': > > https://lore.kernel.org/netdev/alpine.lfd.2.21.1909151104060.2...@ja.home.ssi.bg/ > > Revert that part of the commit referenced

Re: [PATCH] selftests: Update fib_nexthop_multiprefix to handle missing ping6

2019-09-20 Thread Jakub Kicinski
On Tue, 17 Sep 2019 10:30:35 -0700, David Ahern wrote: > From: David Ahern > > Some distributions (e.g., debian buster) do not install ping6. Re-use > the hook in pmtu.sh to detect this and fallback to ping. > > Fixes: 735ab2f65dce ("selftests: Add test with multiple prefixes using single > nex

Re: [PATCH net] selftests: Update fib_tests to handle missing ping6

2019-09-20 Thread Jakub Kicinski
On Tue, 17 Sep 2019 10:30:21 -0700, David Ahern wrote: > From: David Ahern > > Some distributions (e.g., debian buster) do not install ping6. Re-use > the hook in pmtu.sh to detect this and fallback to ping. > > Fixes: a0e11da78f48 ("fib_tests: Add tests for metrics on routes") > Signed-off-by:

Re: [PATCH net] net/sched: act_sample: don't push mac header on ip6gre ingress

2019-09-20 Thread Jakub Kicinski
On Tue, 17 Sep 2019 11:30:55 +0200, Davide Caratti wrote: > current 'sample' action doesn't push the mac header of ingress packets if > they are received by a layer 3 tunnel (like gre or sit); but it forgot to > check for gre over ipv6, so the following script: > > # tc q a dev $d clsact > # tc

Re: [PATCH net] net/rds: Check laddr_check before calling it

2019-09-20 Thread Jakub Kicinski
On Tue, 17 Sep 2019 08:29:18 -0700, Ka-Cheong Poon wrote: > In rds_bind(), laddr_check is called without checking if it is NULL or > not. And rs_transport should be reset if rds_add_bound() fails. > > Reported-by: syzbot+fae39afd2101a17ec...@syzkaller.appspotmail.com > Signed-off-by: Ka-Cheong Po

Re: CONFIG_NET_TC_SKB_EXT

2019-09-20 Thread Daniel Borkmann
On 9/21/19 12:56 AM, Jakub Kicinski wrote: [...] I thought idea of stuffing things into skb extensions are only justified if it's not enabled by default for everyone. :( [0] https://lore.kernel.org/netdev/cahc9vhsz1_ka1tcjtnjwk26bokghkgbpt7v1o82mwpduvww...@mail.gmail.com/T/#u The skb ext

Re: [PATCH net v3 00/11] net: fix nested device bugs

2019-09-20 Thread Jakub Kicinski
On Mon, 16 Sep 2019 22:47:51 +0900, Taehee Yoo wrote: > This patchset fixes several bugs that are related to nesting > device infrastructure. > Current nesting infrastructure code doesn't limit the depth level of > devices. nested devices could be handled recursively. at that moment, > it needs hug

Re: [PATCH net v3 09/11] net: core: add ignore flag to netdev_adjacent structure

2019-09-20 Thread Jakub Kicinski
On Mon, 16 Sep 2019 22:48:00 +0900, Taehee Yoo wrote: > In order to link an adjacent node, netdev_upper_dev_link() is used > and in order to unlink an adjacent node, netdev_upper_dev_unlink() is used. > unlink operation does not fail, but link operation can fail. > > In order to exchange adjacent

Re: [PATCH net v3 10/11] vxlan: add adjacent link to limit depth level

2019-09-20 Thread Jakub Kicinski
On Mon, 16 Sep 2019 22:48:01 +0900, Taehee Yoo wrote: > Current vxlan code doesn't limit the number of nested devices. > Nested devices would be handled recursively and this routine needs > huge stack memory. So, unlimited nested devices could make > stack overflow. > > In order to fix this issue,

Verify ACK packets in handshake in kernel module (Access TCP state table)

2019-09-20 Thread Swarm
First time emailing to this mailing list so please let me know if I made a mistake in how I sent it. I'm trying to receive a notification from the kernel once it verifies an ACK packet in a handshake. Problem is, there is no API or kernel resource I've seen that supports this feature for both sy

Re: CONFIG_NET_TC_SKB_EXT

2019-09-20 Thread Daniel Borkmann
On 9/21/19 12:56 AM, Jakub Kicinski wrote: On Sat, 21 Sep 2019 00:15:16 +0200, Daniel Borkmann wrote: On 9/20/19 6:16 PM, Jakub Kicinski wrote: On Thu, 19 Sep 2019 15:13:55 +, Vlad Buslov wrote: On Thu 19 Sep 2019 at 14:21, David Miller wrote: As Linus pointed out, the Kconfig logic for

[PATCH bpf] selftests/bpf: test_progs: fix client/server race in tcp_rtt

2019-09-20 Thread Stanislav Fomichev
This is the same problem I found earlier in test_sockopt_inherit: there is a race between server thread doing accept() and client thread doing connect(). Let's explicitly synchronize them via pthread conditional variable. Fixes: b55873984dab ("selftests/bpf: test BPF_SOCK_OPS_RTT_CB") Signed-off-b

Re: [PATCH net v3 09/11] net: core: add ignore flag to netdev_adjacent structure

2019-09-20 Thread Jakub Kicinski
On Mon, 16 Sep 2019 22:48:00 +0900, Taehee Yoo wrote: > In order to link an adjacent node, netdev_upper_dev_link() is used > and in order to unlink an adjacent node, netdev_upper_dev_unlink() is used. > unlink operation does not fail, but link operation can fail. > > In order to exchange adjacent

Re: CONFIG_NET_TC_SKB_EXT

2019-09-20 Thread Jakub Kicinski
On Sat, 21 Sep 2019 00:15:16 +0200, Daniel Borkmann wrote: > On 9/20/19 6:16 PM, Jakub Kicinski wrote: > > On Thu, 19 Sep 2019 15:13:55 +, Vlad Buslov wrote: > >> On Thu 19 Sep 2019 at 14:21, David Miller wrote: > >>> As Linus pointed out, the Kconfig logic for CONFIG_NET_TC_SKB_EXT > >>>

Re: CONFIG_NET_TC_SKB_EXT

2019-09-20 Thread Daniel Borkmann
On 9/20/19 6:16 PM, Jakub Kicinski wrote: On Thu, 19 Sep 2019 15:13:55 +, Vlad Buslov wrote: On Thu 19 Sep 2019 at 14:21, David Miller wrote: As Linus pointed out, the Kconfig logic for CONFIG_NET_TC_SKB_EXT is really not acceptable. It should not be enabled by default at all. Instead th

Re: [PATCH net-next] net: usb: ax88179_178a: allow optionally getting mac address from device tree

2019-09-20 Thread Jakub Kicinski
On Fri, 20 Sep 2019 08:58:30 +0200, Peter Fink wrote: > From: Peter Fink > > Adopt and integrate the feature to pass the MAC address via device tree > from asix_device.c (03fc5d4) also to other ax88179 based asix chips. > E.g. the bootloader fills in local-mac-address and the driver will then > p

Re: [PATCH v3 0/2] net: stmmac: Enhanced addressing mode for DWMAC 4.10

2019-09-20 Thread Florian Fainelli
On 9/20/19 10:00 AM, Thierry Reding wrote: > From: Thierry Reding > > The DWMAC 4.10 supports the same enhanced addressing mode as later > generations. Parse this capability from the hardware feature registers > and set the EAME (Enhanced Addressing Mode Enable) bit when necessary. Do you think

[PATCH v3 1/2] net: stmmac: Only enable enhanced addressing mode when needed

2019-09-20 Thread Thierry Reding
From: Thierry Reding Enhanced addressing mode is only required when more than 32 bits need to be addressed. Add a DMA configuration parameter to enable this mode only when needed. Signed-off-by: Thierry Reding --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 5 - drivers/net/ethern

[PATCH v3 0/2] net: stmmac: Enhanced addressing mode for DWMAC 4.10

2019-09-20 Thread Thierry Reding
From: Thierry Reding The DWMAC 4.10 supports the same enhanced addressing mode as later generations. Parse this capability from the hardware feature registers and set the EAME (Enhanced Addressing Mode Enable) bit when necessary. Thierry Thierry Reding (2): net: stmmac: Only enable enhanced a

[PATCH] net: stmmac: Fix page pool size

2019-09-20 Thread Thierry Reding
From: Thierry Reding The size of individual pages in the page pool in given by an order. The order is the binary logarithm of the number of pages that make up one of the pages in the pool. However, the driver currently passes the number of pages rather than the order, so it ends up wasting quite

[PATCH v3 2/2] net: stmmac: Support enhanced addressing mode for DWMAC 4.10

2019-09-20 Thread Thierry Reding
From: Thierry Reding The address width of the controller can be read from hardware feature registers much like on XGMAC. Add support for parsing the ADDR64 field so that the DMA mask can be set accordingly. This avoids getting swiotlb involved for DMA on Tegra186 and later. Also make sure that

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

2019-09-20 Thread Cong Wang
On Thu, Sep 19, 2019 at 11:27 PM Vlad Buslov wrote: > > > On Fri 20 Sep 2019 at 04:05, Cong Wang wrote: > > On Thu, Sep 19, 2019 at 1:14 PM Vlad Buslov wrote: > >> Notes: > >> Changes V1 -> V2: > >> > >> - Extend sch API with new qdisc_put_empty() function that has same > >> implem

[PATCH net] skge: fix checksum byte order

2019-09-20 Thread Stephen Hemminger
From: Stephen Hemminger Running old skge driver on PowerPC causes checksum errors because hardware reported 1's complement checksum is in little-endian byte order. Reported-by: Benoit Signed-off-by: Stephen Hemminger --- drivers/net/ethernet/marvell/skge.c | 2 +- 1 file changed, 1 insertion(

Re: CONFIG_NET_TC_SKB_EXT

2019-09-20 Thread Jakub Kicinski
On Thu, 19 Sep 2019 15:13:55 +, Vlad Buslov wrote: > On Thu 19 Sep 2019 at 14:21, David Miller wrote: > > As Linus pointed out, the Kconfig logic for CONFIG_NET_TC_SKB_EXT > > is really not acceptable. > > > > It should not be enabled by default at all. > > > > Instead the actual users should

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

2019-09-20 Thread Алексей Захаров
> > Jay Vosburgh wrote: > [...] > > In any event, I think I see what the failure is, I'm working up > >a patch to test and will post it when I have it ready. > > Aleksei, > > Would you be able to test the following patch and see if it > resolves the issue in your testing? Th

Re: Strange routing with VRF and 5.2.7+

2019-09-20 Thread Ben Greear
On 9/10/19 6:08 PM, Ben Greear wrote: On 9/10/19 3:17 PM, Ben Greear wrote: Today we were testing creating 200 virtual station vdevs on ath9k, and using VRF for the routing. Looks like the same issue happens w/out VRF, but there I have oodles of routing rules, so it is an area ripe for failure

Great opportunity my good friend!

2019-09-20 Thread Curt Launer
Attn: This message is strictly for this mail ID owner. My name is Curt Launer an Engineer and lives in Toronto, Canada. When I was working with Australian Worldwide Exploration (AWE) Sydney, Australia my company sent me to Brega Libya during Ghaddafi time. We did the exploration and our compan

[PATCH] arcnet: provide a buffer big enough to actually receive packets

2019-09-20 Thread Uwe Kleine-König
struct archdr is only big enough to hold the header of various types of arcnet packets. So to provide enough space to hold the data read from hardware provide a buffer large enough to hold a packet with maximal size. The problem was noticed by the stack protector which makes the kernel oops. Cc:

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

2019-09-20 Thread Jay Vosburgh
Jay Vosburgh wrote: [...] > In any event, I think I see what the failure is, I'm working up >a patch to test and will post it when I have it ready. Aleksei, Would you be able to test the following patch and see if it resolves the issue in your testing? This is against curr

[PATCH] ipv6/addrconf: use netdev_info()/netdev_warn()/netdev_dbg() for logging

2019-09-20 Thread Konstantin Khlebnikov
Print prefix " : " or " : ". Add "IPv6: " into format: netdev_info() does not use macro pr_fmt(). Signed-off-by: Konstantin Khlebnikov --- net/ipv6/addrconf.c | 28 net/ipv6/addrconf_core.c |2 +- 2 files changed, 13 insertions(+), 17 deletions(-) diff -

[PATCH] net/core/dev: print rtnl kind as driver name for virtual devices

2019-09-20 Thread Konstantin Khlebnikov
Device kind gives more information than only arbitrary device name. Signed-off-by: Konstantin Khlebnikov --- net/core/dev.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 71b18e80389f..c84561634afd 100644 --- a/net/core

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

2019-09-20 Thread Thomas Bogendoerfer
On Mon, Sep 16, 2019 at 02:50:53PM -0700, Arlie Davis wrote: > See section 4.2.2 for the specs on the transfer descriptor. > > Here's my patch that fixes it: > > diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c > b/drivers/net/ethernet/dec/tulip/de2104x.c > index f1a2da15dd0a..3a420ceb52

Re: [PATCH] netfilter: bridge: drop a broken include

2019-09-20 Thread Pablo Neira Ayuso
On Tue, Sep 17, 2019 at 03:59:08PM +0100, Jeremy Sowden wrote: [...] > The commit in net-next that fixes it is: > > 47e640af2e49 ("netfilter: add missing IS_ENABLED(CONFIG_NF_TABLES) check to > header-file.") > > I applied it to the mainline and compile-tested it to verify that it > does indee

[PATCH 0/5] Raw socket cleanups

2019-09-20 Thread Greg Kroah-Hartman
Ori Nimron pointed out that there are a number of places in the kernel where you can create a raw socket, without having to have the CAP_NET_RAW permission. To resolve this, here's a short patch series to test these odd and old protocols for this permission before allowing the creation to succeed

[PATCH 5/5] nfc: enforce CAP_NET_RAW for raw sockets

2019-09-20 Thread Greg Kroah-Hartman
From: Ori Nimron When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Ori Nimron Signed-off-by: Greg Kroah-Hartman --- net/nfc/llcp_sock.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c i

[PATCH 4/5] ieee802154: enforce CAP_NET_RAW for raw sockets

2019-09-20 Thread Greg Kroah-Hartman
From: Ori Nimron When creating a raw AF_IEEE802154 socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Ori Nimron Signed-off-by: Greg Kroah-Hartman --- net/ieee802154/socket.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c in

[PATCH 2/5] appletalk: enforce CAP_NET_RAW for raw sockets

2019-09-20 Thread Greg Kroah-Hartman
From: Ori Nimron When creating a raw AF_APPLETALK socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Ori Nimron Signed-off-by: Greg Kroah-Hartman --- net/appletalk/ddp.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 4072e9d

[PATCH 3/5] ax25: enforce CAP_NET_RAW for raw sockets

2019-09-20 Thread Greg Kroah-Hartman
From: Ori Nimron When creating a raw AF_AX25 socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Ori Nimron Signed-off-by: Greg Kroah-Hartman --- net/ax25/af_ax25.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index ca5207767dc2..bb22

[PATCH 1/5] mISDN: enforce CAP_NET_RAW for raw sockets

2019-09-20 Thread Greg Kroah-Hartman
From: Ori Nimron When creating a raw AF_ISDN socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Ori Nimron Signed-off-by: Greg Kroah-Hartman --- drivers/isdn/mISDN/socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket

net: usb: ax88179_178a: allow passing MAC via DTB

2019-09-20 Thread Peter Fink
From: Peter Fink I adopted the feature to pass the MAC address through device tree from asix_devices.c (introduced in 03fc5d4) to ax88179-based devices. Please have a look if this patch can be accepted. I introduced a new function to avoid code duplication, but I'm not perfectly satisfied with

[PATCH net-next] net: usb: ax88179_178a: allow optionally getting mac address from device tree

2019-09-20 Thread Peter Fink
From: Peter Fink Adopt and integrate the feature to pass the MAC address via device tree from asix_device.c (03fc5d4) also to other ax88179 based asix chips. E.g. the bootloader fills in local-mac-address and the driver will then pick up and use this MAC address. Signed-off-by: Peter Fink ---