Re: Regression in throughput between kvm guests over virtual bridge

2017-10-30 Thread Wei Xu
On Thu, Oct 26, 2017 at 01:53:12PM -0400, Matthew Rosato wrote: > > > > > Are you using the same binding as mentioned in previous mail sent by you? it > > might be caused by cpu convention between pktgen and vhost, could you please > > try to run pktgen from another idle cpu by adjusting the bind

[PATCH] ieee802154: mrf24j40: fix incorrect mask in mrf24j40_stop

2017-10-30 Thread Gustavo A. R. Silva
It seems that this is a copy/paste error and the proper bit masking is: BIT_TXNIE | BIT_RXIE This issue was detected with the help of Coccinelle. Reported-by: Julia Lawall Signed-off-by: Gustavo A. R. Silva Fixes: 7d840545e5b9 ("mrf24j40: replace magic numbers") --- drivers/net/ieee802154/mrf2

Re: [PATCH net] tcp: fix tcp_mtu_probe() vs highest_sack

2017-10-30 Thread Alexei Starovoitov
On Mon, Oct 30, 2017 at 11:21:42PM -0700, Eric Dumazet wrote: > On Mon, 2017-10-30 at 23:17 -0700, Alexei Starovoitov wrote: > > On Mon, Oct 30, 2017 at 11:08:20PM -0700, Eric Dumazet wrote: > > > From: Eric Dumazet > > > > > > Based on SNMP values provided by Roman, Yuchung made the observation

Re: [PATCH net] tcp: fix tcp_mtu_probe() vs highest_sack

2017-10-30 Thread Eric Dumazet
On Mon, 2017-10-30 at 23:17 -0700, Alexei Starovoitov wrote: > On Mon, Oct 30, 2017 at 11:08:20PM -0700, Eric Dumazet wrote: > > From: Eric Dumazet > > > > Based on SNMP values provided by Roman, Yuchung made the observation > > that some crashes in tcp_sacktag_walk() might be caused by MTU probi

Re: linux-next: Signed-off-by missing for commit in the net-next tree

2017-10-30 Thread Eric Dumazet
On Tue, 2017-10-31 at 09:14 +0300, Kirill Smelkov wrote: > Francois, > > On Tue, Oct 31, 2017 at 04:40:19PM +1100, Stephen Rothwell wrote: > > Hi all, > > > > Commit > > > > 509708310cf9 ("r8169: Add support for interrupt coalesce tuning (ethtool > > -C)") > > > > is missing a Signed-off-by

Re: [PATCH net] tcp: fix tcp_mtu_probe() vs highest_sack

2017-10-30 Thread Alexei Starovoitov
On Mon, Oct 30, 2017 at 11:08:20PM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > Based on SNMP values provided by Roman, Yuchung made the observation > that some crashes in tcp_sacktag_walk() might be caused by MTU probing. > > Looking at tcp_mtu_probe(), I found that when a new skb was pl

Re: linux-next: Signed-off-by missing for commit in the net-next tree

2017-10-30 Thread Kirill Smelkov
Francois, On Tue, Oct 31, 2017 at 04:40:19PM +1100, Stephen Rothwell wrote: > Hi all, > > Commit > > 509708310cf9 ("r8169: Add support for interrupt coalesce tuning (ethtool > -C)") > > is missing a Signed-off-by from its author (or its author is wrong). Could we please get signoff for this

[PATCH net] tcp: fix tcp_mtu_probe() vs highest_sack

2017-10-30 Thread Eric Dumazet
From: Eric Dumazet Based on SNMP values provided by Roman, Yuchung made the observation that some crashes in tcp_sacktag_walk() might be caused by MTU probing. Looking at tcp_mtu_probe(), I found that when a new skb was placed in front of the write queue, we were not updating tcp highest sack.

[PATCH net] ipv6: addrconf: increment ifp refcount before ipv6_del_addr()

2017-10-30 Thread Eric Dumazet
From: Eric Dumazet In the (unlikely) event fixup_permanent_addr() returns a failure, addrconf_permanent_addr() calls ipv6_del_addr() without the mandatory call to in6_ifa_hold(), leading to a refcount error, spotted by syzkaller : WARNING: CPU: 1 PID: 3142 at lib/refcount.c:227 refcount_dec+0x4c

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Cong Wang
On Mon, Oct 30, 2017 at 6:03 PM, Lucas Bates wrote: > On Oct 30, 2017 19:13, "Cong Wang" wrote: >> >> On Mon, Oct 30, 2017 at 3:39 PM, Lucas Bates wrote: >> > e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang >> > wrote: >> >> Recently, the RCU callbacks used in TC filters and TC actions keep >> >>

linux-next: Signed-off-by missing for commit in the net-next tree

2017-10-30 Thread Stephen Rothwell
Hi all, Commit 509708310cf9 ("r8169: Add support for interrupt coalesce tuning (ethtool -C)") is missing a Signed-off-by from its author (or its author is wrong). -- Cheers, Stephen Rothwell

Re: [BUG ?] ipv6: addrconf: Adds a missing in6_ifa_hold()

2017-10-30 Thread Eric Dumazet
On Mon, 2017-10-30 at 22:49 -0600, David Ahern wrote: > On 10/30/17 9:53 PM, Eric Dumazet wrote: > > David, I was looking at addrconf_permanent_addr() and wondered > > if there is not some problem with it. > > > > It seems we need to increment ifp refcount before calling > > ipv6_del_addr() > > >

Re: [BUG ?] ipv6: addrconf: Adds a missing in6_ifa_hold()

2017-10-30 Thread David Ahern
On 10/30/17 9:53 PM, Eric Dumazet wrote: > David, I was looking at addrconf_permanent_addr() and wondered > if there is not some problem with it. > > It seems we need to increment ifp refcount before calling > ipv6_del_addr() > > Could you double check if this patch is needed, I am guessing you h

[PATCH net-next 1/2] net: phy: Cosmetic fixes to phylink/sfp/sfp-bus.c

2017-10-30 Thread Florian Fainelli
Perform a number of stylistic changes to phylink.c, sfp.c and sfp-bus.c: - align with netdev-style comments - align function arguments to the opening parenthesis - remove blank lines - fixup a few lines over 80 columns Signed-off-by: Florian Fainelli --- drivers/net/phy/phylink.c | 13 ++---

[PATCH net-next 0/2] PHYLINK cosmetic and build fixes

2017-10-30 Thread Florian Fainelli
Hi David, Russell, Please find two small "fixes" one that corrects some stylistic changes and another one that fixes an actual build failure in sfp.c. Since PHYLINK is not directly visible to user, and there are no in-tree users yet (coming) this is not targeted at "net" but "net-next" instead. T

[PATCH net-next 2/2] net: phy: Fix sfp.c build against GPIO definitions

2017-10-30 Thread Florian Fainelli
include/gpio.h does not contain the references we want, we should be including linux/gpio/consumer.h instead. Fixes: 73970055450e ("sfp: add SFP module support") Signed-off-by: Florian Fainelli --- drivers/net/phy/sfp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/

Re: [PATCH] net: caif: chnl_net: remove unnecessary null check in chnl_recv_cb

2017-10-30 Thread Gustavo A. R. Silva
Quoting "Gustavo A. R. Silva" : Quoting "Gustavo A. R. Silva" : Hi, Quoting "Gustavo A. R. Silva" : container_of is never null, so this null check is unnecessary. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/caif/chnl_net.c | 2 -- 1 file

Re: Using the aesni generic gcm(aes) aead in atomic context

2017-10-30 Thread Herbert Xu
On Mon, Oct 30, 2017 at 03:18:21PM +, Ilya Lesokhin wrote: > Hi, > I've tried using the aesni generic gcm(aes) aead to implement TLS SW fallback > and > I'm getting > [ 3356.839506] BUG: sleeping function called from invalid context at > ./include/crypto/algapi.h:417 > > The warning is comi

[BUG ?] ipv6: addrconf: Adds a missing in6_ifa_hold()

2017-10-30 Thread Eric Dumazet
David, I was looking at addrconf_permanent_addr() and wondered if there is not some problem with it. It seems we need to increment ifp refcount before calling ipv6_del_addr() Could you double check if this patch is needed, I am guessing you have a test suite exercising this code path ? Thanks.

Re: [PATCH net v4 2/3] dt-binding: net: sfp binding documentation

2017-10-30 Thread Florian Fainelli
Hi Baruch, On 09/07/2017 02:25 AM, Baruch Siach wrote: > Add device-tree binding documentation SFP transceivers. Support for SFP > transceivers has been recently introduced (drivers/net/phy/sfp.c). > > Signed-off-by: Baruch Siach > --- > v4: > Remove redundant 'single' from the gpio specifier

Re: [PATCH v2 net-next] ipv6: Implement limits on Hop-by-Hop and Destination options

2017-10-30 Thread Eric Dumazet
On Tue, 2017-10-31 at 11:10 +0900, David Miller wrote: > From: Tom Herbert > Date: Mon, 30 Oct 2017 14:16:00 -0700 > > > I wrote a quick test program that floods a whole bunch of these > > packets to a host and sure enough there is substantial time spent > > in ip6_parse_tlv. > ... > > 25.38%

[PATCH net-next] bpf: document answers to common questions about BPF

2017-10-30 Thread Alexei Starovoitov
to address common misconceptions about what BPF is and what it's not add short BPF Q&A that clarifies core BPF design principles and answers some common questions. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Kicinski --- Documentation/b

Re: [PATCH v2 net-next] ipv6: Implement limits on Hop-by-Hop and Destination options

2017-10-30 Thread Tom Herbert
On Mon, Oct 30, 2017 at 7:10 PM, David Miller wrote: > From: Tom Herbert > Date: Mon, 30 Oct 2017 14:16:00 -0700 > >> I wrote a quick test program that floods a whole bunch of these >> packets to a host and sure enough there is substantial time spent >> in ip6_parse_tlv. > ... >> 25.38% [kern

Re: [PATCH] net: caif: chnl_net: remove unnecessary null check in chnl_recv_cb

2017-10-30 Thread Gustavo A. R. Silva
Quoting "Gustavo A. R. Silva" : Hi, Quoting "Gustavo A. R. Silva" : container_of is never null, so this null check is unnecessary. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/caif/chnl_net.c | 2 -- 1 file changed, 2 deletions(-) diff --g

Re: [PATCH net] tc-testing: fix arg to ip command: -s -> -n

2017-10-30 Thread David Miller
From: "Brenda J. Butler" Date: Mon, 30 Oct 2017 17:59:22 -0400 > Fixes: 31c2611b66e0 ("selftests: Introduce a new test case to tc testsuite") > Fixes: 76b903ee198d ("selftests: Introduce tc testsuite") > Signed-off-by: Brenda J. Butler Applied, thanks Brenda.

Re: [PATCH v2 net-next] ipv6: Implement limits on Hop-by-Hop and Destination options

2017-10-30 Thread David Miller
From: Tom Herbert Date: Mon, 30 Oct 2017 14:16:00 -0700 > I wrote a quick test program that floods a whole bunch of these > packets to a host and sure enough there is substantial time spent > in ip6_parse_tlv. ... > 25.38% [kernel][k] __fib6_clean_all > 21.63% [kernel]

Re: [Patch net] net_sched: remove tcf_block_put_deferred()

2017-10-30 Thread David Miller
From: Cong Wang Date: Mon, 30 Oct 2017 11:10:09 -0700 > In commit 7aa0045dadb6 ("net_sched: introduce a workqueue for RCU callbacks > of tc filter") > I defer tcf_chain_flush() to a workqueue, this causes a use-after-free > because qdisc is already destroyed after we queue this work. > > The tc

Re: [PATCH net] l2tp: hold tunnel in pppol2tp_connect()

2017-10-30 Thread David Miller
From: Guillaume Nault Date: Mon, 30 Oct 2017 17:58:58 +0100 > Use l2tp_tunnel_get() in pppol2tp_connect() to ensure the tunnel isn't > going to disappear while processing the rest of the function. > > Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp > parts") > Signed

Re: [PATCH net-next] tc-testing: correction to docstring in get_unique_item

2017-10-30 Thread Lucas Bates
On Mon, Oct 30, 2017 at 8:37 PM, Brenda J. Butler wrote: > The docstring says the function returns a "set" but it returns > a "list". These are both python data types, so we should refer to > the right one that is being returned. > > Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Lucas Bates
On Mon, Oct 30, 2017 at 7:12 PM, Cong Wang wrote: > On Mon, Oct 30, 2017 at 3:39 PM, Lucas Bates wrote: >> e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang >> wrote: >>> Recently, the RCU callbacks used in TC filters and TC actions keep >>> drawing my attention, they introduce at least 4 race condi

Re: [PATCH 2/2] samples/bpf: add a test for bpf_override_return

2017-10-30 Thread Alexei Starovoitov
On 10/30/17 2:19 PM, Josef Bacik wrote: + +rm -f testfile.img +dd if=/dev/zero of=testfile.img bs=1M seek=1000 count=1 +DEVICE=$(losetup --show -f testfile.img) +mkfs.btrfs -f $DEVICE +mkdir tmpmnt +./tracex7 $DEVICE +if [ $? -eq 0 ] +then + echo "SUCCESS!" +else + echo "FAILED!" +fi

Re: [PATCH 1/2] bpf: add a bpf_override_function helper

2017-10-30 Thread Alexei Starovoitov
On 10/30/17 2:19 PM, Josef Bacik wrote: From: Josef Bacik Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Acco

[PATCH net-next] tc-testing: correction to docstring in get_unique_item

2017-10-30 Thread Brenda J. Butler
The docstring says the function returns a "set" but it returns a "list". These are both python data types, so we should refer to the right one that is being returned. Signed-off-by: Brenda J. Butler --- This patch was formerly sent as part of a 15-patch series. It is being split off as a stand-

Re: [PATCH net-next] net: filter: remove unused variable and fix warning

2017-10-30 Thread David Miller
From: Jakub Kicinski Date: Mon, 30 Oct 2017 13:46:47 -0700 > bpf_getsockopt bpf call sets the ret variable to zero and > never changes it. What's worse in case CONFIG_INET is > not selected the variable is completely unused generating > a warning. > > Signed-off-by: Jakub Kicinski > Reviewed-b

Re: [PATCH] net: caif: chnl_net: remove unnecessary null check in chnl_recv_cb

2017-10-30 Thread Gustavo A. R. Silva
Hi, Quoting "Gustavo A. R. Silva" : container_of is never null, so this null check is unnecessary. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/caif/chnl_net.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/caif/chnl_net.c b/net/ca

Re: [PATCH v2 net-next] net: display hw address of source machine during ipv6 DAD failure

2017-10-30 Thread David Ahern
On 10/30/17 5:38 PM, Vishwanath Pai wrote: > This patch updates the error messages displayed in kernel log to include > hwaddress of the source machine that caused ipv6 duplicate address > detection failures. > > Examples: > > a) When we receive a NA packet from another machine advertising our >

[PATCH v2 net-next] net: display hw address of source machine during ipv6 DAD failure

2017-10-30 Thread Vishwanath Pai
This patch updates the error messages displayed in kernel log to include hwaddress of the source machine that caused ipv6 duplicate address detection failures. Examples: a) When we receive a NA packet from another machine advertising our address: ICMPv6: NA: 34:ab:cd:56:11:e8 advertised our addr

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Cong Wang
On Mon, Oct 30, 2017 at 3:39 PM, Lucas Bates wrote: > e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang wrote: >> Recently, the RCU callbacks used in TC filters and TC actions keep >> drawing my attention, they introduce at least 4 race condition bugs: > >> As suggested by Paul, we could defer the wo

Re: [PATCH net] tun/tap: sanitize TUNSETSNDBUF input

2017-10-30 Thread Eric Dumazet
On Mon, 2017-10-30 at 18:50 -0400, Craig Gallek wrote: > From: Craig Gallek > > Syzkaller found several variants of the lockup below by setting negative > values with the TUNSETSNDBUF ioctl. This patch adds a sanity check > to both the tun and tap versions of this ioctl. > Reviewed-by: Eric Du

[PATCH net] tun/tap: sanitize TUNSETSNDBUF input

2017-10-30 Thread Craig Gallek
From: Craig Gallek Syzkaller found several variants of the lockup below by setting negative values with the TUNSETSNDBUF ioctl. This patch adds a sanity check to both the tun and tap versions of this ioctl. watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [repro:2389] Modules linked in:

[PATCH] net: caif: chnl_net: remove unnecessary null check in chnl_recv_cb

2017-10-30 Thread Gustavo A. R. Silva
container_of is never null, so this null check is unnecessary. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/caif/chnl_net.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 922ac1d..489298d 100

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Lucas Bates
e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang wrote: > Recently, the RCU callbacks used in TC filters and TC actions keep > drawing my attention, they introduce at least 4 race condition bugs: > As suggested by Paul, we could defer the work to a workqueue and > gain the permission of holding RTNL

[PATCH] netfilter: ipset: use swap macro instead of _manually_ swapping values

2017-10-30 Thread Gustavo A. R. Silva
Make use of the swap macro and remove unnecessary variables tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/netfilter/ipset/ip_set_bitmap_ip.c| 8 ++-- net/netfilter/ipset/ip_set_bitmap_

[PATCH net-next] net: dsa: b53: Have b53_hdr_setup() enable/disable tagging

2017-10-30 Thread Florian Fainelli
Have b53_hdr_setup() check what kind of tagging protocol is configured (Broadcom or none) and apply the correct settings in both cases. Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drive

Re: [PATCH net-next v5 01/10] devlink: Add permanent config parameter get/set operations

2017-10-30 Thread Jakub Kicinski
On Mon, 30 Oct 2017 18:03:01 +0100, Jiri Pirko wrote: > >+cfgparam_attr = nla_nest_start(msg, DEVLINK_ATTR_PERM_CONFIG); > >+/* Update restart reqd - if any param needs restart, should be set */ > >+if (need_restart) { > > You should propagate this out so the caller would fill it to

Re: [PATCH v2 net-next] tcp: add tracepoint trace_tcp_retransmit_synack()

2017-10-30 Thread Eric Dumazet
On Mon, 2017-10-30 at 21:43 +, Song Liu wrote: > CCing key audience of the patch. > Please stop doing this for every patch you are sending. Include all relevant CC to your patch submission, and that's enough. Thanks.

Re: WARNING in strp_data_ready

2017-10-30 Thread Tom Herbert
On Mon, Oct 30, 2017 at 2:44 PM, John Fastabend wrote: > On 10/24/2017 08:20 AM, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on 73d3393ada4f70fa3df5639c8d438f2f034c0ecb >> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master >> compiler: gcc (GCC) 7.1.1 20170

[PATCH net] tc-testing: fix arg to ip command: -s -> -n

2017-10-30 Thread Brenda J. Butler
Fixes: 31c2611b66e0 ("selftests: Introduce a new test case to tc testsuite") Fixes: 76b903ee198d ("selftests: Introduce tc testsuite") Signed-off-by: Brenda J. Butler --- We want to run the command inside the container, not in the host. tools/testing/selftests/tc-testing/tdc.py | 4 ++-- 1 file

Re: [lkp-robot] [bpf] 76cdd39f41: WARNING:trinity-c0_still_has_locks_held

2017-10-30 Thread Yonghong Song
I am not able to reproduce the bug with latest net-next. Thanks Daniel to point it out, looks like your test uses an old-version unapplied patchset: https://github.com/0day-ci/linux/commit/76cdd39f4117a6cbd520b5d09993ac87acbdcfd8 which yes, there is a bug to leak the mutext lock and the bug is f

Re: [PATCH net-next] net: filter: remove unused variable and fix warning

2017-10-30 Thread Alexei Starovoitov
On Mon, Oct 30, 2017 at 01:46:47PM -0700, Jakub Kicinski wrote: > bpf_getsockopt bpf call sets the ret variable to zero and > never changes it. What's worse in case CONFIG_INET is > not selected the variable is completely unused generating > a warning. > > Signed-off-by: Jakub Kicinski > Reviewe

Re: [PATCH net-next] net: filter: remove unused variable and fix warning

2017-10-30 Thread Daniel Borkmann
On 10/30/2017 09:46 PM, Jakub Kicinski wrote: bpf_getsockopt bpf call sets the ret variable to zero and never changes it. What's worse in case CONFIG_INET is not selected the variable is completely unused generating a warning. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-

Re: [PATCH] netfilter: ipset: ip_set_bitmap_ipmac: use swap macro in bitmap_ipmac_create

2017-10-30 Thread Gustavo A. R. Silva
Hi Jozsef, Quoting Jozsef Kadlecsik : Hi, On Sat, 28 Oct 2017, Gustavo A. R. Silva wrote: Make use of the swap macro and remove unnecessary variable tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva

[PATCH net-next] bpf: reduce verifier memory consumption

2017-10-30 Thread Alexei Starovoitov
the verifier got progressively smarter over time and size of its internal state grew as well. Time to reduce the memory consumption. Before: sizeof(struct bpf_verifier_state) = 6520 After: sizeof(struct bpf_verifier_state) = 896 It's done by observing that majority of BPF programs use little to n

Re: WARNING in strp_data_ready

2017-10-30 Thread John Fastabend
On 10/24/2017 08:20 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on 73d3393ada4f70fa3df5639c8d438f2f034c0ecb > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. >

Re: [PATCH v2 net-next] tcp: add tracepoint trace_tcp_retransmit_synack()

2017-10-30 Thread Song Liu
CCing key audience of the patch. Thanks, Song > On Oct 30, 2017, at 2:41 PM, Song Liu wrote: > > This tracepoint can be used to trace synack retransmits. It maintains > pointer to struct request_sock. > > We cannot simply reuse trace_tcp_retransmit_skb() here, because the > sk here is the LIST

[PATCH v2 net-next] tcp: add tracepoint trace_tcp_retransmit_synack()

2017-10-30 Thread Song Liu
This tracepoint can be used to trace synack retransmits. It maintains pointer to struct request_sock. We cannot simply reuse trace_tcp_retransmit_skb() here, because the sk here is the LISTEN socket. The IP addresses and ports should be extracted from struct request_sock. Note that, like many oth

[PATCH v2 net-next] tcp: add tracepoint trace_tcp_retransmit_synack

2017-10-30 Thread Song Liu
Change from v1: Updated commit message to highlight potential sparse warning. Song Liu (1): tcp: add tracepoint trace_tcp_retransmit_synack() include/trace/events/tcp.h | 56 ++ net/ipv4/tcp_output.c | 1 + 2 files changed, 57 insertions(+) --

[PATCH 0/2] Add the ability to do BPF directed error injection

2017-10-30 Thread Josef Bacik
A lot of our error paths are not well tested because we have no good way of injecting errors generically. Some subystems (block, memory) have ways to inject errors, but they are random so it's hard to get reproduceable results. With BPF we can add determinism to our error injection. We can use k

[PATCH 2/2] samples/bpf: add a test for bpf_override_return

2017-10-30 Thread Josef Bacik
From: Josef Bacik This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Signed-off-by: Josef Bacik --- samples/bpf/Makefile

[PATCH 1/2] bpf: add a bpf_override_function helper

2017-10-30 Thread Josef Bacik
From: Josef Bacik Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Accomplish this with the bpf_override_funciton

Re: [PATCH] ravb: Use common error handling code in ravb_probe()

2017-10-30 Thread Sergei Shtylyov
On 10/30/2017 11:51 PM, Sergei Shtylyov wrote: From: Markus Elfring Date: Sat, 28 Oct 2017 19:10:08 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Have you actually tried to see if there's any change in the resulting object

Re: [PATCH net-next 1/1] net sched qdisc: pass netlink message flags in event notification

2017-10-30 Thread Roman Mashak
Cong Wang writes: > On Mon, Oct 30, 2017 at 11:07 AM, Roman Mashak wrote: >> Cong Wang writes: >> >>> On Sat, Oct 28, 2017 at 8:36 PM, Roman Mashak wrote: Cong Wang writes: >>> >>> Hmm, I thought you use RTM_NEWQDISC+RTM_DELQDISC to >>> determine it is replacement, no? >> >> Create is RT

[PATCH v2 net-next] ipv6: Implement limits on Hop-by-Hop and Destination options

2017-10-30 Thread Tom Herbert
RFC 8200 (IPv6) defines Hop-by-Hop options and Destination options extension headers. Both of these carry a list of TLVs which is only limited by the maximum length of the extension header (2048 bytes). By the spec a host must process all the TLVs in these options, however these could be used as a

Re: [PATCH net-next] net: filter: remove unused variable and fix warning

2017-10-30 Thread Lawrence Brakmo
Good catch, thanks! On 10/30/17, 1:47 PM, "Jakub Kicinski" wrote: bpf_getsockopt bpf call sets the ret variable to zero and never changes it. What's worse in case CONFIG_INET is not selected the variable is completely unused generating a warning. Signed-off-by: Jakub Ki

Re: [PATCH] ravb: Use common error handling code in ravb_probe()

2017-10-30 Thread Sergei Shtylyov
On 10/29/2017 02:00 PM, Geert Uytterhoeven wrote: From: Markus Elfring Date: Sat, 28 Oct 2017 19:10:08 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus

Re: [PATCH] net: tipc: Convert timers to use timer_setup()

2017-10-30 Thread Kees Cook
On Mon, Oct 30, 2017 at 2:57 AM, Jon Maloy wrote: > > >> -Original Message- >> From: keesc...@google.com [mailto:keesc...@google.com] On Behalf Of >> Kees Cook >> Sent: Friday, October 27, 2017 06:58 >> To: Jon Maloy >> Cc: David S. Miller ; Ying Xue >> ; netdev@vger.kernel.org; tipc- >>

[PATCH v2] net: tipc: Convert timers to use timer_setup()

2017-10-30 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jon Maloy Cc: Ying Xue Cc: "David S. Miller" Cc: netdev@vger.kernel.org Cc: tipc-discuss...@lists.sou

[PATCH] drivers/net: tundra: Convert timers to use timer_setup()

2017-10-30 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Philippe Reynes Cc: "yuval.sh...@oracle.com" Cc: Eric Dumazet Cc: netdev@vger.

[PATCH] drivers/net: ntb_netdev: Convert timers to use timer_setup()

2017-10-30 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jon Mason Cc: Dave Jiang Cc: Allen Hubbe Cc: linux-...@googlegroups.com Cc: netdev@vger.kernel.org Si

Re: [PATCH net-next] net: display hw address of source machine during ipv6 DAD failure

2017-10-30 Thread David Ahern
On 10/30/17 2:50 PM, Vishwanath Pai wrote: > It does print out the full uncompressed IPv6 address. I modified the > message manually by hand while copying it out to the commit message in > order to hide the real IP address of my machines, but did not realize > that it was different from what the ke

[PATCH] drivers/net: cris: Convert timers to use timer_setup()

2017-10-30 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Kalle Valo Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: "yuval.sh...@oracle.co

[PATCH] ip/ipvlan: enhance ability to add mode flags to existing modes

2017-10-30 Thread Mahesh Bandewar
From: Mahesh Bandewar IPvlan supported bridge-only functionality prior to commits a190d04db937 ('ipvlan: introduce 'private' attribute for all existing modes.') and fe89aa6b250c ('ipvlan: implement VEPA mode'). These two commits allow to configure the VEPA and private modes now. This patch adds t

Re: [net-next] tcp_delack_timer circular locking dependancy

2017-10-30 Thread Eric Dumazet
On Mon, 2017-10-30 at 15:20 -0400, Dave Jones wrote: > [ 105.316650] == > [ 105.316818] WARNING: possible circular locking dependency detected > [ 105.316986] 4.14.0-rc7-think+ #1 Not tainted > [ 105.317108] ---

Re: [PATCH] ravb: Use common error handling code in ravb_probe()

2017-10-30 Thread Sergei Shtylyov
Hello! On 10/28/2017 08:19 PM, SF Markus Elfring wrote: From: Markus Elfring Date: Sat, 28 Oct 2017 19:10:08 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Have you actually tried to see if there's any change in the resulting

Re: [PATCH net-next] net: display hw address of source machine during ipv6 DAD failure

2017-10-30 Thread Vishwanath Pai
On 10/30/2017 04:43 PM, David Ahern wrote: > On 10/30/17 2:29 PM, Vishwanath Pai wrote: >> This patch updates the error messages displayed in kernel log to include >> hwaddress of the source machine that caused ipv6 duplicate address >> detection failures. >> >> Examples: >> >> a) When we receive a

[PATCH net-next] bpf: avoid rcu_dereference inside bpf_event_mutex lock region

2017-10-30 Thread Yonghong Song
During perf event attaching/detaching bpf programs, the tp_event->prog_array change is protected by the bpf_event_mutex lock in both attaching and deteching functions. Although tp_event->prog_array is a rcu pointer, rcu_derefrence is not needed to access it since mutex lock will guarantee ordering.

[PATCH net-next] net: filter: remove unused variable and fix warning

2017-10-30 Thread Jakub Kicinski
bpf_getsockopt bpf call sets the ret variable to zero and never changes it. What's worse in case CONFIG_INET is not selected the variable is completely unused generating a warning. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- net/core/filter.c | 3 +-- 1 file changed, 1 insert

Re: [PATCH net-next] net: display hw address of source machine during ipv6 DAD failure

2017-10-30 Thread David Ahern
On 10/30/17 2:29 PM, Vishwanath Pai wrote: > This patch updates the error messages displayed in kernel log to include > hwaddress of the source machine that caused ipv6 duplicate address > detection failures. > > Examples: > > a) When we receive a NA packet from another machine advertising our >

Re: [run_timer_softirq] BUG: unable to handle kernel paging request at 0000000000010007

2017-10-30 Thread Fengguang Wu
On Mon, Oct 30, 2017 at 12:29:47PM -0700, Linus Torvalds wrote: On Sun, Oct 29, 2017 at 4:48 PM, Fengguang Wu wrote: Here are 3 dmesgs related to wireless and 1 from ethernet. Fengguang, these would be lovelier still _if_ you have DEBUG_INFO enabled on the kernel, and your script were to fin

[PATCH net-next] net: display hw address of source machine during ipv6 DAD failure

2017-10-30 Thread Vishwanath Pai
This patch updates the error messages displayed in kernel log to include hwaddress of the source machine that caused ipv6 duplicate address detection failures. Examples: a) When we receive a NA packet from another machine advertising our address: ICMPv6: NA: 34:ab:cd:56:11:e8 advertised our addr

Re: [PATCH net-next v5 06/10] bnxt: Add devlink support for config get/set

2017-10-30 Thread Steve Lin
On Mon, Oct 30, 2017 at 1:35 PM, Jiri Pirko wrote: > Mon, Oct 30, 2017 at 03:46:12PM CET, steven.l...@broadcom.com wrote: >>Implements get and set of configuration parameters using new devlink >>config get/set API. Parameters themselves defined in later patches. >> >>Signed-off-by: Steve Lin >>Ac

Re: [PATCH net-next v5 02/10] devlink: Adding SR-IOV enablement perm config param

2017-10-30 Thread Steve Lin
On Mon, Oct 30, 2017 at 1:20 PM, Jiri Pirko wrote: > Mon, Oct 30, 2017 at 03:46:08PM CET, steven.l...@broadcom.com wrote: >>Adding DEVLINK_PERM_CONFIG_SRIOV_ENABLED permanent config >>parameter; this parameter controls whether the device >>advertises the SR-IOV PCI capability. Value is permanent,

Re: [PATCH net-next v5 01/10] devlink: Add permanent config parameter get/set operations

2017-10-30 Thread Steve Lin
On Mon, Oct 30, 2017 at 1:03 PM, Jiri Pirko wrote: > Mon, Oct 30, 2017 at 03:46:07PM CET, steven.l...@broadcom.com wrote: >>Add support for permanent config parameter get/set commands. Used >>for persistent device configuration parameters. >> >>Signed-off-by: Steve Lin >>Acked-by: Andy Gospodarek

Re: [PATCH net-next] net: bcmgenet: Avoid calling platform_device_put() twice in bcmgenet_mii_exit()

2017-10-30 Thread Florian Fainelli
On 10/27/2017 10:05 PM, Wei Yongjun wrote: > Remove platform_device_put() call after platform_device_unregister() > from function bcmgenet_mii_exit(), otherwise, we will call > platform_device_put() twice. > > Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC > MDIO controller d

Re: [run_timer_softirq] BUG: unable to handle kernel paging request at 0000000000010007

2017-10-30 Thread Linus Torvalds
On Sun, Oct 29, 2017 at 4:48 PM, Fengguang Wu wrote: > > Here are 3 dmesgs related to wireless and 1 from ethernet. Fengguang, these would be lovelier still _if_ you have DEBUG_INFO enabled on the kernel, and your script were to find things like "symbol+0xhex/0xhex", and run "./scripts/faddr2line

Re: [patch net-next RFC 1/9] net_sch: red: Add offload ability to RED qdisc

2017-10-30 Thread David Ahern
On 10/30/17 7:54 AM, Nogah Frankel wrote: >>> diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h >>> index 0e88cc2..743c42a 100644 >>> --- a/include/uapi/linux/pkt_sched.h >>> +++ b/include/uapi/linux/pkt_sched.h >>> @@ -255,6 +255,7 @@ struct tc_red_qopt { >>> #define TC

Re: [PATCH net-next 1/1] net sched qdisc: pass netlink message flags in event notification

2017-10-30 Thread Cong Wang
On Mon, Oct 30, 2017 at 11:07 AM, Roman Mashak wrote: > Cong Wang writes: > >> On Sat, Oct 28, 2017 at 8:36 PM, Roman Mashak wrote: >>> Cong Wang writes: >> >> Hmm, I thought you use RTM_NEWQDISC+RTM_DELQDISC to >> determine it is replacement, no? > > Create is RTM_NEWQDISC and NLM_F_EXCL|NLM_F

[net-next] tcp_delack_timer circular locking dependancy

2017-10-30 Thread Dave Jones
[ 105.316650] == [ 105.316818] WARNING: possible circular locking dependency detected [ 105.316986] 4.14.0-rc7-think+ #1 Not tainted [ 105.317108] -- [ 105.317273] swapper/2/0 is trying to a

Re: [PATCH net-next] net: bcmgenet: Avoid calling platform_device_put() twice in bcmgenet_mii_exit()

2017-10-30 Thread Doug Berger
On 10/27/2017 10:05 PM, Wei Yongjun wrote: > Remove platform_device_put() call after platform_device_unregister() > from function bcmgenet_mii_exit(), otherwise, we will call > platform_device_put() twice. > > Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC > MDIO controller d

Re: [PATCH] net: phy: leds: Add support for "link" trigger

2017-10-30 Thread Florian Fainelli
On 10/30/2017 11:46 AM, Maciej S. Szmigiero wrote: > On 30.10.2017 19:36, Florian Fainelli wrote: >> On 10/28/2017 08:27 AM, Maciej S. Szmigiero wrote: >>> Currently, we create a LED trigger for any link speed known to a PHY. >>> These triggers only fire when their exact link speed had been negotia

Re: [PATCH v9 06/10] arm64: dts: allwinner: Restore EMAC changes

2017-10-30 Thread Corentin Labbe
On Fri, Oct 27, 2017 at 05:11:14PM +0200, Maxime Ripard wrote: > On Tue, Oct 24, 2017 at 07:57:10PM +0200, Corentin Labbe wrote: > > The original dwmac-sun8i DT bindings have some issue on how to handle > > integrated PHY and was reverted in last RC of 4.13. > > But now we have a solution so we nee

Re: [PATCH] net: phy: leds: Add support for "link" trigger

2017-10-30 Thread Maciej S. Szmigiero
On 30.10.2017 19:36, Florian Fainelli wrote: > On 10/28/2017 08:27 AM, Maciej S. Szmigiero wrote: >> Currently, we create a LED trigger for any link speed known to a PHY. >> These triggers only fire when their exact link speed had been negotiated >> (they aren't cumulative, that is, they don't fire

Re: [PATCH net-next 3/7] net: dsa: get port type at parse time

2017-10-30 Thread Florian Fainelli
On 10/30/2017 11:46 AM, Vivien Didelot wrote: > Hi Florian, > > Florian Fainelli writes: > >> Reviewed-by: Florian Fainelli >> >> One nit below: >> >>> static int dsa_port_parse_of(struct dsa_port *dp, struct device_node *dn) >>> { >>> + struct device_node *ethernet = of_parse_phandle(dn, "

Re: [PATCH net-next 3/7] net: dsa: get port type at parse time

2017-10-30 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > Reviewed-by: Florian Fainelli > > One nit below: > >> static int dsa_port_parse_of(struct dsa_port *dp, struct device_node *dn) >> { >> +struct device_node *ethernet = of_parse_phandle(dn, "ethernet", 0); >> +struct device_node *link = of_parse_p

Re: [PATCH net-next 7/7] net: dsa: remove name arg from slave create

2017-10-30 Thread Florian Fainelli
On 10/27/2017 12:55 PM, Vivien Didelot wrote: > Now that slave dsa_port always have their name set, there is no need to > pass it to dsa_slave_create() anymore. Remove this argument. > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next 6/7] net: dsa: get port name at parse time

2017-10-30 Thread Florian Fainelli
On 10/27/2017 12:55 PM, Vivien Didelot wrote: > Get the optional "label" property and assign a default one directly at > parse time instead of doing it when creating the slave. > > For legacy, simply assign the port name stored in cd->port_names. > > Signed-off-by: Vivien Didelot Reviewed-by: F

Re: KASAN: use-after-free Read in sit_tunnel_xmit

2017-10-30 Thread Cong Wang
On Mon, Oct 30, 2017 at 8:34 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 4dc12ffeaeac939097a3f55c881d3dc3523dff0c > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is a

Re: [PATCH net-next 5/7] net: dsa: get master device at port parsing time

2017-10-30 Thread Florian Fainelli
On 10/27/2017 12:55 PM, Vivien Didelot wrote: > Fetching the master device can be done directly when a port is parsed > from device tree or pdata, instead of waiting until dsa_dst_parse. > > Now that -EPROBE_DEFER is returned before we add the switch to the tree, > there is no need to check for th

Re: [PATCH net-next 3/7] net: dsa: get port type at parse time

2017-10-30 Thread Florian Fainelli
On 10/27/2017 12:55 PM, Vivien Didelot wrote: > Assign a port's type at parsed time instead of waiting for the tree to > be completed. > > Because this is now done earlier, we can use the port's type in > dsa_port_is_* helpers instead of digging again in topology description. > > Signed-off-by: V

Re: [PATCH net-next 2/7] net: dsa: add port parse functions

2017-10-30 Thread Florian Fainelli
On 10/27/2017 12:55 PM, Vivien Didelot wrote: > Add symmetrical DSA port parsing functions for pdata and device tree, > used to parse and validate a given port node or platform data. > > They don't do much for the moment but will be extended later on to > assign a port type and get device referenc

  1   2   3   >